version 1.1, 2003/08/18 04:27:16
|
version 1.4, 2004/03/03 13:06:05
|
|
|
//%/////////////////////-*-c++-*-/////////////////////////////////////////////// |
//%2003//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000 - 2003 BMC Software, Hewlett-Packard Company, IBM, |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Development |
// The Open Group, Tivoli Systems |
// Company, L. P., IBM Corp., The Open Group, Tivoli Systems. |
|
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.; |
|
// IBM Corp.; EMC Corporation, The Open Group. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
| |
#include <Pegasus/Provider/CIMProvider.h> | #include <Pegasus/Provider/CIMProvider.h> |
| |
#include <Pegasus/Server/Linkage.h> |
#include <Pegasus/Config/ConfigManager.h> |
|
|
|
#include <Pegasus/ProviderManager2/Default/Linkage.h> |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
// The ProviderModule class represents the physical module, as defined by the | // The ProviderModule class represents the physical module, as defined by the |
// operating, that contains a provider. This class effectively encapsulates the | // operating, that contains a provider. This class effectively encapsulates the |
// "physical" portion of a provider. | // "physical" portion of a provider. |
class PEGASUS_SERVER_LINKAGE ProviderModule |
class PEGASUS_DEFPM_LINKAGE ProviderModule |
{ | { |
public: | public: |
ProviderModule(const String & fileName); | ProviderModule(const String & fileName); |
|
|
AtomicInt _ref_count; | AtomicInt _ref_count; |
DynamicLibraryHandle _library; | DynamicLibraryHandle _library; |
| |
friend class LocalProviderManager; |
|
friend class Provider; |
|
|
|
private: | private: |
// refCount is deprecated << Wed Apr 9 12:03:13 2003 mdd >> |
|
// reference counting is done automatically by provider manager |
|
ProviderModule(const String & fileName, const Uint32 & refCount); | ProviderModule(const String & fileName, const Uint32 & refCount); |
// providerName is deprecated because a provider module may have more than |
|
// one provider loaded. << Wed Apr 9 12:04:05 2003 mdd >> |
|
ProviderModule(const String & fileName, const String & providerName); | ProviderModule(const String & fileName, const String & providerName); |
ProviderModule(const String & fileName, const String & providerName, | ProviderModule(const String & fileName, const String & providerName, |
const String & interfaceName, const Uint32 & refCount); | const String & interfaceName, const Uint32 & refCount); |
|
|
const String & getInterfaceName(void) const ; | const String & getInterfaceName(void) const ; |
| |
const Uint32 & getRefCount(void) const; | const Uint32 & getRefCount(void) const; |
// ProviderAdapter * getAdapter(void) const; |
|
virtual CIMProvider * getProvider(void) const; | virtual CIMProvider * getProvider(void) const; |
| |
String _providerName; |
private: |
|
friend class LocalProviderManager; |
|
friend class Provider; |
| |
|
String _providerName; |
String _interfaceName; | String _interfaceName; |
String _interfaceFileName; // for later use with interface registration | String _interfaceFileName; // for later use with interface registration |
// ProviderAdapter * _adapter; |
|
| |
CIMProvider * _provider; | CIMProvider * _provider; |
| |
|
|
return(_interfaceName); | return(_interfaceName); |
} | } |
| |
//inline ProviderAdapter * ProviderModule::getAdapter(void) const |
|
//{ |
|
// return _adapter; |
|
//} |
|
|
|
inline const String & ProviderModule::getProviderName(void) const | inline const String & ProviderModule::getProviderName(void) const |
{ | { |
return(_providerName); | return(_providerName); |