network_i.h

Go to the documentation of this file.
00001 // OSB library ********************************************* -*- C++ -*-
00008 /*
00009   AUTHOR(S): Huang Yong Feng (hyf)
00010 
00011   RCS information
00012    $Name: OSB_060808 $
00013    $Revision: 1.9 $
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 _NETWORK_I_H_
00033 #define _NETWORK_I_H_
00034 
00035 // *********************************************************************
00036 // included header files
00037 // + standard includes
00038 
00039 // + local headers
00040 #include "utf8string.h"
00041 
00042 #include "networkS.h"
00043 #include "networkmanager_i.h"
00044 #include "networkelement_i.h"
00045 
00046 // *********************************************************************
00047 // class declarations
00048 namespace OSB_LIB {
00049     class Network;
00050 }
00051 
00052 // *********************************************************************
00053 // class definitions
00054 namespace OSB_CORBA {
00055     using namespace corba::common;
00056     using namespace corba::nwmgr;
00057     using namespace corba::nwmgr::nw;
00058     using namespace corba::nwmgr::nwe;
00059     using namespace corba::tcat::cp;
00060 
00061     // *****************************************************************
00062     // class Network_i
00068 
00069     class Network_i : public virtual POA_corba::nwmgr::nw::Network
00070     {
00071     public:
00072 
00074         static const std::string IFC;
00075 
00077         Network_i(
00078                   NetworkManager_i&          nmgri,
00079             const OSB_LIB::Network::Oid& nwId
00080         );
00081 
00083         virtual ~Network_i();
00084 
00092 
00094         virtual NetworkId id()
00095             throw (CORBA::SystemException, OsbCorbaException);
00096 
00098         virtual Utf8String* name()
00099             throw (CORBA::SystemException, OsbCorbaException);
00100 
00102         virtual Utf8String* desc()
00103             throw (CORBA::SystemException, OsbCorbaException);
00104 
00106         virtual ConnectionPtId connectionPt()
00107             throw (CORBA::SystemException, OsbCorbaException);
00108 
00110         virtual NwAddrInfo* addrInfo()
00111             throw (CORBA::SystemException, OsbCorbaException);
00112 
00114         virtual TimeZoneId tzId()
00115             throw (CORBA::SystemException, OsbCorbaException);
00117 
00119 
00120 
00122         virtual NetworkElement_ptr getElement(
00123             const NetworkElementId& id
00124         ) throw (CORBA::SystemException, OsbCorbaException);
00125 
00127         virtual NetworkElementSeq* getElements()
00128             throw (CORBA::SystemException, OsbCorbaException);
00129 
00131 
00141         virtual NetworkWriter_ptr getWriter()
00142             throw (CORBA::SystemException, OsbCorbaException);
00143 
00144     private:
00163         virtual OSB_LIB::NetworkManager::NetworkRg lockNetwork()
00164             throw (OsbCorbaException);
00165 
00166     protected:
00168         NetworkManager_i& nmgri_;
00169 
00170     private:
00172         const OSB_LIB::Network::Oid nwId_;
00173 
00174     };                                  // class Network_i
00175 
00176     // *****************************************************************
00177     // class NetworkWriter_i
00183     class NetworkWriter_i :
00184         public virtual POA_corba::nwmgr::nw::NetworkWriter,
00185         public virtual Network_i
00186     {
00187     public:
00188 
00190         static const std::string IFC;
00191 
00193         NetworkWriter_i(
00194                   NetworkManager_i&     nmgri,
00195             const OSB_LIB::Network* network
00196         );
00197 
00199         virtual ~NetworkWriter_i()
00200         {
00201             delete nw_;
00202         };
00203 
00205         void setLoctKey(const Locators::Key& key)
00206         {
00207             loctKey_ = key;
00208         }
00209 
00211         virtual void setName(
00212             const Utf8String& name
00213         ) throw (CORBA::SystemException);
00214 
00216         virtual void setDesc(
00217             const Utf8String& desc
00218         ) throw (CORBA::SystemException);
00219 
00221         virtual void setConnectionPt(
00222             const ConnectionPtId& id
00223         ) throw (CORBA::SystemException);
00224 
00226         virtual void setNwAddrInfo(
00227             const NwAddrInfo& addrInfo
00228         ) throw (CORBA::SystemException);
00229 
00231         virtual void setTimeZone(
00232             const TimeZoneId& id
00233         ) throw (CORBA::SystemException);
00234 
00242         virtual void commitChanges(
00243             CORBA::Boolean noWait
00244         ) throw (CORBA::SystemException, OsbCorbaException);
00245 
00246     private:
00255         virtual OSB_LIB::NetworkManager::NetworkRg lockNetwork()
00256             throw(OSB_CORBA::OsbCorbaException);
00257 
00258     private:
00259         OSB_LIB::Network* nw_;       
00260         Locators::Key     loctKey_;  
00261 
00262     };                                  // class NetworkWriter_i
00263 
00264 }                                       // namespace OSB_CORBA
00265 #endif                                  // #ifndef _NETWORK_I_H_

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