deviceitem-gw.h

Go to the documentation of this file.
00001 // OSB library ************************************************ -*- C++ -*-
00006 /*
00007   AUTHOR(S): Stephan Broennimann (vb)
00008 
00009   RCS information
00010    $Name: OSB_060808 $
00011    $Revision: 1.4 $
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 _DEVICEITEMGW_H_
00031 #define _DEVICEITEMGW_H_
00032 
00033 // ************************************************************************
00034 // included header files
00035 // + standard includes
00036 
00037 // + libraries
00038 
00039 // + local headers
00040 #include "osbid.h"
00041 
00042 // + class declarations
00043 namespace OSB_DB {
00044     class Session;
00045 }
00046 
00047 namespace OSB_LIB {
00048     class DateTime;
00049     class Device;
00050     class DeviceItem;
00051     class PersDevice;
00052 }
00053 
00054 // ************************************************************************
00055 // namespace extensions
00056 namespace OSB_DB {
00057 
00058 // ************************************************************************
00059 // forward declarations
00060 
00061 // ************************************************************************
00062 // type definitions
00063 
00064 // ************************************************************************
00065 // class definitions
00066 
00067     // *****************************************************************
00068     // class DeviceItemGw
00072     class DeviceItemGw {
00074         DeviceItemGw(const DeviceItemGw&);
00076         DeviceItemGw& operator=(const DeviceItemGw&);
00077 
00078     public:
00080         DeviceItemGw();
00081 
00089         bool fetch(
00090             const Session&             session,
00091                   OSB_LIB::DeviceItem& dvcItem
00092         );
00093 
00101         bool insert(
00102             const Session&             session,
00103             const OSB_LIB::DeviceItem& dvcItem
00104         );
00105 
00113         bool update(
00114             const Session&             session,
00115             const OSB_LIB::DeviceItem& dvcItem
00116         );
00117 
00125         bool remove(
00126             const Session&             session,
00127             const OSB_LIB::DeviceItem& dvcItem
00128         );
00129     };                                  // class DeviceItemGw
00130 
00136     class PersDeviceGw {
00138         friend class OSB_LIB::PersDevice;
00139 
00140     private:
00142         PersDeviceGw();
00152         OSB_LIB::Id<OSB_LIB::Device> getDvcId(
00153             const Session&             session,
00154             const OSB_LIB::PersDevice& pd
00155         );
00156 
00165         bool link(
00166             const Session&                      session,
00167             const OSB_LIB::PersDevice&          pd,
00168             const OSB_LIB::Id<OSB_LIB::Device>& dvcId
00169         );
00170 
00181         void checkOverlap(
00182             const Session&             session,
00183             const OSB_LIB::PersDevice& pd,
00184             const OSB_LIB::DateTime&   from,
00185             const OSB_LIB::DateTime&   to
00186         );
00187     };                                  // class PersDeviceGw
00188 }                                       // namespace OSB_DB
00189 
00190 // ************************************************************************
00191 // inline definitions
00192 namespace OSB_DB {
00193     inline DeviceItemGw::DeviceItemGw()
00194     {
00195         // empty
00196     }
00197 
00198     inline PersDeviceGw::PersDeviceGw()
00199     {
00200         // empty
00201     }
00202 }                                       // namespace OSB_DB
00203 #endif                                  // #ifndef _DEVICEITEMGW_H_

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