include/DomainRenewCmd.H

Go to the documentation of this file.
00001 /* ${copyright}$ */
00002 /* $Id: DomainRenewCmd.H 919 2007-08-30 14:43:07Z eduardo $ */
00007 #ifndef __DOMAIN_RENEW_CMD_H__
00008 #define __DOMAIN_RENEW_CMD_H__
00009 
00010 #include <string>
00011 #include <set>
00012 #include <map>
00013 
00014 #include "libepp_nicbr.H"
00015 
00016 #include "Command.H"
00017 #include "RegistrationPeriod.H"
00018 
00019 using std::string;
00020 using std::set;
00021 using std::map;
00022 using std::less;
00023 
00024 LIBEPP_NICBR_NS_BEGIN
00025 
00027 class DomainRenewCmd : public Command
00028 {
00029 public:
00031   DomainRenewCmd(bool reset = true) : Command(false)
00032   {
00033     if (reset) {
00034       this->reset();
00035     }
00036   }
00037 
00039 
00042   void set_name(string name) { _name = name; }
00043 
00045 
00048   string get_name() { return _name; }
00049 
00050   // Sets the date of the next renewal
00054   void set_curExpDate(string curExpDate) { _curExpDate = curExpDate; }
00055 
00057 
00060   string get_curExpDate() { return _curExpDate; }
00061 
00063 
00067   void set_period(int time, string unit)
00068   {
00069     _period.time = time;
00070     _period.unit = unit;
00071   }
00072 
00074 
00077   void set_period(RegistrationPeriod period)
00078   {
00079     _period.time = period.time;
00080     _period.unit = period.unit;
00081   }
00082 
00084 
00087   RegistrationPeriod get_period() { return _period; }
00088 
00089 
00091   void reset()
00092   {
00093     Command::reset();
00094     _name = "";
00095     _curExpDate = "";
00096     _period.time = 0;
00097     _period.unit = "";
00098   }
00099   
00100 protected:
00102   string _name;
00103 
00105   string _curExpDate;
00106 
00108   RegistrationPeriod _period;
00109 };
00110 
00111 LIBEPP_NICBR_NS_END
00112 #endif //__DOMAIN_RENEW_CMD_H__

Generated on Tue Mar 17 16:03:07 2009 for libepp_nicbr by  doxygen 1.4.7