00001
00002
00007 #ifndef __BR_ORG_UPDATE_CMD_H__
00008 #define __BR_ORG_UPDATE_CMD_H__
00009
00010 #include <string>
00011 #include <map>
00012
00013
00014 #include "libepp_nicbr.H"
00015
00016 #include "ContactUpdateCmd.H"
00017
00018 using std::string;
00019 using std::map;
00020
00021 LIBEPP_NICBR_NS_BEGIN
00022
00024 class BrOrgUpdateCmd : public ContactUpdateCmd
00025 {
00026 public:
00028 BrOrgUpdateCmd(bool reset = true) : ContactUpdateCmd(false)
00029 {
00030 if (reset) {
00031 this->reset();
00032 }
00033 }
00034
00036
00039 void set_organization(const string &organization)
00040 {
00041 _organization = organization;
00042 }
00043
00045
00048 string get_organization()
00049 {
00050 return _organization;
00051 }
00052
00054
00058 void insert_contact_add(const string &type, const string &id)
00059 {
00060 _contact_list_add[type] = id;
00061 }
00062
00064
00067 map< string, string, less<string> > get_contact_list_add()
00068 {
00069 return _contact_list_add;
00070 }
00071
00073
00077 void insert_contact_rem(const string &type, const string &id)
00078 {
00079 _contact_list_rem[type] = id;
00080 }
00081
00083
00086 map< string, string, less<string> > get_contact_list_rem()
00087 {
00088 return _contact_list_rem;
00089 }
00090
00092 void reset()
00093 {
00094 ContactUpdateCmd::reset();
00095 _organization = "";
00096 _contact_list_add.clear();
00097 _contact_list_rem.clear();
00098 }
00099
00100 protected:
00102 string _organization;
00103
00105 map<string, string, less<string> > _contact_list_add;
00106
00108 map<string, string, less<string> > _contact_list_rem;
00109 };
00110
00111 LIBEPP_NICBR_NS_END
00112 #endif //__BR_ORG_UPDATE_CMD_H__