/* * Copyright (C) 2006 Registro.br. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * 1. Redistribution of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY REGISTRO.BR ``AS IS AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIE OF FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO * EVENT SHALL REGISTRO.BR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * DAMAGE. */ /* $Id: BrOrgUpdateCmd.H 789 2006-07-18 18:39:47Z cleber $ */ /** @file BrOrgUpdateCmd.H * @brief EPP BrOrgUpdateCmd Class */ #ifndef __BR_ORG_UPDATE_CMD_H__ #define __BR_ORG_UPDATE_CMD_H__ #include #include #include "libepp_nicbr.H" #include "ContactUpdateCmd.H" using std::string; using std::map; LIBEPP_NICBR_NS_BEGIN /// EPP BrOrgUpdateCmd Class class BrOrgUpdateCmd : public ContactUpdateCmd { public: /// Default constructor BrOrgUpdateCmd(bool reset = true) : ContactUpdateCmd(false) { if (reset) { this->reset(); } } /// Sets Organization attribute /** @param organization Organization Identifier */ void set_organization(const string &organization) { _organization = organization; } /// Returns the Organization /** @return organization attribute */ string get_organization() { return _organization; } /// Sets Responsible for the organization /** @param responsible Person Responsible */ void set_responsible(const string &responsible) { _responsible = responsible; _responsible_f = true; } /// Returns Responsible for the organization /** @return Person Responsible */ string get_responsible() { return _responsible; }; /// Sets the responsible change flag /** @param responsible_f responsible change flag */ void set_responsible_f(bool responsible_f) { _responsible_f = responsible_f; }; /// Returns the responsible change flag /** @return The responsible change flag */ bool get_responsible_f() { return _responsible_f; }; /// Inserts a Contact into the list of additions /** @param id Contact Id @param type Contact Type */ void insert_contact_add(const string &type, const string &id) { _contact_list_add[type] = id; } /// Returns the Contact List of additions /** @return Contact List */ map< string, string, less > get_contact_list_add() { return _contact_list_add; } /// Inserts a Contact into the list of deletions /** @param id Contact Id @param type Contact Type */ void insert_contact_rem(const string &type, const string &id) { _contact_list_rem[type] = id; } /// Returns the Contact List /** @return Contact List */ map< string, string, less > get_contact_list_rem() { return _contact_list_rem; } /// reset attributes void reset() { ContactUpdateCmd::reset(); _organization = ""; _contact_list_add.clear(); _contact_list_rem.clear(); _responsible = ""; _responsible_f = false; } protected: /// map with organization attribute string _organization; /// Person responsible for the organization string _responsible; /// Responsible change flag bool _responsible_f; /// Human Contacts to add map > _contact_list_add; /// Human Contacts to remove map > _contact_list_rem; }; LIBEPP_NICBR_NS_END #endif //__BR_ORG_UPDATE_CMD_H__