serviceclass-gw.h

Go to the documentation of this file.
00001 // OSB library ********************************************* -*- C++ -*-
00006 /*
00007   AUTHOR(S): Tang Boon Leong (tbl)
00008 
00009   RCS information
00010    $Name: OSB_060808 $
00011    $Revision: 1.37 $
00012 
00013   License
00014    OSB rating and billing library for communication networks
00015    Copyright (C) 2004, 2005, 2006  OSB systems
00016 
00017    This file may be distributed and/or modify under the terms of the
00018    GNU General Public License (GPL) as published by the Free Software
00019    Foundation which is provided in the file LICENSE.GPL included in the
00020    packaging of this file.
00021 
00022    The file is distributed in the hope that it will be useful, but WITHOUT
00023    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00024    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00025    for more details.
00026 
00027    Holders of a OSB Commercial License may use this file under the terms
00028    and conditions of this commercial license.
00029  */
00030 #ifndef _SERVICECLASSGW_H_
00031 #define _SERVICECLASSGW_H_
00032 
00033 // *********************************************************************
00034 // included header files
00035 // + standard includes
00036 
00037 // + local headers
00038 #include "serviceclass.h"
00039 
00040 // *********************************************************************
00041 // class declarations
00042 namespace OSB_DB {
00043     class Session;
00044 }
00045 
00046 // ************************************************************************
00047 // namespace extensions
00048 namespace OSB_DB {
00049 
00050 // *********************************************************************
00051 // class definitions
00052 
00053     // *****************************************************************
00054     // struct ServiceClassGw
00058     struct ServiceClassGw {
00060         friend class OSB_LIB::ServiceClass;
00061 
00073         bool fetch(
00074             const Session&               session,
00075                   OSB_LIB::ServiceClass& sc
00076         );
00077 
00088         long fetch(
00089             const Session&                 session,
00090                   OSB_LIB::ServiceClasses& scs
00091         );
00092 
00093     private:
00109         bool insServiceClass(
00110             const Session&               session,
00111                   OSB_LIB::ServiceClass& sc
00112         );
00113 
00135         bool delServiceClass(
00136             const Session&               session,
00137                   OSB_LIB::ServiceClass& sc
00138         );
00139 
00157         bool updServiceClass(
00158             const Session&               session,
00159                   OSB_LIB::ServiceClass& sc
00160         );
00161 
00174         OSB_LIB::ObjectStatus checkObjVs(
00175             const Session&               session,
00176             const OSB_LIB::ServiceClass& sc
00177         );
00178     };
00179 
00180     // *****************************************************************
00181     // struct ScSystemGw
00185     struct ScSystemGw {
00190         friend class OSB_LIB::ScSystem;
00191 
00203         bool fetch(
00204             const Session&           session,
00205                   OSB_LIB::ScSystem& scs
00206         );
00207 
00218         long fetch(
00219             const Session&            session,
00220                   OSB_LIB::ScSystems& scss
00221         );
00222 
00223     private:
00238         bool insScSystem(
00239             const Session&           session,
00240                   OSB_LIB::ScSystem& scs
00241         );
00242 
00261         bool delScSystem(
00262             const Session&           session,
00263                   OSB_LIB::ScSystem& scs
00264         );
00265 
00280         bool updScSystem(
00281             const Session&           session,
00282                   OSB_LIB::ScSystem& scs
00283         );
00284 
00297         OSB_LIB::ObjectStatus checkObjVs(
00298             const Session&           session,
00299             const OSB_LIB::ScSystem& scs
00300         );
00301     };
00302 
00303     // *****************************************************************
00304     // struct ScsVersionGw
00308     struct ScsVersionGw {
00313         friend class OSB_LIB::ScsVersion;
00314 
00326         bool fetch(
00327             const Session&             session,
00328                   OSB_LIB::ScsVersion& scsVs
00329         );
00330 
00338         bool fetch(
00339             const Session&              session,
00340                   OSB_LIB::ScsVersions& dest
00341         );
00342 
00343     private:
00358         bool insScsVersion(
00359             const Session&             session,
00360                   OSB_LIB::ScsVersion& scsVs
00361         );
00362 
00379         bool delScsVersion(
00380             const Session&             session,
00381                   OSB_LIB::ScsVersion& scsVs
00382         );
00383 
00398         bool updScsVersion(
00399             const Session&             session,
00400                   OSB_LIB::ScsVersion& scsVs
00401         );
00402 
00415         OSB_LIB::ObjectStatus checkObjVs(
00416             const Session&              session,
00417             const OSB_LIB::ScsVersion&  scsVs
00418         );
00419 
00432         bool allRsFreezed(
00433             const Session&                  session,
00434             const OSB_LIB::ScsVersion::Oid& oid,
00435                   OSB_LIB::OsbErrors&       errors
00436         );
00437 
00451         bool serviceTuplesUnique(
00452             const Session&                  session,
00453             const OSB_LIB::ScsVersion::Oid& oid,
00454                   OSB_LIB::OsbErrors&       errors
00455         );
00456 
00469         bool isReleasedInFuture(
00470             const Session&                  session,
00471             const OSB_LIB::ScsVersion::Oid& oid
00472         );
00473 
00485         bool uniqueReleaseTs(
00486             const Session&                session,
00487             const OSB_LIB::ScSystem::Oid& oid,
00488             const OSB_LIB::DateTime&      ts
00489         ) const;
00490 
00503         bool allRsReleased(
00504             const Session&                  session,
00505             const OSB_LIB::ScsVersion::Oid& oid,
00506                   OSB_LIB::OsbErrors&       errors
00507         );
00508 
00522         bool isScSystemUsedByReleasedTsVersion(
00523             const Session&                session,
00524             const OSB_LIB::ScSystem::Oid& oid
00525         );
00526 
00540         bool isScSystemUsedByFreezedTsVersion(
00541             const Session&                session,
00542             const OSB_LIB::ScSystem::Oid& oid
00543         );
00544 
00556         OSB_LIB::DateTime nextReleasedVersion(
00557             const Session&                  session,
00558             const OSB_LIB::ScsVersion::Oid& oid
00559         );
00560 
00571         bool hasOtherReleasedScsVersion(
00572             const Session&                  session,
00573             const OSB_LIB::ScsVersion::Oid& oid
00574         );
00575 
00585         bool findReplacementFreezedScsVersion(
00586             const Session&                  session,
00587             const OSB_LIB::ScsVersion::Oid& oid
00588         );
00589 
00599         void updStatus(
00600             const Session&             session,
00601                   OSB_LIB::ScsVersion& scsVs
00602         );
00603 
00618         bool identicalServiceClasses(
00619             const Session&                  session,
00620             const OSB_LIB::ScsVersion::Oid& oid
00621         );
00622     };
00623 
00624 // *********************************************************************
00625 // inline definitions
00626 
00627 }                                       // namespace OSB_DB
00628 #endif                                  // #ifndef _SERVICECLASSGW_H_

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