recordstream-gw.h

Go to the documentation of this file.
00001 // OSB library ********************************************* -*- C++ -*-
00014 /*
00015   AUTHOR(S): Manikandan (mk)
00016 
00017   RCS information
00018    $Name: OSB_060808 $
00019    $Revision: 1.27 $
00020 
00021   License
00022    OSB rating and billing library for communication networks
00023    Copyright (C) 2004, 2005, 2006  OSB systems
00024 
00025    This file may be distributed and/or modify under the terms of the
00026    GNU General Public License (GPL) as published by the Free Software
00027    Foundation which is provided in the file LICENSE.GPL included in the
00028    packaging of this file.
00029 
00030    The file is distributed in the hope that it will be useful, but WITHOUT
00031    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00032    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00033    for more details.
00034 
00035    Holders of a OSB Commercial License may use this file under the terms
00036    and conditions of this commercial license.
00037  */
00038 #ifndef _RECORDSTREAMGW_H_
00039 #define _RECORDSTREAMGW_H_
00040 
00041 // *********************************************************************
00042 // included header files
00043 // + standard includes
00044 
00045 // + local headers
00046 #include "recordstream.h"
00047 
00048 // *********************************************************************
00049 // namespace extensions
00050 namespace OSB_LIB {
00051     class RecordStreams;
00052     class RecordStreamFilter;
00053 }
00054 
00055 namespace OSB_DB {
00056     class Session;
00057 }
00058 
00059 // *********************************************************************
00060 // namespace extensions
00061 namespace OSB_DB {
00062 
00063 // *********************************************************************
00064 // class definitions
00069     struct RecordSourceGw {
00070     public:
00081         bool fetchById(
00082             const Session&               session,
00083                   OSB_LIB::RecordSource& rs
00084         );
00085 
00097         bool fetchByFormat(
00098             const Session&               session,
00099                   OSB_LIB::RecordSource& rs
00100         );
00101 
00114         long fetch(
00115             const Session&                session,
00116                   OSB_LIB::RecordSources& dest,
00117                   OSB_LIB::ModuleId       generator = OSB_LIB::mdAll
00118         );
00119     };
00120 
00125     struct RecordStreamGw {
00130         friend class OSB_LIB::RecordStreamInfo;
00131     public:
00144         bool fetch(
00145             const Session&                        session,
00146                   OSB_LIB::RecordStreamInfo&      rs
00147         );
00148 
00156         void fetchFiltered(
00157             const Session&                     session,
00158                   OSB_LIB::RecordStreams&      dest,
00159             const OSB_LIB::RecordStreamFilter& filter
00160         );
00161 
00171         void fetchOthers(
00172             const Session&                session,
00173                   OSB_LIB::RecordStreams& dest
00174         );
00175 
00191         bool getNext(
00192             const OSB_DB::Session&              session,
00193                   OSB_LIB::RecordStreamInfo&    dest,
00194                   OSB_LIB::ModuleId             processor,
00195                   OSB_LIB::RecordStream::Status status
00196         );
00197 
00214         bool getNext(
00215             const OSB_DB::Session&              session,
00216                   OSB_LIB::RecordStreamInfo&    dest,
00217                   OSB_LIB::ModuleId             processor,
00218             const OSB_LIB::RecordSource::Oid&   srcId,
00219                   OSB_LIB::RecordStream::Status status
00220         );
00221 
00238         bool getNext(
00239             const OSB_DB::Session&              session,
00240                   OSB_LIB::RecordStreamInfo&    dest,
00241             const std::string&                  format,
00242                   OSB_LIB::ModuleId             processor,
00243                   OSB_LIB::RecordStream::Status status
00244         );
00245 
00246     private:
00259         bool insert(
00260             const Session&                   session,
00261                   OSB_LIB::RecordStreamInfo& rs
00262         );
00263 
00276         bool update(
00277             const Session&                   session,
00278                   OSB_LIB::RecordStreamInfo& rs
00279         );
00280 
00291         bool remove(
00292             const Session&                   session,
00293                   OSB_LIB::RecordStreamInfo& rs
00294         );
00295 
00306         bool setProcessing(
00307             const Session&                        session,
00308             const OSB_LIB::RecordStreamInfo::Oid& rsId
00309         );
00310 
00319         bool setStatus(
00320             const Session&                      session,
00321             const OSB_LIB::RecordStreamInfo&    rs,
00322                   OSB_LIB::RecordStream::Status status
00323         );
00324 
00333         OSB_LIB::ObjectStatus checkObjVs(
00334             const Session&                   session,
00335             const OSB_LIB::RecordStreamInfo& rs
00336         );
00337 
00347         OSB_LIB::ObjectStatus lock(
00348             const Session&                   session,
00349                   OSB_LIB::RecordStreamInfo& rs
00350         );
00351     };
00352 }                                       // namespace OSB_DB
00353 #endif                                  // #ifndef _RECORDSTREAMGW_H_

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