connectionpt-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.21 $
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 _CONNECTIONPTGW_H_
00031 #define _CONNECTIONPTGW_H_
00032 
00033 // *********************************************************************
00034 // included header files
00035 // + standard includes
00036 
00037 // + local headers
00038 #include "cptree.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 ConnectionPtGw
00058     struct ConnectionPtGw {
00062         friend class OSB_LIB::ConnectionPt;
00063 
00076         bool fetch(
00077             const Session&               session,
00078                   OSB_LIB::ConnectionPt& cp
00079         );
00080 
00092         long fetch(
00093             const Session&         session,
00094                   OSB_LIB::CpTree* cpTree
00095         );
00096 
00097         private:
00115         bool insConnectionPt(
00116             const Session&               session,
00117                   OSB_LIB::ConnectionPt& cp
00118         );
00119 
00135         bool delConnectionPt(
00136             const Session&               session,
00137                   OSB_LIB::ConnectionPt& cp
00138         );
00139 
00163         bool updConnectionPt(
00164             const Session&               session,
00165                   OSB_LIB::ConnectionPt& cp);
00166 
00180         OSB_LIB::ObjectStatus checkObjVs(
00181             const Session&               session,
00182             const OSB_LIB::ConnectionPt& cp
00183         );
00184 
00200         bool isFreezedParent(
00201             const Session&                    session,
00202             const OSB_LIB::ConnectionPt::Oid& oid
00203         );
00204 
00220         bool isReleasedParent(
00221             const Session&                    session,
00222             const OSB_LIB::ConnectionPt::Oid& oid
00223         );
00224 
00239         bool isCpUsedByFreezedCgi(
00240             const Session&                    session,
00241             const OSB_LIB::ConnectionPt::Oid& oid
00242         );
00243 
00258         bool isCpUsedByFreezedE164(
00259             const Session&                    session,
00260             const OSB_LIB::ConnectionPt::Oid& oid
00261         );
00262 
00276         bool isCpUsedByFreezedTzConfig(
00277             const Session&                    session,
00278             const OSB_LIB::ConnectionPt::Oid& oid
00279         );
00280 
00295         bool isCpUsedByReleasedCgi(
00296             const Session&                    session,
00297             const OSB_LIB::ConnectionPt::Oid& oid
00298         );
00299 
00314         bool isCpUsedByReleasedE164(
00315             const Session&                    session,
00316             const OSB_LIB::ConnectionPt::Oid& oid
00317         );
00318 
00332         bool isCpUsedByReleasedTzConfig(
00333             const Session&                    session,
00334             const OSB_LIB::ConnectionPt::Oid& oid
00335         );
00336 
00352         bool hasReleasedParent(
00353             const Session&                    session,
00354             const OSB_LIB::ConnectionPt::Oid& oid
00355         );
00356 
00371         bool noParentConflict(
00372             const Session&                    session,
00373             const OSB_LIB::ConnectionPt::Oid& oid
00374         );
00375 
00389         bool gracePeriodExpired(
00390             const Session&                    session,
00391             const OSB_LIB::ConnectionPt::Oid& oid
00392         );
00393 
00405         void revokeAllParent(
00406             const Session&                    session,
00407             const OSB_LIB::ConnectionPt::Oid& oid
00408         );
00409 
00420         void updStatus(
00421             const Session&               session,
00422                   OSB_LIB::ConnectionPt& cp
00423         );
00424 
00442         bool parentCoverWholeChildReleasedPeriod(
00443             const Session&                    session,
00444             const OSB_LIB::ConnectionPt::Oid& oid,
00445                   OSB_LIB::OsbErrors&         errors
00446         );
00447 
00464         bool allChildReleasedPeriodCovered(
00465             const Session&                    session,
00466             const OSB_LIB::ConnectionPt::Oid& oid
00467         );
00468 
00486         bool allTzConfigReleasedPeriodCovered(
00487             const Session&                    session,
00488             const OSB_LIB::ConnectionPt::Oid& oid
00489         );
00490 
00506         bool allCgisValid(
00507             const Session&                    session,
00508             const OSB_LIB::ConnectionPt::Oid& oid
00509         );
00510 
00526         bool allE164sValid(
00527             const Session&                    session,
00528             const OSB_LIB::ConnectionPt::Oid& oid
00529         );
00530     };
00531 
00532 
00533 // *********************************************************************
00534 // inline definitions
00535 
00536 }                                       // namespace OSB_DB
00537 #endif                                  // #ifndef _CONNECTIONPTGW_H_

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