ip4address_i.h

Go to the documentation of this file.
00001 // OSB library ********************************************* -*- C++ -*-
00009 /*
00010   AUTHOR(S): Lilian Qin Lan (lan)
00011 
00012   RCS information
00013    $Name: OSB_060808 $
00014    $Revision: 1.12 $
00015 
00016   License
00017    OSB rating and billing library for communication networks
00018    Copyright (C) 2004, 2005, 2006  OSB systems
00019 
00020    This file may be distributed and/or modify under the terms of the
00021    GNU General Public License (GPL) as published by the Free Software
00022    Foundation which is provided in the file LICENSE.GPL included in the
00023    packaging of this file.
00024 
00025    The file is distributed in the hope that it will be useful, but WITHOUT
00026    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00027    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00028    for more details.
00029 
00030    Holders of a OSB Commercial License may use this file under the terms
00031    and conditions of this commercial license.
00032  */
00033 #ifndef _IP4ADDRESS_I_H_
00034 #define _IP4ADDRESS_I_H_
00035 
00036 // *********************************************************************
00037 // included header files
00038 // + standard includes
00039 
00040 // + local headers
00041 #include "resourcelists.h"
00042 
00043 #include "ip4addressS.h"
00044 #include "resource_i.h"
00045 
00046 // *********************************************************************
00047 // class definitions
00048 namespace OSB_CORBA {
00049     using namespace corba::common;
00050     using namespace corba::nwmgr;
00051     using namespace corba::nwmgr::nw;
00052     using namespace corba::nwmgr::nwe;
00053     using namespace corba::res;
00054 
00055     // *****************************************************************
00056     // class Ip4Address_i
00062     class Ip4Address_i :
00063         public virtual POA_corba::res::Ip4Address,
00064         public virtual Resource_i
00065     {
00066     public:
00068         static const std::string IFC;
00069 
00071         Ip4Address_i(
00072                   NetworkManager_i&       nmgri,
00073             const OSB_LIB::Resource::Oid& oid
00074         );
00075 
00077         virtual ~Ip4Address_i();
00078 
00086 
00087         Utf8String* desc()
00088             throw (CORBA::SystemException, OsbCorbaException);
00089 
00091         CORBA::Boolean canSetGroup()
00092             throw (CORBA::SystemException, OsbCorbaException);
00094 
00096         Ip4AddressWriter_ptr getWriter()
00097             throw (CORBA::SystemException, OsbCorbaException);
00098 
00099     protected:
00101         typedef OSB_LIB::ResourceLists::Ip4List Ip4List;
00102 
00118         virtual Ip4List::Rg lockIp4() const;
00119 
00120         // documentation from base class
00121         ReadGuard lock() const;
00122     };
00123 
00124     // *****************************************************************
00125     // class Ip4AddressWriter_i
00132     class Ip4AddressWriter_i :
00133         public POA_corba::res::Ip4AddressWriter,
00134         public Ip4Address_i,
00135         public ResourceWriter_i
00136     {
00137     public:
00139         static const std::string IFC;
00140 
00142         Ip4AddressWriter_i(
00143                   NetworkManager_i&    nmgri,
00144             const OSB_LIB::Ip4Address& ip4
00145         );
00146 
00148         void setDesc(
00149             const Utf8String& desc
00150         ) throw (CORBA::SystemException);
00151 
00152     private:
00158         Ip4Address_i::Ip4List::Rg lockIp4() const;
00159 
00160         // documentation from base
00161         OSB_LIB::Resource& resource();
00162         // documentation from base
00163         bool writeToList(bool isNew) const;
00164 
00165     private:
00167         OSB_LIB::Ip4Address ip4_;
00168     };
00169 }                                       // namespace OSB_CORBA
00170 #endif                                  // #ifndef _IP4ADDRESS_I_H_

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