libepp_nicbr
DefRegRenewCmd.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id$ */
7 #ifndef __DEF_REG_RENEW_CMD_H__
8 #define __DEF_REG_RENEW_CMD_H__
9 
10 #include <string>
11 
12 #include "libepp_nicbr.H"
13 
14 #include "Command.H"
15 #include "RegistrationPeriod.H"
16 
17 using std::string;
18 
19 LIBEPP_NICBR_NS_BEGIN
20 
22 class DefRegRenewCmd : public Command
23 {
24 public:
26  DefRegRenewCmd(bool reset = true) : Command(false)
27  {
28  if (reset) {
29  this->reset();
30  }
31  }
32 
34 
37  void set_roid(const string &roid) { _roid = roid; }
38 
40 
43  string get_roid() const { return _roid; }
44 
46 
49  void set_cur_exp_date(const string &date) { _cur_exp_date = date; }
50 
52 
55  string get_cur_exp_date() const { return _cur_exp_date; }
56 
59 
63  void set_period(const int time, const string& unit)
64  {
65  _period.time = time;
66  _period.unit = unit;
67  }
68 
71 
75 
77  void reset()
78  {
80  _roid.clear();
81  _cur_exp_date.clear();
82  _period.time = 0;
83  _period.unit = "";
84  }
85 
86 protected:
88  string _roid;
89 
91  string _cur_exp_date;
92 
96 };
97 
98 LIBEPP_NICBR_NS_END
99 
100 #endif // __DEF_REG_RENEW_CMD_H__
Definition: RegistrationPeriod.H:17
void set_roid(const string &roid)
Set defensive registration roid.
Definition: DefRegRenewCmd.H:37
string _cur_exp_date
Date on which the current validity period ends.
Definition: DefRegRenewCmd.H:91
Project defines.
string get_cur_exp_date() const
Returns date on which the current validity period ends.
Definition: DefRegRenewCmd.H:55
DefRegRenewCmd(bool reset=true)
Default constructor.
Definition: DefRegRenewCmd.H:26
void reset()
Reset object attributes.
Definition: DefRegRenewCmd.H:77
void set_period(const int time, const string &unit)
Definition: DefRegRenewCmd.H:63
EPP RegistrationPeriod struct.
RegistrationPeriod get_period() const
Definition: DefRegRenewCmd.H:74
string get_roid() const
Returns defensive registration roid.
Definition: DefRegRenewCmd.H:43
string _roid
Defensive registration roid.
Definition: DefRegRenewCmd.H:88
void reset()
Reset object attributes.
Definition: Command.H:33
EPP Command Class.
Definition: Command.H:18
void set_cur_exp_date(const string &date)
Sets date on which the current validity period ends.
Definition: DefRegRenewCmd.H:49
EPP Command Class.
EPP DefRegRenewCmd Class.
Definition: DefRegRenewCmd.H:22
RegistrationPeriod _period
Definition: DefRegRenewCmd.H:95