00001 /* ${copyright}$ */ 00002 /* $Id: LoginCmd.H 1067 2010-07-08 19:13:45Z eduardo $ */ 00007 #ifndef __LOGINCMD_H__ 00008 #define __LOGINCMD_H__ 00009 00010 #include "libepp_nicbr.H" 00011 00012 #include "Command.H" 00013 00014 LIBEPP_NICBR_NS_BEGIN 00015 00017 class LoginCmd : public Command 00018 { 00019 public: 00021 LoginCmd(bool reset = true) : Command(false) 00022 { 00023 if (reset) { 00024 this->reset(); 00025 } 00026 } 00027 00029 00032 void set_clID(const string &clID) { _clID = clID; } 00033 00035 00038 void set_pw(const string &pw) { _pw = pw; } 00039 00041 00044 void set_new_pw(const string &new_pw) { _new_pw = new_pw; } 00045 00047 00050 void set_version(const string &version) { _version = version; } 00051 00053 00056 void set_lang(const string &lang) { _lang = lang; } 00057 00059 00062 string get_clID() const { return _clID; } 00063 00065 00068 string get_pw() const { return _pw; } 00069 00071 00074 string get_new_pw() const { return _new_pw; } 00075 00077 00080 string get_version() const { return _version; } 00081 00083 00086 string get_lang() const { return _lang; } 00087 00089 00092 void add_extURI(const string &extURI) 00093 { 00094 _extURI.insert(extURI); 00095 } 00096 00098 00101 set<string> get_extURI() const 00102 { 00103 return _extURI; 00104 } 00105 00107 00110 void reset() 00111 { 00112 Command::reset(); 00113 _clID = ""; 00114 _pw = ""; 00115 _new_pw = ""; 00116 _version = ""; 00117 _lang = "en"; 00118 _extURI.clear(); 00119 } 00120 00121 protected: 00123 string _clID; 00124 00126 string _pw; 00127 00129 string _new_pw; 00130 00132 string _version; 00133 00135 string _lang; 00136 00138 set<string> _extURI; 00139 }; 00140 00141 LIBEPP_NICBR_NS_END 00142 #endif //__LOGINCMD_H__