authentication/SecurityQos.h

Go to the documentation of this file.
00001 /*------------------------------------------------------------------------------
00002 Name:      SecurityQos.h
00003 Project:   xmlBlaster.org
00004 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
00005 Comment:   The qos for the security (a subelement of connect qos)
00006 ------------------------------------------------------------------------------*/
00007 
00018 #ifndef _AUTHENTICATION_SECURITY_QOS_H
00019 #define _AUTHENTICATION_SECURITY_QOS_H
00020 
00021 #include <util/xmlBlasterDef.h>
00022 #include <util/I_Log.h>
00023 #include <string>
00024 
00025 namespace org { namespace xmlBlaster { namespace authentication {
00026 
00027    class Dll_Export SecurityQos
00028    {
00029       friend class SecurityQosFactory;
00030    private:
00031       const std::string ME;
00032       org::xmlBlaster::util::Global& global_;
00033       org::xmlBlaster::util::I_Log& log_;
00034       std::string       type_;
00035       std::string       version_;
00036       std::string       user_;
00037       std::string       passwd_;
00038 
00039       void copy(const SecurityQos& securityQos)
00040       {
00041          type_    = securityQos.type_;
00042          version_ = securityQos.version_;
00043          user_    = securityQos.user_;
00044          passwd_  = securityQos.passwd_;
00045       }
00046 
00047    public:
00053       SecurityQos(org::xmlBlaster::util::Global& global,
00054                   const std::string& loginName="",
00055                   const std::string& password="",
00056                   const std::string& pluginTypeVersion="");
00057 
00058       SecurityQos(const SecurityQos& securityQos);
00059 
00060       SecurityQos& operator =(const SecurityQos& securityQos);
00061 
00062       std::string getPluginVersion() const;
00063 
00064       std::string getPluginType() const;
00065 
00066       void setUserId(const std::string& userId);
00067 
00068       std::string getUserId() const;
00069 
00073       void setCredential(const std::string& cred);
00074 
00078       std::string getCredential() const;
00079 
00086       std::string toXml(const std::string& extraOffset="");
00087    };
00088 
00089 }}} // namespaces
00090 
00091 #endif