libepp_nicbr
DomainRenewCmd.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id: DomainRenewCmd.H 1086 2010-12-10 13:07:28Z eduardo $ */
7 #ifndef __DOMAIN_RENEW_CMD_H__
8 #define __DOMAIN_RENEW_CMD_H__
9 
10 #include <string>
11 #include <set>
12 #include <map>
13 
14 #include "libepp_nicbr.H"
15 
16 #include "Command.H"
17 #include "RegistrationPeriod.H"
18 
19 using std::string;
20 using std::set;
21 using std::map;
22 using std::less;
23 
24 LIBEPP_NICBR_NS_BEGIN
25 
27 class DomainRenewCmd : public Command
28 {
29 public:
31  DomainRenewCmd(bool reset = true) : Command(false)
32  {
33  if (reset) {
34  this->reset();
35  }
36  }
37 
39 
42  void set_name(const string& name) { _name = name; }
43 
45 
48  string get_name() const { return _name; }
49 
50  // Sets the date of the next renewal
54  void set_curExpDate(const string& curExpDate) { _curExpDate = curExpDate; }
55 
57 
60  string get_curExpDate() const { return _curExpDate; }
61 
63 
67  void set_period(const int time, const string& unit)
68  {
69  _period.time = time;
70  _period.unit = unit;
71  }
72 
74 
77  void set_period(const RegistrationPeriod& period)
78  {
79  _period.time = period.time;
80  _period.unit = period.unit;
81  }
82 
84 
88 
89 
91  void reset()
92  {
94  _name = "";
95  _curExpDate = "";
96  _period.time = 0;
97  _period.unit = "";
98  }
99 
100 protected:
102  string _name;
103 
105  string _curExpDate;
106 
109 };
110 
111 LIBEPP_NICBR_NS_END
112 #endif //__DOMAIN_RENEW_CMD_H__
void set_name(const string &name)
Sets domain name.
Definition: DomainRenewCmd.H:42
Definition: RegistrationPeriod.H:17
RegistrationPeriod _period
Renewal period of the domain object.
Definition: DomainRenewCmd.H:108
string _curExpDate
Date of the next renewal.
Definition: DomainRenewCmd.H:105
Project defines.
EPP RegistrationPeriod struct.
RegistrationPeriod get_period() const
Returns domain registration period.
Definition: DomainRenewCmd.H:87
string get_curExpDate() const
Returns date of the next renewal.
Definition: DomainRenewCmd.H:60
void set_period(const RegistrationPeriod &period)
Sets domain registration period.
Definition: DomainRenewCmd.H:77
void set_period(const int time, const string &unit)
Sets domain renewal period.
Definition: DomainRenewCmd.H:67
DomainRenewCmd(bool reset=true)
Default constructor.
Definition: DomainRenewCmd.H:31
void set_curExpDate(const string &curExpDate)
Definition: DomainRenewCmd.H:54
string get_name() const
Returns domain name.
Definition: DomainRenewCmd.H:48
EPP DomainRenewCmd Class.
Definition: DomainRenewCmd.H:27
void reset()
Reset object attributes.
Definition: DomainRenewCmd.H:91
string _name
Fully qualified domain name.
Definition: DomainRenewCmd.H:102
void reset()
Reset object attributes.
Definition: Command.H:33
EPP Command Class.
Definition: Command.H:18
EPP Command Class.