(file) Return to ProviderManager.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / ProviderManager2

  1 karl  1.3 //%2003////////////////////////////////////////////////////////////////////////
  2 chip  1.1 //
  3 karl  1.3 // Copyright (c) 2000, 2001, 2002  BMC Software, Hewlett-Packard Development
  4           // Company, L. P., IBM Corp., The Open Group, Tivoli Systems.
  5           // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L. P.;
  6           // IBM Corp.; EMC Corporation, The Open Group.
  7 chip  1.1 //
  8           // Permission is hereby granted, free of charge, to any person obtaining a copy
  9           // of this software and associated documentation files (the "Software"), to
 10           // deal in the Software without restriction, including without limitation the
 11           // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 12           // sell copies of the Software, and to permit persons to whom the Software is
 13           // furnished to do so, subject to the following conditions:
 14 karl  1.3 // 
 15 chip  1.1 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 16           // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 17           // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 18           // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 19           // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 20           // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 21           // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 22           // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 23           //
 24           //==============================================================================
 25           //
 26           // Author: Chip Vincent (cvincent@us.ibm.com)
 27           //
 28           // Modified By:
 29           //
 30           //%/////////////////////////////////////////////////////////////////////////////
 31           
 32           #include "ProviderManager.h"
 33           
 34           PEGASUS_NAMESPACE_BEGIN
 35           
 36 chip  1.1 ProviderManager::ProviderManager(void)
 37           {
 38           }
 39           
 40           ProviderManager::~ProviderManager(void)
 41           {
 42           }
 43           
 44           Message * ProviderManager::processMessage(Message * message)
 45           {
 46               // subclasses should implement this method. if not implented, the base
 47               // classes generates a generic failure.
 48           
 49               return(message);
 50           }
 51           
 52 chip  1.2 ProviderName ProviderManager::findProvider(const ProviderName & providerName)
 53 chip  1.1 {
 54               return(_registrar.findProvider(providerName));
 55           }
 56           
 57 schuur 1.3.4.1 ProviderName ProviderManager::findProvider(const String & destinationPath)
 58                {
 59                    return(_registrar.findConsumerProvider(destinationPath));
 60                }
 61                
 62 chip   1.2     Boolean ProviderManager::insertProvider(const ProviderName & providerName)
 63 chip   1.1     {
 64                    return(_registrar.insertProvider(providerName));
 65                }
 66                
 67 chip   1.2     Boolean ProviderManager::removeProvider(const ProviderName & providerName)
 68 chip   1.1     {
 69                    return(_registrar.removeProvider(providerName));
 70                }
 71 schuur 1.3.4.1 
 72                String ProviderManager::_resolvePhysicalName(String physicalName)
 73                {
 74                    String temp;
 75                    
 76                    // fully qualify physical provider name (module), if not already done so.
 77                    #if defined(PEGASUS_PLATFORM_WIN32_IX86_MSVC)
 78                    temp = physicalName + String(".dll");
 79                    #elif defined(PEGASUS_PLATFORM_LINUX_IX86_GNU) || defined(PEGASUS_PLATFORM_LINUX_IA86_GNU)
 80                    String root = ConfigManager::getHomedPath(ConfigManager::getInstance()->getCurrentValue("providerDir"));
 81                    temp = root + String("/lib") + physicalName + String(".so");
 82                    #elif defined(PEGASUS_OS_HPUX)
 83                    String root = ConfigManager::getHomedPath(ConfigManager::getInstance()->getCurrentValue("providerDir"));
 84                    # ifdef PEGASUS_PLATFORM_HPUX_PARISC_ACC
 85                    temp = root + String("/lib") + physicalName + String(".sl");
 86                    # else
 87                    temp = root + String("/lib") + physicalName + String(".so");
 88                    # endif
 89                    #elif defined(PEGASUS_OS_OS400)
 90                    // do nothing
 91                    #else
 92 schuur 1.3.4.1     String root = ConfigManager::getHomedPath(ConfigManager::getInstance()->getCurrentValue("providerDir"));
 93                    temp = root + String("/lib") + physicalName + String(".so");
 94                    #endif
 95                    
 96                    return temp;
 97                }
 98                
 99 chip   1.1     
100                PEGASUS_NAMESPACE_END

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2