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 _DVCRSRCMGR_I_H_
00031 #define _DVCRSRCMGR_I_H_
00032
00033
00034
00035
00036
00037
00038 #include <mutex.h>
00039
00040
00041 #include "dvcrsrcmgrS.h"
00042 #include "servantlocators.h"
00043
00044
00045 namespace OSB_CORBA {
00046 class NetworkManager_i;
00047 }
00048
00049 namespace OSB_LIB {
00050 class Device;
00051 class UimCard;
00052 class UimCardList;
00053 }
00054
00055
00056
00057 namespace OSB_CORBA {
00058 using corba::common::OsbCorbaException;
00059 using corba::dvc::DeviceId;
00060 using corba::dvc::DeviceIds;
00061 using corba::dvc::UimCardFilter;
00062 using corba::dvc::UimCard;
00063 using corba::dvc::UimCardWriter;
00064 using corba::imgmt::DvcRsrcMgr;
00065
00066
00067
00068
00069
00070
00071
00072
00073
00084 class DvcRsrcMgr_i : public POA_corba::imgmt::DvcRsrcMgr {
00085 public:
00087 static const std::string IFC;
00088 public:
00095 explicit DvcRsrcMgr_i(
00096 NetworkManager_i& nmgr
00097 );
00099 ~DvcRsrcMgr_i();
00100
00101 private:
00103 DvcRsrcMgr_i(const DvcRsrcMgr_i&);
00105 DvcRsrcMgr_i& operator=(const DvcRsrcMgr_i&);
00106
00107 public:
00113 void ping() throw();
00115 void destroy () throw();
00116
00118
00119
00120 UimCardFilter* getUimFilter() throw();
00121
00123 void setUimFilter(
00124 const UimCardFilter& filter
00125 ) throw();
00134 void searchUims(
00135 const UimCardFilter& filter
00136 ) throw (OsbCorbaException);
00143 void refreshUimCards()
00144 throw (OsbCorbaException);
00148 DeviceIds* getUimCards()
00149 throw (OsbCorbaException);
00157 UimCard* getUimCard(
00158 const DeviceId& uimId
00159 ) throw (OsbCorbaException);
00167 UimCardWriter* getUimCardWriter(
00168 const DeviceId& uimId
00169 ) throw (OsbCorbaException);
00171
00172 public:
00174 Locators::Key loctKey() const;
00175
00177 typedef OSB_LIB::ReadGuard<OSB_LIB::UimCard*> UimCardRg;
00178
00180 UimCardRg lockUim(
00181 const OSB_LIB::Id<OSB_LIB::Device>& uimId
00182 ) const;
00183
00185 void replaceUim(
00186 const OSB_LIB::UimCard& uim
00187 );
00188
00189 private:
00191 OSB_LIB::UimCardList& uims();
00193 const OSB_LIB::UimCardList& uims() const;
00195 void initUimFilter();
00196
00197 private:
00199 mutable OSB_LIB::UimCardList* uimCards_;
00201 UimCardFilter uimFilter_;
00202
00204 mutable OSB_LIB::RwMutex mutex_;
00205
00206 private:
00212 NetworkManager_i& nmgr_;
00214 Locators::Key loctKey_;
00215 };
00216 }
00217
00218
00219
00220 namespace OSB_CORBA {
00221 }
00222 #endif // #ifndef _DVCRSRCMGR_I_H_