network-gw.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.23 $
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 _NETWORKGW_H_
00034 #define _NETWORKGW_H_
00035 
00036 // *********************************************************************
00037 // included header files
00038 // + standard includes
00039 #include <string>
00040 
00041 // + local headers
00042 #include "osbconst.h"
00043 #include "network.h"
00044 
00045 // *********************************************************************
00046 // class definitions
00047 namespace OSB_DB {
00048     class Session;
00049 }
00050 
00051 // ************************************************************************
00052 // namespace extensions
00053 namespace OSB_DB {
00054 
00058     class NetworkGw {
00060         friend class OSB_LIB::Network;
00061 
00062     public:
00076         bool fetch(
00077             const Session&          session,
00078                   OSB_LIB::Network& net
00079         );
00080 
00090         long fetch(
00091             const Session&           session,
00092                   OSB_LIB::Networks& netList
00093         );
00094 
00095     private:
00110         bool insert(
00111             const Session&          session,
00112                   OSB_LIB::Network& net
00113         );
00114 
00127         bool update(
00128             const Session&          session,
00129                   OSB_LIB::Network& net
00130         );
00131 
00143         bool remove(
00144             const Session&          session,
00145                   OSB_LIB::Network& net
00146         );
00147 
00160         OSB_LIB::ObjectStatus checkObjVs(
00161             const Session&          session,
00162             const OSB_LIB::Network& net
00163         );
00164     };
00165 
00169     class NetworkElementGw {
00171         friend class OSB_LIB::NetworkElement;
00172     public:
00187         bool fetch(
00188             const Session&                 session,
00189                   OSB_LIB::NetworkElement& element
00190         );
00191 
00202         long fetch(
00203             const Session&                  session,
00204             const OSB_LIB::Network::Oid&    netId,
00205                   OSB_LIB::NetworkElements& elements
00206         );
00207 
00208     private:
00225         bool insert(
00226             const Session&                 session,
00227                   OSB_LIB::NetworkElement& element
00228         );
00229 
00244         bool update(
00245             const Session&                 session,
00246                   OSB_LIB::NetworkElement& element
00247         );
00248 
00261         bool remove(
00262             const Session&                 session,
00263                   OSB_LIB::NetworkElement& element
00264         );
00265 
00278         OSB_LIB::ObjectStatus checkObjVs(
00279             const Session&                 session,
00280             const OSB_LIB::NetworkElement& element
00281         );
00282 
00296         std::auto_ptr<OSB_LIB::NumberAnalyzer> getRelatedNumAnalyzer(
00297             const Session&                 session,
00298                   OSB_LIB::NetworkElement& nwElement
00299         );
00300     };
00301 
00305     class TrunkGroupGw {
00307         TrunkGroupGw(const TrunkGroupGw& rhs);
00309         TrunkGroupGw& operator=(const TrunkGroupGw& rhs);
00311         friend class OSB_LIB::TrunkGroup;
00312     public:
00314         TrunkGroupGw() {}
00315 
00329         bool fetch(
00330             const Session&             session,
00331                   OSB_LIB::TrunkGroup& trkGroup
00332         );
00333 
00342         long fetch(
00343             const Session&                      session,
00344             const OSB_LIB::NetworkElement::Oid& elementId,
00345                   OSB_LIB::TrunkGroups&         trkGroups
00346         );
00347 
00348     private:
00364         bool insert(
00365             const Session&             session,
00366                   OSB_LIB::TrunkGroup& trkGroup
00367         );
00368 
00382         bool update(
00383             const Session&             session,
00384                   OSB_LIB::TrunkGroup& trkGroup
00385         );
00386 
00398         bool remove(
00399             const Session&             session,
00400                   OSB_LIB::TrunkGroup& trkGroup
00401         );
00402 
00416         std::auto_ptr<OSB_LIB::NumberAnalyzer> getRelatedNumAnalyzer(
00417             const Session&             session,
00418                   OSB_LIB::TrunkGroup& trkGroup
00419         );
00420 
00433         OSB_LIB::ObjectStatus checkObjVs(
00434             const Session&             session,
00435             const OSB_LIB::TrunkGroup& trkGroup
00436         );
00437     };
00438 
00439     // *****************************************************************
00440     // class NetworkAddressGw
00444     class NetworkAddressGw {
00445     public:
00447         static const std::string emptyCode;
00448 
00459         bool fetch(
00460             const Session&                     session,
00461                   OSB_LIB::NetworkAddressInfo& dest
00462         );
00463 
00473         void insert(
00474             const Session&                     session,
00475             const OSB_LIB::NetworkAddressInfo& src
00476         );
00477 
00488         void update(
00489             const Session&                     session,
00490             const OSB_LIB::NetworkAddressInfo& src
00491         );
00492 
00501         void remove(
00502             const Session&               session,
00503             const OSB_LIB::Network::Oid& nw
00504         );
00505 
00516         void remove(
00517             const Session&                      session,
00518             const OSB_LIB::NetworkElement::Oid& ne
00519         );
00520     };                                  // class NetworkAddressGw
00521 }                                       // namespace OSB_DB
00522 #endif                                  // #ifndef _NETWORKGW_H_

Generated on Sat Sep 2 14:06:33 2006 for OSB Library by  doxygen 1.4.7