libepp_nicbr
LoginCmd.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id: LoginCmd.H 1086 2010-12-10 13:07:28Z eduardo $ */
7 #ifndef __LOGINCMD_H__
8 #define __LOGINCMD_H__
9 
10 #include "libepp_nicbr.H"
11 
12 #include "Command.H"
13 
14 LIBEPP_NICBR_NS_BEGIN
15 
17 class LoginCmd : public Command
18 {
19 public:
21  LoginCmd(bool reset = true) : Command(false)
22  {
23  if (reset) {
24  this->reset();
25  }
26  }
27 
29 
32  void set_clID(const string &clID) { _clID = clID; }
33 
35 
38  void set_pw(const string &pw) { _pw = pw; }
39 
41 
44  void set_new_pw(const string &new_pw) { _new_pw = new_pw; }
45 
47 
50  void set_version(const string &version) { _version = version; }
51 
53 
56  void set_lang(const string &lang) { _lang = lang; }
57 
59 
62  string get_clID() const { return _clID; }
63 
65 
68  string get_pw() const { return _pw; }
69 
71 
74  string get_new_pw() const { return _new_pw; }
75 
77 
80  string get_version() const { return _version; }
81 
83 
86  string get_lang() const { return _lang; }
87 
89 
92  void add_extURI(const string &extURI)
93  {
94  _extURI.insert(extURI);
95  }
96 
98 
101  set<string> get_extURI() const
102  {
103  return _extURI;
104  }
105 
107 
110  void reset()
111  {
112  Command::reset();
113  _clID = "";
114  _pw = "";
115  _new_pw = "";
116  _version = "";
117  _lang = "en";
118  _extURI.clear();
119  }
120 
121 protected:
123  string _clID;
124 
126  string _pw;
127 
129  string _new_pw;
130 
132  string _version;
133 
135  string _lang;
136 
138  set<string> _extURI;
139 };
140 
141 LIBEPP_NICBR_NS_END
142 #endif //__LOGINCMD_H__
void set_new_pw(const string &new_pw)
Sets new password.
Definition: LoginCmd.H:44
string get_new_pw() const
Returns new password.
Definition: LoginCmd.H:74
Project defines.
string _version
Protocol version.
Definition: LoginCmd.H:132
EPP LoginCmd Class.
Definition: LoginCmd.H:17
string _lang
Text language.
Definition: LoginCmd.H:135
void set_pw(const string &pw)
Sets password.
Definition: LoginCmd.H:38
void add_extURI(const string &extURI)
Adds an object extension supported by the client.
Definition: LoginCmd.H:92
string get_pw() const
Returns password.
Definition: LoginCmd.H:68
string _pw
Password.
Definition: LoginCmd.H:126
LoginCmd(bool reset=true)
Default constructor.
Definition: LoginCmd.H:21
void set_version(const string &version)
Sets protocol version.
Definition: LoginCmd.H:50
string _new_pw
New Password (optional)
Definition: LoginCmd.H:129
void set_lang(const string &lang)
Sets text language.
Definition: LoginCmd.H:56
string get_lang() const
Returns text language.
Definition: LoginCmd.H:86
void reset()
Reset object attributes.
Definition: Command.H:33
EPP Command Class.
Definition: Command.H:18
string get_clID() const
Returns Client ID.
Definition: LoginCmd.H:62
EPP Command Class.
void reset()
Reset attributes.
Definition: LoginCmd.H:110
void set_clID(const string &clID)
Sets Client ID.
Definition: LoginCmd.H:32
string _clID
Client ID.
Definition: LoginCmd.H:123
set< string > get_extURI() const
Returns the object extensions the client supports.
Definition: LoginCmd.H:101
string get_version() const
Returns protocol version.
Definition: LoginCmd.H:80
set< string > _extURI
Object extensions supported by client.
Definition: LoginCmd.H:138