libepp_nicbr
AsnRenewCmd.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id: AsnRenewCmd.H 1086 2010-12-10 13:07:28Z eduardo $ */
7 #ifndef __ASNRENEWCMD_H__
8 #define __ASNRENEWCMD_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 AsnRenewCmd : public Command
23 {
24 public:
26  AsnRenewCmd(bool reset = true) : Command(false)
27  {
28  if (reset) {
29  this->reset();
30  }
31  }
32 
34 
37  void set_asn(const int asn)
38  {
39  _asn = asn;
40  }
41 
43 
46  int get_asn() const
47  {
48  return _asn;
49  }
50 
52 
55  void set_expDate(const string &expDate)
56  {
57  _expDate = expDate;
58  }
59 
61 
64  string get_expDate() const
65  {
66  return _expDate;
67  }
68 
70 
74  void set_period(const int time, const string &unit)
75  {
76  _period.time = time;
77  _period.unit = unit;
78  }
79 
81 
85  {
86  return _period;
87  }
88 
89  void reset()
90  {
92  _asn = 0;
93  _expDate = "";
94  _period.time = 0;
95  _period.unit = "";
96  }
97 
98 protected:
100  int _asn;
101 
103  string _expDate;
104 
107 };
108 
109 LIBEPP_NICBR_NS_END
110 #endif // __ASNRENEWCMD_H__
void set_asn(const int asn)
Sets asn.
Definition: AsnRenewCmd.H:37
Definition: RegistrationPeriod.H:17
int _asn
autonomous system number
Definition: AsnRenewCmd.H:100
string get_expDate() const
Returns expiration date.
Definition: AsnRenewCmd.H:64
void set_expDate(const string &expDate)
Sets expiration date.
Definition: AsnRenewCmd.H:55
Project defines.
int get_asn() const
Returns asn.
Definition: AsnRenewCmd.H:46
RegistrationPeriod _period
number of units to be added to the registration period of the AS object
Definition: AsnRenewCmd.H:106
string _expDate
date on which the current validity period ends
Definition: AsnRenewCmd.H:103
EPP RegistrationPeriod struct.
RegistrationPeriod get_period() const
Returns period.
Definition: AsnRenewCmd.H:84
void set_period(const int time, const string &unit)
Sets period.
Definition: AsnRenewCmd.H:74
void reset()
Reset object attributes.
Definition: Command.H:33
EPP Command Class.
Definition: Command.H:18
EPP Command Class.
EPP AsnRenew Class.
Definition: AsnRenewCmd.H:22
AsnRenewCmd(bool reset=true)
Default constructor.
Definition: AsnRenewCmd.H:26