00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef _CONNECTIONPTGW_H_
00031 #define _CONNECTIONPTGW_H_
00032
00033
00034
00035
00036
00037
00038 #include "cptree.h"
00039
00040
00041
00042 namespace OSB_DB {
00043 class Session;
00044 }
00045
00046
00047
00048 namespace OSB_DB {
00049
00050
00051
00052
00053
00054
00058 struct ConnectionPtGw {
00062 friend class OSB_LIB::ConnectionPt;
00063
00076 bool fetch(
00077 const Session& session,
00078 OSB_LIB::ConnectionPt& cp
00079 );
00080
00092 long fetch(
00093 const Session& session,
00094 OSB_LIB::CpTree* cpTree
00095 );
00096
00097 private:
00115 bool insConnectionPt(
00116 const Session& session,
00117 OSB_LIB::ConnectionPt& cp
00118 );
00119
00135 bool delConnectionPt(
00136 const Session& session,
00137 OSB_LIB::ConnectionPt& cp
00138 );
00139
00163 bool updConnectionPt(
00164 const Session& session,
00165 OSB_LIB::ConnectionPt& cp);
00166
00180 OSB_LIB::ObjectStatus checkObjVs(
00181 const Session& session,
00182 const OSB_LIB::ConnectionPt& cp
00183 );
00184
00200 bool isFreezedParent(
00201 const Session& session,
00202 const OSB_LIB::ConnectionPt::Oid& oid
00203 );
00204
00220 bool isReleasedParent(
00221 const Session& session,
00222 const OSB_LIB::ConnectionPt::Oid& oid
00223 );
00224
00239 bool isCpUsedByFreezedCgi(
00240 const Session& session,
00241 const OSB_LIB::ConnectionPt::Oid& oid
00242 );
00243
00258 bool isCpUsedByFreezedE164(
00259 const Session& session,
00260 const OSB_LIB::ConnectionPt::Oid& oid
00261 );
00262
00276 bool isCpUsedByFreezedTzConfig(
00277 const Session& session,
00278 const OSB_LIB::ConnectionPt::Oid& oid
00279 );
00280
00295 bool isCpUsedByReleasedCgi(
00296 const Session& session,
00297 const OSB_LIB::ConnectionPt::Oid& oid
00298 );
00299
00314 bool isCpUsedByReleasedE164(
00315 const Session& session,
00316 const OSB_LIB::ConnectionPt::Oid& oid
00317 );
00318
00332 bool isCpUsedByReleasedTzConfig(
00333 const Session& session,
00334 const OSB_LIB::ConnectionPt::Oid& oid
00335 );
00336
00352 bool hasReleasedParent(
00353 const Session& session,
00354 const OSB_LIB::ConnectionPt::Oid& oid
00355 );
00356
00371 bool noParentConflict(
00372 const Session& session,
00373 const OSB_LIB::ConnectionPt::Oid& oid
00374 );
00375
00389 bool gracePeriodExpired(
00390 const Session& session,
00391 const OSB_LIB::ConnectionPt::Oid& oid
00392 );
00393
00405 void revokeAllParent(
00406 const Session& session,
00407 const OSB_LIB::ConnectionPt::Oid& oid
00408 );
00409
00420 void updStatus(
00421 const Session& session,
00422 OSB_LIB::ConnectionPt& cp
00423 );
00424
00442 bool parentCoverWholeChildReleasedPeriod(
00443 const Session& session,
00444 const OSB_LIB::ConnectionPt::Oid& oid,
00445 OSB_LIB::OsbErrors& errors
00446 );
00447
00464 bool allChildReleasedPeriodCovered(
00465 const Session& session,
00466 const OSB_LIB::ConnectionPt::Oid& oid
00467 );
00468
00486 bool allTzConfigReleasedPeriodCovered(
00487 const Session& session,
00488 const OSB_LIB::ConnectionPt::Oid& oid
00489 );
00490
00506 bool allCgisValid(
00507 const Session& session,
00508 const OSB_LIB::ConnectionPt::Oid& oid
00509 );
00510
00526 bool allE164sValid(
00527 const Session& session,
00528 const OSB_LIB::ConnectionPt::Oid& oid
00529 );
00530 };
00531
00532
00533
00534
00535
00536 }
00537 #endif // #ifndef _CONNECTIONPTGW_H_