(file) Return to DefaultProviderManager.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / ProviderManager2 / Default

  1 karl  1.22 //%2006////////////////////////////////////////////////////////////////////////
  2 chip  1.1  //
  3 karl  1.18 // 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 karl  1.3  // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.18 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
  8            // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
  9 karl  1.19 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10            // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.22 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12            // EMC Corporation; Symantec Corporation; The Open Group.
 13 chip  1.1  //
 14            // Permission is hereby granted, free of charge, to any person obtaining a copy
 15            // of this software and associated documentation files (the "Software"), to
 16            // deal in the Software without restriction, including without limitation the
 17            // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 18            // sell copies of the Software, and to permit persons to whom the Software is
 19            // furnished to do so, subject to the following conditions:
 20 karl  1.18 // 
 21 chip  1.1  // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22            // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 23            // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 24            // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 25            // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 26            // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 27            // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 28            // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 29            //
 30            //==============================================================================
 31            //
 32            //%/////////////////////////////////////////////////////////////////////////////
 33            
 34            #ifndef Pegasus_DefaultProviderManager_h
 35            #define Pegasus_DefaultProviderManager_h
 36            
 37            #include <Pegasus/Common/Config.h>
 38            #include <Pegasus/Common/Constants.h>
 39            #include <Pegasus/Common/CIMObjectPath.h>
 40            #include <Pegasus/Common/Pair.h>
 41            #include <Pegasus/Common/Thread.h>
 42 chip  1.1  #include <Pegasus/Common/HashTable.h>
 43 kumpf 1.14 #include <Pegasus/Common/OperationContextInternal.h>
 44 chip  1.1  
 45            #include <Pegasus/ProviderManager2/ProviderManager.h>
 46 schuur 1.7  #include <Pegasus/ProviderManager2/ProviderName.h>
 47 chip   1.1  
 48 kumpf  1.28 #include <Pegasus/ProviderManager2/Default/ProviderMessageHandler.h>
 49 schuur 1.8  #include <Pegasus/ProviderManager2/Default/Linkage.h>
 50 chip   1.1  
 51             PEGASUS_NAMESPACE_BEGIN
 52             
 53 schuur 1.8  class PEGASUS_DEFPM_LINKAGE DefaultProviderManager : public ProviderManager
 54 chip   1.1  {
 55             public:
 56 kumpf  1.28     DefaultProviderManager();
 57                 virtual ~DefaultProviderManager();
 58 chip   1.1  
 59 kumpf  1.29     virtual Message* processMessage(Message* message);
 60 chip   1.1  
 61 kumpf  1.16     virtual Boolean hasActiveProviders();
 62                 virtual void unloadIdleProviders();
 63             
 64 mike   1.24     // This function creates an instance of DefaultProviderManager. It is
 65                 // typically passed to either the ProviderManagerService constructor
 66                 // or the BasicProviderManagerRouter constructor as a way of decoupling
 67                 // the pegprovidermanager and DefaultProviderManager libraries (otherwise
 68                 // each library would contain a reference to the other).
 69                 static ProviderManager* createDefaultProviderManagerCallback();
 70             
 71 kumpf  1.28 private:
 72 kumpf  1.29     CIMResponseMessage* _handleDisableModuleRequest(
 73                     CIMRequestMessage* message);
 74                 CIMResponseMessage* _handleEnableModuleRequest(
 75                     CIMRequestMessage* message);
 76                 CIMResponseMessage* _handleSubscriptionInitCompleteRequest(
 77                     CIMRequestMessage* message);
 78 kumpf  1.28 
 79                 ProviderName _resolveProviderName(const ProviderIdContainer & providerId);
 80             
 81                 ProviderOperationCounter _getProvider(
 82                     const String& moduleFileName,
 83                     const String& providerName);
 84 chip   1.1  
 85 kumpf  1.28     ProviderMessageHandler* _lookupProvider(const String& providerName);
 86 chip   1.1  
 87 kumpf  1.28     ProviderMessageHandler* _initProvider(
 88                     ProviderMessageHandler* provider,
 89                     const String& moduleFileName);
 90 chip   1.1  
 91 kumpf  1.28     ProviderModule* _lookupModule(const String& moduleFileName);
 92             
 93                 void _shutdownAllProviders();
 94 chip   1.2  
 95 kumpf  1.28     Sint16 _disableProvider(const String& providerName);
 96 carolann.graves 1.20 
 97 kumpf           1.28     void _unloadProvider(ProviderMessageHandler* provider);
 98 carolann.graves 1.20 
 99                          /**
100 kumpf           1.28         The _providerTableMutex must be locked whenever accessing the
101                              _providers table or the _modules table.  It is okay to lock a
102                              ProviderStatus::_statusMutex while holding the _providerTableMutex,
103                              but one should never lock the _providerTableMutex while holding
104                              a ProviderStatus::_statusMutex.
105 carolann.graves 1.20      */
106 kumpf           1.28     Mutex _providerTableMutex;
107                      
108                          typedef HashTable<String, ProviderMessageHandler*,
109                              EqualFunc<String>,  HashFunc<String> > ProviderTable;
110                      
111                          typedef HashTable<String, ProviderModule*,
112                              EqualFunc<String>, HashFunc<String> > ModuleTable;
113                      
114                          ProviderTable _providers;
115                          ModuleTable _modules;
116 chip            1.1  };
117                      
118                      PEGASUS_NAMESPACE_END
119                      
120                      #endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2