00001
00002
00007 #ifndef __IPNETWORKUPDATECMD_H__
00008 #define __IPNETWORKUPDATECMD_H__
00009
00010 #include <map>
00011 #include <vector>
00012
00013 #include "libepp_nicbr.H"
00014
00015 #include "Command.H"
00016
00017 using std::map;
00018 using std::vector;
00019
00020 LIBEPP_NICBR_NS_BEGIN
00021
00023 class IpNetworkUpdateCmd : public Command
00024 {
00025 public:
00027 IpNetworkUpdateCmd(bool reset = true) : Command(false)
00028 {
00029 if (reset) {
00030 this->reset();
00031 }
00032 }
00033
00035
00038 void set_roid(const string &roid)
00039 {
00040 _roid = roid;
00041 }
00042
00044
00047 string get_roid() const
00048 {
00049 return _roid;
00050 }
00051
00053
00056 void set_organization(const string &organization)
00057 {
00058 _organization = organization;
00059 }
00060
00062
00065 string get_organization() const
00066 {
00067 return _organization;
00068 }
00069
00071
00074 void set_allocType(const string &allocType)
00075 {
00076 _allocType = allocType;
00077 }
00078
00080
00083 string get_allocType() const
00084 {
00085 return _allocType;
00086 }
00087
00089
00092 void insert_reverseDNS_add(const ReverseDns &reverseDns)
00093 {
00094 _reverseDNS_add.push_back(reverseDns);
00095 }
00096
00098
00101 vector<ReverseDns> get_reverseDns_add() const
00102 {
00103 return _reverseDNS_add;
00104 }
00105
00107
00110 void insert_reverseDNS_rem(const ReverseDns &reverseDns)
00111 {
00112 _reverseDNS_rem.push_back(reverseDns);
00113 }
00114
00116
00119 vector<ReverseDns> get_reverseDns_rem() const
00120 {
00121 return _reverseDNS_rem;
00122 }
00123
00125
00129 void insert_contact_add(const string &type, const string &identification)
00130 {
00131 _contacts_add[type] = identification;
00132 }
00133
00135
00138 map< string, string, less<string> > get_contacts_add() const
00139 {
00140 return _contacts_add;
00141 }
00142
00144
00148 void insert_contact_rem(const string &type, const string &identification)
00149 {
00150 _contacts_rem[type] = identification;
00151 }
00152
00154
00157 map< string, string, less<string> > get_contacts_rem() const
00158 {
00159 return _contacts_rem;
00160 }
00161
00162 void reset()
00163 {
00164 Command::reset();
00165 _roid = "";
00166 _organization = "";
00167 _allocType = "";
00168 _reverseDNS_add.clear();
00169 _reverseDNS_rem.clear();
00170 _contacts_add.clear();
00171 _contacts_rem.clear();
00172 }
00173
00174 protected:
00176 string _roid;
00177
00179 vector<ReverseDns> _reverseDNS_add;
00180
00182 vector<ReverseDns> _reverseDNS_rem;
00183
00185 map< string, string, less<string> > _contacts_add;
00186
00188 map< string, string, less<string> > _contacts_rem;
00189
00191 string _organization;
00192
00194 string _allocType;
00195 };
00196
00197 LIBEPP_NICBR_NS_END
00198 #endif // __IPNETWORKUPDATECMD_H__