00001 // OSB library ********************************************* -*- C++ -*- 00009 /* 00010 AUTHOR(S): Huang Yong Feng (hyf) 00011 00012 RCS information 00013 $Name: OSB_060808 $ 00014 $Revision: 1.10 $ 00015 00016 License 00017 OSB rating and billing library for communication networks 00018 Copyright (C) 2004, 2005, 2006 OSB systems 00019 00020 This file may be distributed and/or modify under the terms of the 00021 GNU General Public License (GPL) as published by the Free Software 00022 Foundation which is provided in the file LICENSE.GPL included in the 00023 packaging of this file. 00024 00025 The file is distributed in the hope that it will be useful, but WITHOUT 00026 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00027 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 00028 for more details. 00029 00030 Holders of a OSB Commercial License may use this file under the terms 00031 and conditions of this commercial license. 00032 */ 00033 #ifndef _ACCESSNUMBER_I_H_ 00034 #define _ACCESSNUMBER_I_H_ 00035 00036 // ********************************************************************* 00037 // included header files 00038 // + standard includes 00039 00040 // + local headers 00041 #include "resourcelists.h" 00042 00043 #include "accessnumberS.h" 00044 #include "resource_i.h" 00045 00046 // ********************************************************************* 00047 // class definitions 00048 namespace OSB_CORBA { 00049 using namespace corba::common; 00050 using namespace corba::nwmgr; 00051 using namespace corba::nwmgr::nw; 00052 using namespace corba::nwmgr::nwe; 00053 using namespace corba::res; 00054 00055 // ***************************************************************** 00056 // class AccessNumber_i 00062 class AccessNumber_i : 00063 public virtual POA_corba::res::AccessNumber, 00064 public virtual Resource_i 00065 { 00066 public: 00068 static const std::string IFC; 00069 00071 AccessNumber_i( 00072 NetworkManager_i& nmgri, 00073 const OSB_LIB::Resource::Oid& oid 00074 ); 00075 00077 virtual ~AccessNumber_i(); 00078 00086 00087 Utf8String* desc() 00088 throw (CORBA::SystemException, OsbCorbaException); 00090 00092 AccessNumberWriter_ptr getWriter() 00093 throw (CORBA::SystemException, OsbCorbaException); 00094 00095 protected: 00097 typedef OSB_LIB::ResourceLists::AnList AnList; 00098 00100 virtual AnList::Rg lockAn() const; 00101 00102 // documentation from base class 00103 ReadGuard lock() const; 00104 }; 00105 00106 // ***************************************************************** 00107 // class AccessNumberWriter_i 00114 class AccessNumberWriter_i : 00115 public POA_corba::res::AccessNumberWriter, 00116 public AccessNumber_i, 00117 public ResourceWriter_i 00118 { 00119 public: 00121 static const std::string IFC; 00122 00124 AccessNumberWriter_i( 00125 NetworkManager_i& nmgri, 00126 const OSB_LIB::AccessNumber& an 00127 ); 00128 00130 void setDesc(const Utf8String& desc) 00131 throw (CORBA::SystemException); 00132 00133 private: 00140 AccessNumber_i::AnList::Rg lockAn() const; 00141 00142 // documentation from base 00143 OSB_LIB::Resource& resource(); 00144 // documentation from base 00145 bool writeToList(bool isNew) const; 00146 00147 private: 00149 OSB_LIB::AccessNumber an_; 00150 }; 00151 } // namespace OSB_CORBA 00152 #endif // #ifndef _ACCESSNUMBER_I_H_