00001
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef _TRUNKGROUP_I_H_
00040 #define _TRUNKGROUP_I_H_
00041
00042
00043
00044
00045
00046
00047 #include "utf8string.h"
00048
00049 #include "trunkgroupS.h"
00050 #include "numberanalyzer_i.h"
00051 #include "networkmanager_i.h"
00052
00053 namespace OSB_CORBA {
00054 using namespace corba::common;
00055 using namespace corba::nwmgr;
00056 using namespace corba::nwmgr::trk;
00057 using namespace corba::res;
00058
00059
00060
00066 class TrunkGroup_i :
00067 public virtual POA_corba::nwmgr::trk::TrunkGroup
00068 {
00069 public:
00070
00072 static const std::string IFC;
00073
00075 TrunkGroup_i(
00076 NetworkManager_i& nmgri,
00077 const OSB_LIB::NetworkElement::Oid& nweId,
00078 const OSB_LIB::TrunkGroup::Oid& trkId
00079 );
00080
00082 virtual ~TrunkGroup_i();
00083
00091
00093 virtual TrunkGroupId id()
00094 throw (CORBA::SystemException, OsbCorbaException);
00095
00097 virtual NetworkElementId elementId()
00098 throw (CORBA::SystemException, OsbCorbaException);
00099
00101 virtual Utf8String* name()
00102 throw (CORBA::SystemException, OsbCorbaException);
00103
00105 virtual corba::nwmgr::trk::Direction dir()
00106 throw (CORBA::SystemException, OsbCorbaException);
00107
00109 virtual LinkType lkType()
00110 throw (CORBA::SystemException, OsbCorbaException);
00111
00119 virtual NetworkElementId extElementId()
00120 throw (CORBA::SystemException, OsbCorbaException);
00121
00125 virtual NumberAnalyzer_ptr getNumberAnalyzer()
00126 throw (CORBA::SystemException, OsbCorbaException);
00128
00139 virtual TrunkGroupWriter_ptr getWriter()
00140 throw (CORBA::SystemException, OsbCorbaException);
00141
00142 protected:
00158 virtual OSB_LIB::NetworkManager::NetworkRg lockNetwork()
00159 throw (OsbCorbaException);
00160
00177 virtual const OSB_LIB::TrunkGroup* getTrkGroup(
00178 const OSB_LIB::NetworkManager::NetworkRg& guard
00179 ) const throw (OsbCorbaException);
00180
00181 protected:
00183 NetworkManager_i& nmgri_;
00184
00185 private:
00187 const OSB_LIB::NetworkElement::Oid nweId_;
00189 const OSB_LIB::TrunkGroup::Oid trkId_;
00190 };
00191
00192
00193
00199 class TrunkGroupWriter_i :
00200 public virtual POA_corba::nwmgr::trk::TrunkGroupWriter,
00201 public virtual TrunkGroup_i
00202 {
00203 public:
00204
00206 static const std::string IFC;
00207
00209 TrunkGroupWriter_i(
00210 NetworkManager_i& nmgri,
00211 const OSB_LIB::TrunkGroup* trk
00212 );
00213
00215 virtual ~TrunkGroupWriter_i();
00216
00218 void setLoctKey(const Locators::Key& key)
00219 {
00220 loctKey_ = key;
00221 };
00222
00224 virtual void setName(
00225 const Utf8String& name
00226 ) throw (CORBA::SystemException);
00227
00229 virtual void setDirection(
00230 corba::nwmgr::trk::Direction dir
00231 ) throw (CORBA::SystemException);
00232
00234 virtual void setLinkType(
00235 LinkType lkType
00236 ) throw (CORBA::SystemException);
00237
00239 virtual void setExtElement(
00240 const NetworkElementId& extNweId
00241 ) throw (CORBA::SystemException);
00242
00244 virtual void delNumberAnalyzer()
00245 throw (CORBA::SystemException);
00246
00248 virtual NumberAnalyzerWriter_ptr addNewNumberAnalyzer()
00249 throw (CORBA::SystemException);
00250
00252 virtual NumberAnalyzerWriter_ptr getNumberAnalyzerWriter()
00253 throw (CORBA::SystemException, OsbCorbaException);
00254
00263 void saveNumberAnalyzer()
00264 throw (CORBA::SystemException);
00265
00276 virtual TrunkGroupId commitChanges(
00277 CORBA::Boolean noWait
00278 ) throw (CORBA::SystemException, OsbCorbaException);
00279
00280 private:
00288 virtual OSB_LIB::NetworkManager::NetworkRg lockNetwork()
00289 throw (OsbCorbaException);
00290
00300 const OSB_LIB::TrunkGroup* getTrkGroup(
00301 const OSB_LIB::NetworkManager::NetworkRg& guard
00302 ) const throw ();
00303
00304 private:
00306 OSB_LIB::TrunkGroup* trk_;
00308 Locators::Key loctKey_;
00310 Locators::Key analyzerKey_;
00312 bool updAnalyzer_;
00314 OSB_LIB::NumberAnalyzer* analyzer_;
00315 };
00316
00317
00318
00319
00326 OSB_LIB::TrunkGroup::Direction direction(
00327 corba::nwmgr::trk::Direction dir
00328 );
00329
00336 corba::nwmgr::trk::Direction direction(
00337 const OSB_LIB::TrunkGroup::Direction dir
00338 );
00339
00346 OSB_LIB::TrunkGroup::LinkType linkType(LinkType lkType);
00347
00354 LinkType linkType(const OSB_LIB::TrunkGroup::LinkType lkType);
00355
00356 }
00357 #endif // #ifndef _TRUNKGROUP_I_H_