tariffsystem-gw.h

Go to the documentation of this file.
00001 // OSB library ********************************************* -*- C++ -*-
00009 /*
00010   AUTHOR(S): Wang Peng (wp)
00011 
00012   RCS information
00013    $Name: OSB_060808 $
00014    $Revision: 1.122 $
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 _TARIFFSYSTEMGW_H_
00034 #define _TARIFFSYSTEMGW_H_
00035 
00036 // *********************************************************************
00037 // Included header files
00038 // + standard includes
00039 
00040 // + local headers
00041 #include "tariffsystem.h"
00042 
00043 // *********************************************************************
00044 // class declarations
00045 namespace OSB_DB {
00046     class Session;
00047 }
00048 
00049 // ************************************************************************
00050 // namespace extensions
00051 namespace OSB_DB {
00052 
00053 // *********************************************************************
00054 // class definitions
00055 
00056     // *****************************************************************
00057     // class TariffSystemGw
00061     class TariffSystemGw {
00062     public:
00070         long getGracePeriod(
00071             const Session&          session,
00072             const OSB_LIB::ModuleId module
00073         );
00074 
00085         bool fetch(
00086             const Session&                session,
00087                   OSB_LIB::TariffSystems& tss
00088         );
00089 
00100         bool fetch(
00101             const Session&               session,
00102                   OSB_LIB::TariffSystem& ts
00103         );
00104 
00119         bool insTariffSystem(
00120             const Session&               session,
00121                   OSB_LIB::TariffSystem& ts
00122         );
00123 
00139         bool delTariffSystem(
00140             const Session&               session,
00141                   OSB_LIB::TariffSystem& ts
00142         );
00143 
00161         bool updTariffSystem(
00162             const Session&               session,
00163                   OSB_LIB::TariffSystem& ts
00164         );
00165 
00177         OSB_LIB::ObjectStatus checkObjVs(
00178             const Session&               session,
00179             const OSB_LIB::TariffSystem& ts
00180         );
00181 
00182         // *****************************************
00183         // TARIFF_OBJECT_LOCK
00204         bool lock(
00205             const Session& session,
00206             const long     lockId,
00207                   bool     nowait = true
00208         );
00209     };
00210 
00211     // *****************************************************************
00212     // struct TsVersionGw
00216     struct TsVersionGw {
00228         void fetch(
00229             const Session&             session,
00230                   OSB_LIB::TsVersions& tsvs
00231         );
00232 
00243         bool fetch(
00244             const Session&            session,
00245                   OSB_LIB::TsVersion& tsVs
00246         );
00247 
00257         void lock(
00258             const Session&            session,
00259                   OSB_LIB::TsVersion* tsVs
00260         );
00261 
00274         bool insert(
00275             const Session&            session,
00276                   OSB_LIB::TsVersion* tsVs
00277         );
00278 
00294         bool updAttr(
00295             const Session&            session,
00296             const OSB_LIB::TsVersion& tsVs
00297         );
00298 
00305         void updCfg(
00306             const Session&            session,
00307             const OSB_LIB::TsVersion& tsVs
00308         );
00309 
00317         bool updStatus(
00318             const Session&            session,
00319             const OSB_LIB::TsVersion& tsVs
00320         );
00321 
00329         bool remove(
00330             const Session&            session,
00331                   OSB_LIB::TsVersion* tsVs
00332         );
00334 
00336 
00337 
00344         void insCfg(
00345             const Session&            session,
00346             const OSB_LIB::TsVersion& tsVs
00347         );
00355         void delCfg(
00356             const Session&            session,
00357             const OSB_LIB::TsVersion& tsVs
00358         );
00369         void checkObjVs(
00370             const Session&            session,
00371             const OSB_LIB::TsVersion& tsVs
00372         );
00374 
00376 
00377 
00385         void oneScSystem(
00386             const Session&                 session,
00387             const OSB_LIB::TsVersion::Oid& tsVs,
00388                   OSB_LIB::OsbErrors&      errors
00389         );
00390 
00403         void allScsFreezed(
00404             const Session&                    session,
00405             const OSB_LIB::TsVersion::ScsOid& scsOid,
00406                   OSB_LIB::OsbErrors&         errors
00407         );
00408 
00422         void allTcsFreezed(
00423             const Session&                 session,
00424             const OSB_LIB::TsVersion::Oid& tsVs,
00425                   OSB_LIB::OsbErrors&      errors
00426         );
00427 
00441         void allTpsFreezed(
00442             const Session&                 session,
00443             const OSB_LIB::TsVersion::Oid& tsVs,
00444                   OSB_LIB::OsbErrors&      errors
00445         );
00446 
00460         void allTfFreezed(
00461             const Session&                 session,
00462             const OSB_LIB::TsVersion::Oid& tsVs,
00463                   OSB_LIB::OsbErrors&      errors
00464         );
00465 
00482         void allScConfigured(
00483             const Session&                 session,
00484             const OSB_LIB::TsVersion::Oid& tsVs,
00485                   OSB_LIB::OsbErrors&      errors
00486         );
00487 
00505         void allTcConfigured(
00506             const Session&                 session,
00507             const OSB_LIB::TsVersion::Oid& tsVs,
00508                   OSB_LIB::OsbErrors&      errors
00509         );
00510 
00530         void allTcTpConfigured(
00531             const Session&                        session,
00532             const OSB_LIB::TsVersion::Oid&        tsVs,
00533             const OSB_LIB::TsVersion::RatingType& type,
00534                   OSB_LIB::OsbErrors&             errors
00535         );
00537 
00539 
00540 
00548         bool releaseTsUnique(
00549             const Session&            session,
00550             const OSB_LIB::TsVersion& tsVs
00551         );
00561         void scsReleased(
00562             const Session&                 session,
00563             const OSB_LIB::TsVersion::Oid& tsVs,
00564                   OSB_LIB::OsbErrors&      errors
00565         );
00566 
00578         void tcsReleased(
00579             const Session&                 session,
00580             const OSB_LIB::TsVersion::Oid& tsVs,
00581                   OSB_LIB::OsbErrors&      errors
00582         );
00583 
00594         void tpsReleased(
00595             const Session&                 session,
00596             const OSB_LIB::TsVersion::Oid& tsVs,
00597                   OSB_LIB::OsbErrors&      errors
00598         );
00599 
00611         void tfReleased(
00612             const Session&                 session,
00613             const OSB_LIB::TsVersion::Oid& tsVs,
00614                   OSB_LIB::OsbErrors&      errors
00615         );
00617 
00619 
00620 
00628         OSB_LIB::DateTime nextReleasedVersion(
00629             const Session&                 session,
00630             const OSB_LIB::TsVersion::Oid& tsVs
00631         );
00633     };                                  // struct TsVersionGw
00634 
00635 
00636 // *********************************************************************
00637 // inline definitions
00638 
00639 }                                       // namespace OSB_DB
00640 #endif                                  // #ifndef _TARIFFSYSTEMGW_H_

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