ratedservice.h

Go to the documentation of this file.
00001 // OSB library ************************************************ -*- C++ -*-
00007 /*
00008   AUTHOR(S): Stephan Broennimann (vb)
00009 
00010   RCS information
00011    $Name: OSB_060808 $
00012    $Revision: 1.7 $
00013 
00014   License
00015    OSB rating and billing library for communication networks
00016    Copyright (C) 2004, 2005, 2006  OSB systems
00017 
00018    This file may be distributed and/or modify under the terms of the
00019    GNU General Public License (GPL) as published by the Free Software
00020    Foundation which is provided in the file LICENSE.GPL included in the
00021    packaging of this file.
00022 
00023    The file is distributed in the hope that it will be useful, but WITHOUT
00024    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00025    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00026    for more details.
00027 
00028    Holders of a OSB Commercial License may use this file under the terms
00029    and conditions of this commercial license.
00030  */
00031 #ifndef _RATEDSERVICE_H_
00032 #define _RATEDSERVICE_H_
00033 
00034 // ************************************************************************
00035 // included header files
00036 // + standard includes
00037 #include <list>
00038 #include <set>
00039 // + libraries
00040 
00041 // + local headers
00042 #include "tariffobject.h"
00043 #include "service.h"
00044 
00045 // ************************************************************************
00046 // class declarations
00047 namespace OSB_DB {
00048     class RatedServiceGw;
00049 }
00050 
00051 // ************************************************************************
00052 // namespace extensions
00053 namespace OSB_LIB {
00054 
00055 // ************************************************************************
00056 // forward declarations
00057 
00058 // ************************************************************************
00059 // class definitions
00065     class RatedService : public ToNameOnly, public ToCfgBase {
00067         friend class OSB_DB::RatedServiceGw;
00068     public:
00075         typedef Id<RatedService> Oid;
00076     public:
00078         explicit RatedService(const Oid& oid = Oid());
00080         explicit RatedService(const ServiceTuple& st);
00081     public:
00083         const Oid& oid() const;
00085         const ServiceTuple& serviceTuple() const;
00092         void setServiceTuple(
00093             const ServiceTuple& st
00094         );
00096 
00106         bool freeze(
00107             const OSB_DB::Session& session,
00108                   OsbErrors&       msgs
00109         );
00110 
00119         bool release(
00120             const OSB_DB::Session& session,
00121                   OsbErrors&       msgs
00122         );
00123 
00134         bool revoke(
00135             const OSB_DB::Session& session,
00136                   OsbErrors&       msgs
00137         );
00138 
00149         bool unfreeze(
00150             const OSB_DB::Session& session,
00151                   OsbErrors&       errors
00152         );
00153 
00155 
00156 
00162         bool read(const OSB_DB::Session& session);
00169         bool insert(const OSB_DB::Session& session);
00176         bool update(const OSB_DB::Session& session);
00183         bool remove(const OSB_DB::Session& session);
00185     private:
00187         Oid oid_;
00189         ServiceTuple st_;
00190     };                                  // class RatedService
00191 
00192 // ************************************************************************
00193 // type definitions
00195     typedef std::list<RatedService> RatedServices;
00196 }                                       // namespace OSB_LIB
00197 
00198 // ************************************************************************
00199 // inline definitions
00200 namespace OSB_LIB {
00201 }                                       // namespace OSB_LIB
00202 #endif                                  // #ifndef _RATEDSERVICE_H_

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