address_i.h

Go to the documentation of this file.
00001 // OSB library ************************************************ -*- C++ -*-
00008 /*
00009   AUTHOR(S): Darryl Kang (dk)
00010 
00011   RCS information
00012    $Name: OSB_060808 $
00013    $Revision: 1.21 $
00014 
00015   License
00016    OSB rating and billing library for communication networks
00017    Copyright (C) 2004, 2005, 2006  OSB systems
00018 
00019    This file may be distributed and/or modify under the terms of the
00020    GNU General Public License (GPL) as published by the Free Software
00021    Foundation which is provided in the file LICENSE.GPL included in the
00022    packaging of this file.
00023 
00024    The file is distributed in the hope that it will be useful, but WITHOUT
00025    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00026    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00027    for more details.
00028 
00029    Holders of a OSB Commercial License may use this file under the terms
00030    and conditions of this commercial license.
00031  */
00032 #ifndef _ADDRESS_I_H_
00033 #define _ADDRESS_I_H_
00034 
00035 // ************************************************************************
00036 // included header files
00037 
00038 // + local headers
00039 #include "addressS.h"
00040 #include "servantlocators.h"
00041 
00042 // + class declarations
00043 namespace OSB_LIB {
00044     class Address;
00045     class AnCList;
00046     class Associate;
00047 }
00048 
00049 namespace OSB_CORBA {
00050     class ContractAdmin_i;
00051     class AssociateWriter_i;
00052 }
00053 
00054 // ************************************************************************
00055 // namespace extensions
00056 namespace OSB_CORBA {
00057     using corba::common::Utf8String;
00058     using corba::common::OsbCorbaException;
00059     using namespace corba::cadmin::addr;
00060 
00061     class AddressWriter_i :
00062         public virtual POA_corba::cadmin::addr::AddressWriter
00063     {
00064     public :
00065         std::string tmp;
00066         static const std::string IFC;
00067 
00068         // ToDo: replace ancList with AssociateWriter::assocChanged()
00069         //               ContractAdmin_i with Locators to use
00071         AddressWriter_i(
00072                   ContractAdmin_i&    cadmin,
00073                   OSB_LIB::AnCList&   ancList,
00074                   OSB_LIB::Associate* assoc,
00075             const OSB_LIB::Address&   addr,
00076                   bool                tmpServant
00077         );
00078 
00080         ~AddressWriter_i();
00081 
00082     private:
00084         AddressWriter_i(const AddressWriter_i& rhs);
00086         AddressWriter_i& operator=(const AddressWriter_i& rhs);
00087 
00088     public:
00090         const Locators::Key& key() const
00091         {
00092             return key_;
00093         }
00094 
00096         virtual AddrTypeIdSeq* types()
00097             throw (CORBA::SystemException);
00098 
00100         virtual Utf8String* addressee()
00101             throw (CORBA::SystemException);
00102 
00104         virtual Utf8String* street()
00105             throw (CORBA::SystemException);
00106 
00108         virtual Utf8String* city()
00109             throw (CORBA::SystemException);
00110 
00112         virtual Utf8String* state()
00113             throw (CORBA::SystemException);
00114 
00116         virtual Utf8String* zipCode()
00117             throw (CORBA::SystemException);
00118 
00120         virtual Utf8String* country()
00121             throw (CORBA::SystemException);
00122 
00124         virtual Utf8String* telNum ()
00125             throw (CORBA::SystemException);
00126 
00128         virtual Utf8String* email()
00129             throw (CORBA::SystemException);
00130 
00132         virtual Utf8String* faxNum()
00133             throw (CORBA::SystemException);
00134 
00136         virtual Utf8String* function()
00137             throw (CORBA::SystemException);
00138 
00140         virtual void setAddressee(
00141             const Utf8String& newAddressee
00142         ) throw (CORBA::SystemException);
00143 
00145         virtual void setStreet(
00146             const Utf8String& newStreet
00147         ) throw (CORBA::SystemException);
00148 
00150         virtual void setCity(
00151             const Utf8String& newCity
00152         ) throw (CORBA::SystemException);
00153 
00155         virtual void setState(
00156             const Utf8String& newState
00157         ) throw (CORBA::SystemException);
00158 
00160         virtual void setZipCode(
00161             const Utf8String& newZipCode
00162         ) throw (CORBA::SystemException);
00163 
00165         virtual void setCountry(
00166             const Utf8String& newCountry
00167         ) throw (CORBA::SystemException);
00168 
00170         virtual void setTelNum(
00171             const Utf8String& newTelNum
00172         ) throw (CORBA::SystemException);
00173 
00175         virtual void setEmail(
00176             const Utf8String& newEmail
00177         ) throw (CORBA::SystemException);
00178 
00180         virtual void setFaxNum(
00181             const Utf8String& newFaxNum
00182         ) throw (CORBA::SystemException);
00183 
00185         virtual void setFunction(
00186             const Utf8String& newFunction
00187         ) throw (CORBA::SystemException);
00188 
00202         CORBA::Boolean create(
00203             CORBA::Boolean noWait
00204         ) throw (CORBA::SystemException, OsbCorbaException);
00205 
00207         virtual CORBA::Boolean commitChanges(
00208             CORBA::Boolean noWait
00209         ) throw (CORBA::SystemException, OsbCorbaException);
00210 
00211     private:
00217         OSB_LIB::Associate& assoc();
00218 
00219     private:
00221         ContractAdmin_i& cadmin_;
00223         OSB_LIB::AnCList& ancList_;
00224 
00226         OSB_LIB::Associate* assoc_;
00227 
00229         OSB_LIB::Address* addr_;
00230 
00232         bool tmpServant_;
00233 
00235         Locators::Key key_;
00236     };
00237 }                                       // namespace OSB_CORBA
00238 #endif                                 // #ifndef _ADDRESS_I_H_

Generated on Sat Sep 2 14:25:51 2006 for OSB Library by  doxygen 1.4.7