00001 /* ${copyright}$ */ 00002 /* $Id: IpNetworkRenewCmd.H 958 2008-12-11 14:36:22Z eduardo $ */ 00007 #ifndef __IPNETWORKRENEWCMD_H__ 00008 #define __IPNETWORKRENEWCMD_H__ 00009 00010 #include <string> 00011 00012 #include "libepp_nicbr.H" 00013 00014 #include "Command.H" 00015 #include "RegistrationPeriod.H" 00016 00017 using std::string; 00018 00019 LIBEPP_NICBR_NS_BEGIN 00020 00022 class IpNetworkRenewCmd : public Command 00023 { 00024 public: 00026 IpNetworkRenewCmd(bool reset = true) : Command(false) 00027 { 00028 if (reset) { 00029 this->reset(); 00030 } 00031 } 00032 00034 00037 void set_roid(const string &roid) 00038 { 00039 _roid = roid; 00040 } 00041 00043 00046 string get_roid() const 00047 { 00048 return _roid; 00049 } 00050 00052 00055 void set_expDate(const string &expDate) 00056 { 00057 _expDate = expDate; 00058 } 00059 00061 00064 string get_expDate() const 00065 { 00066 return _expDate; 00067 } 00068 00070 00074 void set_period(const int &time, const string &unit) 00075 { 00076 _period.time = time; 00077 _period.unit = unit; 00078 } 00079 00081 00084 RegistrationPeriod get_period() const 00085 { 00086 return _period; 00087 } 00088 00089 void reset() 00090 { 00091 Command::reset(); 00092 _roid = ""; 00093 _expDate = ""; 00094 _period.time = 0; 00095 _period.unit = ""; 00096 } 00097 00098 protected: 00100 string _roid; 00101 00103 string _expDate; 00104 00106 RegistrationPeriod _period; 00107 }; 00108 00109 LIBEPP_NICBR_NS_END 00110 #endif // __IPNETWORKRENEWCMD_H__