00001
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef _RECORDSTREAMGW_H_
00039 #define _RECORDSTREAMGW_H_
00040
00041
00042
00043
00044
00045
00046 #include "recordstream.h"
00047
00048
00049
00050 namespace OSB_LIB {
00051 class RecordStreams;
00052 class RecordStreamFilter;
00053 }
00054
00055 namespace OSB_DB {
00056 class Session;
00057 }
00058
00059
00060
00061 namespace OSB_DB {
00062
00063
00064
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 }
00353 #endif // #ifndef _RECORDSTREAMGW_H_