00001
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef _TRUNKRESOURCEGW_H_
00033 #define _TRUNKRESOURCEGW_H_
00034
00035
00036
00037
00038
00039
00040 #include "resourcefwd.h"
00041 #include "trunkresource.h"
00042
00043
00044
00045 namespace OSB_DB {
00046 class Session;
00047 }
00048
00049 namespace OSB_LIB {
00050 template<typename I> class Id;
00051 class Network;
00052 }
00053
00054
00055
00056 namespace OSB_DB {
00057
00058
00059
00060
00061
00062
00066 class TrunkResourceGw {
00068 friend class OSB_LIB::TrunkResource;
00070 typedef
00071 OSB_LIB::ResourceList<OSB_LIB::TrunkResource> TrList;
00073 typedef OSB_LIB::Id<OSB_LIB::Network> NwOid;
00074 public:
00090 void fetch(
00091 const Session& session,
00092 TrList& dest,
00093 const NwOid& nwId,
00094 bool availOnly
00095 );
00096 private:
00098 bool read(
00099 const Session& session,
00100 OSB_LIB::TrunkResource& tr
00101 ) const;
00102
00104 bool insert(
00105 const Session& session,
00106 const OSB_LIB::TrunkResource& tr
00107 ) const;
00108
00110 bool update(
00111 const Session& session,
00112 const OSB_LIB::TrunkResource& tr
00113 ) const;
00114
00124 bool remove(
00125 const Session& session,
00126 const OSB_LIB::TrunkResource& tr
00127 ) const;
00128
00140 bool insTrkGroup(
00141 const Session& session,
00142 const OSB_LIB::TrunkResource::Oid& trId,
00143 const OSB_LIB::TrunkResource::AssignedTrunk& assignedTg
00144 ) const;
00145
00157 bool updTrkGroup(
00158 const Session& session,
00159 const OSB_LIB::TrunkResource::Oid& trId,
00160 const OSB_LIB::Id<OSB_LIB::TrunkGroup>& tgId
00161 ) const;
00162
00163 };
00164
00165
00166
00167
00168 }
00169 #endif // #ifndef _TRUNKRESOURCEGW_H_