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 _NETWORKELEMENT_I_H_
00031 #define _NETWORKELEMENT_I_H_
00032
00033
00034
00035
00036
00037
00038 #include "utf8string.h"
00039
00040 #include "networkelementS.h"
00041 #include "networkmanager_i.h"
00042 #include "trunkgroup_i.h"
00043
00044
00045
00046 namespace OSB_LIB {
00047 class NetworkElement;
00048 }
00049
00050
00051
00052 namespace OSB_CORBA {
00053 using namespace corba::common;
00054 using namespace corba::nwmgr;
00055 using namespace corba::nwmgr::nwe;
00056 using namespace corba::nwmgr::trk;
00057 using namespace corba::tcat::cp;
00058
00059
00060
00066 class NetworkElement_i :
00067 public virtual POA_corba::nwmgr::nwe::NetworkElement
00068 {
00069 public:
00070
00072 static const std::string IFC;
00073
00075 NetworkElement_i(
00076 NetworkManager_i& nmgri,
00077 const OSB_LIB::NetworkElement::Oid& nweId
00078 );
00079
00081 virtual ~NetworkElement_i();
00082
00090
00092 virtual NetworkElementId id()
00093 throw (CORBA::SystemException, OsbCorbaException);
00094
00096 virtual Utf8String* name()
00097 throw (CORBA::SystemException, OsbCorbaException);
00098
00100 virtual Utf8String* desc()
00101 throw (CORBA::SystemException, OsbCorbaException);
00102
00104 virtual DialledNumType dialledType()
00105 throw (CORBA::SystemException, OsbCorbaException);
00106
00108 virtual ConnectionPtId connectionPt()
00109 throw (CORBA::SystemException, OsbCorbaException);
00110
00112 virtual CORBA::Boolean hasNdc()
00113 throw (CORBA::SystemException, OsbCorbaException);
00114
00116 virtual Utf8String* ndc()
00117 throw (CORBA::SystemException, OsbCorbaException);
00118
00120 virtual TimeZoneId tzId()
00121 throw (CORBA::SystemException, OsbCorbaException);
00122
00124 virtual NumberAnalyzer_ptr getNumberAnalyzer()
00125 throw (CORBA::SystemException, OsbCorbaException);
00127
00129
00130
00131 virtual TrunkGroup_ptr getTrkGroup(
00132 const TrunkGroupId& id
00133 ) throw (CORBA::SystemException, OsbCorbaException);
00134
00136 virtual TrunkGroupSeq* getTrkGroups()
00137 throw (CORBA::SystemException, OsbCorbaException);
00139
00150 virtual NetworkElementWriter_ptr getWriter()
00151 throw (CORBA::SystemException, OsbCorbaException);
00152
00153 protected:
00155 NetworkManager_i& nmgri_;
00156
00157 private:
00173 virtual OSB_LIB::NetworkManager::NetworkRg lockNetwork()
00174 throw (OsbCorbaException);
00175
00191 virtual const OSB_LIB::NetworkElement* getElement(
00192 const OSB_LIB::NetworkManager::NetworkRg& guard
00193 ) const throw (OsbCorbaException);
00194
00195 private:
00197 const OSB_LIB::NetworkElement::Oid nweId_;
00198
00199 };
00200
00201
00202
00209 class NetworkElementWriter_i :
00210 public virtual POA_corba::nwmgr::nwe::NetworkElementWriter,
00211 public virtual NetworkElement_i
00212 {
00213 public:
00214
00216 static const std::string IFC;
00217
00219 NetworkElementWriter_i(
00220 NetworkManager_i& nmgri,
00221 const OSB_LIB::NetworkElement* nwElement
00222 );
00223
00225 virtual ~NetworkElementWriter_i();
00226
00228 void setLoctKey(const Locators::Key& key);
00229
00231 virtual void setName(
00232 const Utf8String& name
00233 ) throw (CORBA::SystemException);
00234
00236 virtual void setDesc(
00237 const Utf8String& desc
00238 ) throw (CORBA::SystemException);
00239
00241 virtual void setDialledType(
00242 DialledNumType type
00243 ) throw (CORBA::SystemException);
00244
00246 virtual void setConnectionPt(
00247 const ConnectionPtId& id
00248 ) throw (CORBA::SystemException);
00249
00251 virtual void setNdc(
00252 const Utf8String& ndc
00253 ) throw (CORBA::SystemException);
00254
00256 virtual void unsetNdc() throw (CORBA::SystemException);
00257
00259 virtual void setTimeZone(
00260 const TimeZoneId& id
00261 ) throw (CORBA::SystemException);
00262
00264 virtual void delNumberAnalyzer()
00265 throw (CORBA::SystemException);
00266
00268 virtual NumberAnalyzerWriter_ptr addNewNumberAnalyzer()
00269 throw (CORBA::SystemException);
00270
00272 virtual NumberAnalyzerWriter_ptr getNumberAnalyzerWriter()
00273 throw (CORBA::SystemException, OsbCorbaException);
00274
00283 void saveNumberAnalyzer()
00284 throw (CORBA::SystemException);
00285
00294 virtual void commitChanges(
00295 CORBA::Boolean noWait
00296 ) throw (CORBA::SystemException, OsbCorbaException);
00297
00298 private:
00307 virtual OSB_LIB::NetworkManager::NetworkRg lockNetwork()
00308 throw (OsbCorbaException);
00309
00318 virtual const OSB_LIB::NetworkElement* getElement(
00319 const OSB_LIB::NetworkManager::NetworkRg& guard
00320 ) const throw (OsbCorbaException);
00321
00322 private:
00324 OSB_LIB::NetworkElement* nwe_;
00326 Locators::Key loctKey_;
00328 Locators::Key analyzerKey_;
00330 bool updAnalyzer_;
00332 OSB_LIB::NumberAnalyzer* analyzer_;
00333 };
00334
00339 OSB_LIB::NetworkElement::DialledNumType numType(
00340 DialledNumType type
00341 );
00342
00347 DialledNumType numType(
00348 OSB_LIB::NetworkElement::DialledNumType type
00349 );
00350 }
00351 #endif // #ifndef _NETWORKELEMENT_I_H_