version 1.6, 2006/08/09 21:12:59
|
version 1.7, 2006/09/01 17:51:28
|
|
|
// | // |
//============================================================================== | //============================================================================== |
// | // |
// Author: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) |
|
// |
|
// Modified By: |
|
// |
|
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
| |
|
|
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
class ProviderManager; |
|
class Provider; |
|
|
|
class CIMOMHandleOpSemaphore; |
|
|
|
class PEGASUS_PROVIDER_LINKAGE CIMOMHandleRep : public Sharable | class PEGASUS_PROVIDER_LINKAGE CIMOMHandleRep : public Sharable |
{ | { |
public: | public: |
|
|
virtual void setOS400ProfileHandle(const char* profileHandle) = 0; | virtual void setOS400ProfileHandle(const char* profileHandle) = 0; |
#endif | #endif |
| |
virtual void get_idle_timer(struct timeval*); |
|
virtual void update_idle_timer(); |
|
virtual Boolean pending_operation(); |
|
virtual Boolean unload_ok(); | virtual Boolean unload_ok(); |
| |
private: | private: |
AtomicInt _pendingOperations; |
|
struct timeval _idleTime; |
|
Mutex _idleTimeMutex; |
|
Uint32 _providerUnloadProtect; | Uint32 _providerUnloadProtect; |
Mutex _providerUnloadProtectMutex; | Mutex _providerUnloadProtectMutex; |
|
|
friend class CIMOMHandleOpSemaphore; |
|
}; |
|
|
|
class PEGASUS_PROVIDER_LINKAGE CIMOMHandleOpSemaphore |
|
{ |
|
public: |
|
CIMOMHandleOpSemaphore(CIMOMHandleRep *rep) |
|
: _rep(rep) |
|
{ |
|
_rep->update_idle_timer(); |
|
(_rep->_pendingOperations)++; |
|
} |
|
|
|
~CIMOMHandleOpSemaphore() |
|
{ |
|
_rep->update_idle_timer(); |
|
(_rep->_pendingOperations)--; |
|
} |
|
|
|
private: |
|
// Unimplemented |
|
CIMOMHandleOpSemaphore(); |
|
|
|
// Unimplemented |
|
CIMOMHandleOpSemaphore(const CIMOMHandleOpSemaphore& sem); |
|
|
|
// Unimplemented |
|
CIMOMHandleOpSemaphore& operator=(const CIMOMHandleOpSemaphore& sem); |
|
|
|
CIMOMHandleRep *_rep; |
|
}; | }; |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |