1 /*------------------------------------------------------------------------------
 2 Name:      SecurityQosFactory.h
 3 Project:   xmlBlaster.org
 4 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
 5 Comment:   The Factory for the simple QosSecurityQos
 6 ------------------------------------------------------------------------------*/
 7 
 8 /**
 9  * Parse the default security handling with loginName and password
10  * from the login qos xml std::string:
11  * <pre>
12  *  &lt;securityService type="simple" version="1.0">
13  *     &lt;user>aUser&lt;/user>
14  *     &lt;passwd>theUsersPwd&lt;/passwd>
15  *  &lt;/securityService>
16  * </pre>
17  */
18 
19 #ifndef _AUTHENTICATION_SECURITYQOSFACTORY_H
20 #define _AUTHENTICATION_SECURITYQOSFACTORY_H
21 
22 #include <authentication/SecurityQos.h>
23 #include <util/parser/XmlHandlerBase.h>
24 
25 namespace org { namespace xmlBlaster { namespace authentication {
26 
27    class Dll_Export SecurityQosFactory: public org::xmlBlaster::util::parser::XmlHandlerBase
28    {
29    private:
30       const std::string ME;
31 
32       // helper flags for SAX parsing
33       bool inSecurityService_;
34       bool inUser_;
35       bool inPasswd_;
36 
37       org::xmlBlaster::authentication::SecurityQos securityQos_;
38 
39    public:
40       SecurityQosFactory(org::xmlBlaster::util::Global& global);
41 
42       org::xmlBlaster::authentication::SecurityQos parse(const std::string& xmlQoS_literal);
43 
44       /**
45        * Start element, event from SAX parser.
46        * <p />
47        * @param name Tag name
48        * @param attrs the attributes of the tag
49        */
50       void startElement(const std::string &name, const org::xmlBlaster::util::parser::AttributeMap& attrs);
51 
52       /**
53        * End element, event from SAX parser.
54        * <p />
55        * @param name Tag name
56        */
57 
58        void endElement(const std::string &name);
59 
60    };
61 
62 }}} // namespaces
63 
64 #endif


syntax highlighted by Code2HTML, v. 0.9.1