version 1.15, 2005/02/05 23:00:26
|
version 1.22, 2005/04/15 06:26:37
|
|
|
// Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) | // Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) |
// | // |
// Modified By: Seema Gupta(gseema@in.ibm.com) for PEP135 | // Modified By: Seema Gupta(gseema@in.ibm.com) for PEP135 |
|
// Sean Keenan, Hewlett-Packard Company (sean.keenan@hp.com) |
|
// Carol Ann Krug Graves, Hewlett-Packard Company |
|
// (carolann_graves@hp.com) |
|
// Josephine Eskaline Joyce, IBM (jojustin@in.ibm.com) for Bug#2619, #2685 |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
| |
// ProviderManager library names. Should these be defined elsewhere? | // ProviderManager library names. Should these be defined elsewhere? |
#if defined(PEGASUS_OS_OS400) | #if defined(PEGASUS_OS_OS400) |
# define LIBRARY_NAME_DEFAULTPM "QSYS/QYCMDFTPVM" |
# define LIBRARY_NAME_DEFAULTPM "QSYS/QYCMPMDE00" |
# define LIBRARY_NAME_CMPIPM "QSYS/QYCMCMPIPM" | # define LIBRARY_NAME_CMPIPM "QSYS/QYCMCMPIPM" |
# define LIBRARY_NAME_JMPIPM "QSYS/QYCMJMPIPM" | # define LIBRARY_NAME_JMPIPM "QSYS/QYCMJMPIPM" |
#else | #else |
|
|
const String& physicalName, | const String& physicalName, |
const String& logicalName, | const String& logicalName, |
const String& interfaceName, | const String& interfaceName, |
PEGASUS_INDICATION_CALLBACK indicationCallback) |
PEGASUS_INDICATION_CALLBACK indicationCallback, |
|
Boolean subscriptionInitComplete) |
: _manager(0) | : _manager(0) |
{ | { |
|
#if defined (PEGASUS_OS_VMS) |
|
_physicalName = FileSystem::buildLibraryFileName(physicalName); |
|
#elif defined (PEGASUS_OS_OS400) |
|
_physicalName = physicalName; |
|
#else |
_physicalName = ConfigManager::getHomedPath(PEGASUS_DEST_LIB_DIR) + | _physicalName = ConfigManager::getHomedPath(PEGASUS_DEST_LIB_DIR) + |
String("/") + FileSystem::buildLibraryFileName(physicalName); | String("/") + FileSystem::buildLibraryFileName(physicalName); |
|
#endif |
| |
_logicalName = logicalName; | _logicalName = logicalName; |
_interfaceName = interfaceName; | _interfaceName = interfaceName; |
|
|
PEGASUS_ASSERT(_manager != 0); | PEGASUS_ASSERT(_manager != 0); |
| |
_manager->setIndicationCallback(indicationCallback); | _manager->setIndicationCallback(indicationCallback); |
|
|
|
_manager->setSubscriptionInitComplete (subscriptionInitComplete); |
} | } |
| |
~ProviderManagerContainer() | ~ProviderManagerContainer() |
{ | { |
_module.unload(); | _module.unload(); |
|
delete _manager; |
} | } |
| |
ProviderManagerContainer& operator=( | ProviderManagerContainer& operator=( |
|
|
"BasicProviderManagerRouter::BasicProviderManagerRouter"); | "BasicProviderManagerRouter::BasicProviderManagerRouter"); |
| |
_indicationCallback = indicationCallback; | _indicationCallback = indicationCallback; |
|
_subscriptionInitComplete = false; |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
} | } |
|
|
{ | { |
PEG_METHOD_ENTER(TRC_PROVIDERMANAGER, | PEG_METHOD_ENTER(TRC_PROVIDERMANAGER, |
"BasicProviderManagerRouter::~BasicProviderManagerRouter"); | "BasicProviderManagerRouter::~BasicProviderManagerRouter"); |
|
/* Clean up the provider managers */ |
|
for (Uint32 i = 0, n = _providerManagerTable.size(); i < n; i++) |
|
{ |
|
ProviderManagerContainer* pmc=_providerManagerTable[i]; |
|
delete pmc; |
|
} |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
} | } |
| |
|
|
providerModule = dmReq->providerModule; | providerModule = dmReq->providerModule; |
} | } |
else if ((request->getType() == CIM_STOP_ALL_PROVIDERS_REQUEST_MESSAGE) || | else if ((request->getType() == CIM_STOP_ALL_PROVIDERS_REQUEST_MESSAGE) || |
|
(request->getType() == |
|
CIM_SUBSCRIPTION_INIT_COMPLETE_REQUEST_MESSAGE) || |
(request->getType() == CIM_NOTIFY_CONFIG_CHANGE_REQUEST_MESSAGE)) | (request->getType() == CIM_NOTIFY_CONFIG_CHANGE_REQUEST_MESSAGE)) |
{ | { |
// This operation is not provider-specific | // This operation is not provider-specific |
|
|
// Forward the request to the appropriate ProviderManager(s) | // Forward the request to the appropriate ProviderManager(s) |
// | // |
| |
if (request->getType() == CIM_STOP_ALL_PROVIDERS_REQUEST_MESSAGE) |
if ((request->getType() == CIM_STOP_ALL_PROVIDERS_REQUEST_MESSAGE) || |
|
(request->getType() == |
|
CIM_SUBSCRIPTION_INIT_COMPLETE_REQUEST_MESSAGE)) |
{ | { |
// Send CIMStopAllProvidersRequestMessage to all ProviderManagers |
_subscriptionInitComplete = true; |
|
|
|
// Send CIMStopAllProvidersRequestMessage or |
|
// CIMSubscriptionInitCompleteRequestMessage to all ProviderManagers |
ReadLock tableLock(_providerManagerTableLock); | ReadLock tableLock(_providerManagerTableLock); |
for (Uint32 i = 0, n = _providerManagerTable.size(); i < n; i++) | for (Uint32 i = 0, n = _providerManagerTable.size(); i < n; i++) |
{ | { |
|
|
{ | { |
ProviderManagerContainer* pmc = new ProviderManagerContainer( | ProviderManagerContainer* pmc = new ProviderManagerContainer( |
LIBRARY_NAME_DEFAULTPM, "DEFAULT", "C++Default", | LIBRARY_NAME_DEFAULTPM, "DEFAULT", "C++Default", |
_indicationCallback); |
_indicationCallback, _subscriptionInitComplete); |
_providerManagerTable.append(pmc); | _providerManagerTable.append(pmc); |
return pmc->getProviderManager(); | return pmc->getProviderManager(); |
} | } |
|
|
if (interfaceType == "CMPI") | if (interfaceType == "CMPI") |
{ | { |
ProviderManagerContainer* pmc = new ProviderManagerContainer( | ProviderManagerContainer* pmc = new ProviderManagerContainer( |
LIBRARY_NAME_CMPIPM, "CMPI", "CMPI", _indicationCallback); |
LIBRARY_NAME_CMPIPM, "CMPI", "CMPI", _indicationCallback, |
|
_subscriptionInitComplete); |
_providerManagerTable.append(pmc); | _providerManagerTable.append(pmc); |
return pmc->getProviderManager(); | return pmc->getProviderManager(); |
} | } |
|
|
if (interfaceType == "JMPI") | if (interfaceType == "JMPI") |
{ | { |
ProviderManagerContainer* pmc = new ProviderManagerContainer( | ProviderManagerContainer* pmc = new ProviderManagerContainer( |
LIBRARY_NAME_JMPIPM, "JMPI", "JMPI", _indicationCallback); |
LIBRARY_NAME_JMPIPM, "JMPI", "JMPI", _indicationCallback, |
|
_subscriptionInitComplete); |
_providerManagerTable.append(pmc); | _providerManagerTable.append(pmc); |
return pmc->getProviderManager(); | return pmc->getProviderManager(); |
} | } |