dvcrsrcmgr_i.h

Go to the documentation of this file.
00001 // OSB library ************************************************ -*- C++ -*-
00006 /*
00007   AUTHOR(S): Stephan Broennimann (vb)
00008 
00009   RCS information
00010    $Name: OSB_060808 $
00011    $Revision: 1.7 $
00012 
00013   License
00014    OSB rating and billing library for communication networks
00015    Copyright (C) 2004, 2005, 2006  OSB systems
00016 
00017    This file may be distributed and/or modify under the terms of the
00018    GNU General Public License (GPL) as published by the Free Software
00019    Foundation which is provided in the file LICENSE.GPL included in the
00020    packaging of this file.
00021 
00022    The file is distributed in the hope that it will be useful, but WITHOUT
00023    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00024    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00025    for more details.
00026 
00027    Holders of a OSB Commercial License may use this file under the terms
00028    and conditions of this commercial license.
00029  */
00030 #ifndef _DVCRSRCMGR_I_H_
00031 #define _DVCRSRCMGR_I_H_
00032 
00033 // ************************************************************************
00034 // included header files
00035 // + standard includes
00036 
00037 // + libraries
00038 #include <mutex.h>
00039 
00040 // + local headers
00041 #include "dvcrsrcmgrS.h"
00042 #include "servantlocators.h"
00043 
00044 // + class declarations
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 // namespace extensions
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 // forward declarations
00068 
00069 // ************************************************************************
00070 // type definitions
00071 
00072 // ************************************************************************
00073 // class definitions
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:                             // CORBA interface
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:                             // utiltities
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:                            // device and resource data
00191         OSB_LIB::UimCardList& uims();
00193         const OSB_LIB::UimCardList& uims() const;
00195         void initUimFilter();
00196 
00197     private:                            // device and resource data
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     };                                  // class DvcRsrcMgr_i
00216 }                                       // namespace OSB_CORBA
00217 
00218 // ************************************************************************
00219 // inline definitions
00220 namespace OSB_CORBA {
00221 }                                       // namespace OSB_CORBA
00222 #endif                                  // #ifndef _DVCRSRCMGR_I_H_

Generated on Sat Sep 2 14:25:51 2006 for OSB Library by  doxygen 1.4.7