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

  1 karl  1.2 //%2003////////////////////////////////////////////////////////////////////////
  2 chip  1.1 //
  3 karl  1.2 // 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 schuur 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 schuur 1.3 // Author:      Adrian Schuur, schuur@de.ibm.com
 27 chip   1.1 //
 28            // Modified By:
 29            //
 30            //%/////////////////////////////////////////////////////////////////////////////
 31            
 32            #ifndef Pegasus_CMPIProviderManager_h
 33            #define Pegasus_CMPIProviderManager_h
 34            
 35            #include <Pegasus/Common/Config.h>
 36 schuur 1.3 #include <Pegasus/Common/HashTable.h>
 37            #include <Pegasus/ProviderManager2/ProviderRegistrarInitializer.h>
 38            #include <Pegasus/ProviderManager2/ProviderName.h>
 39 chip   1.1 #include <Pegasus/ProviderManager2/ProviderManager.h>
 40            #include <Pegasus/Server/Linkage.h>
 41 schuur 1.3 #include <Pegasus/Config/ConfigManager.h>
 42            #include <Pegasus/Repository/CIMRepository.h>
 43            #include <Pegasus/ProviderManager2/Default/OperationResponseHandler.h>
 44 chip   1.1 
 45            PEGASUS_NAMESPACE_BEGIN
 46            
 47 schuur 1.4 struct CMPI_SelectExp;
 48 schuur 1.3 
 49 chip   1.1 class PEGASUS_SERVER_LINKAGE CMPIProviderManager : public ProviderManager
 50            {
 51            public:
 52 schuur 1.3     enum Mode { 
 53                   CMPI_MODE,
 54                   CMPI_R_MODE,
 55                   CMPI_O_MODE
 56                };
 57            
 58                Mode getMode() { return mode; }
 59                CMPIProviderManager(Mode=CMPI_MODE);
 60 chip   1.1     virtual ~CMPIProviderManager(void);
 61 schuur 1.3     
 62                virtual Boolean insertProvider(const ProviderName & providerName, 
 63                        const String &ns, const String &cn);
 64              
 65                virtual Message * processMessage(Message * request) throw();
 66 chip   1.1 
 67 schuur 1.3     static String resolveFileName(String name);
 68            
 69                virtual void unload_idle_providers(void) ;
 70                
 71               struct indProvRecord {
 72                  indProvRecord() : enabled(false), count(1), handler(NULL) {}
 73                  Boolean enabled;
 74                  int count;
 75                  EnableIndicationsResponseHandler* handler;
 76               };
 77            
 78               struct indSelectRecord {
 79                  indSelectRecord() : eSelx(NULL) {}
 80                  CMPI_SelectExp *eSelx;
 81               };
 82            
 83               typedef HashTable<String,indProvRecord*,  EqualFunc<String>,HashFunc<String> > IndProvTab;
 84               typedef HashTable<String,indSelectRecord*,EqualFunc<String>,HashFunc<String> > IndSelectTab;
 85               typedef HashTable<String,ProviderName,EqualFunc<String>,HashFunc<String> > ProvRegistrar;
 86            
 87               static IndProvTab provTab;
 88 schuur 1.3    static IndSelectTab selxTab;
 89               static ProvRegistrar provReg;
 90               
 91            protected:
 92                Mode mode;
 93                CIMRepository *_repository;
 94                String getFilter(CIMInstance &subscription);
 95            
 96                Message * handleUnsupportedRequest(const Message * message) throw();
 97            
 98                Message * handleGetInstanceRequest(const Message * message) throw();
 99                Message * handleEnumerateInstancesRequest(const Message * message) throw();
100                Message * handleEnumerateInstanceNamesRequest(const Message * message) throw();
101                Message * handleCreateInstanceRequest(const Message * message) throw();
102                Message * handleModifyInstanceRequest(const Message * message) throw();
103                Message * handleDeleteInstanceRequest(const Message * message) throw();
104            
105 schuur 1.5     Message * handleExecQueryRequest(const Message * message) throw();
106 schuur 1.3 
107                Message * handleAssociatorsRequest(const Message * message) throw();
108                Message * handleAssociatorNamesRequest(const Message * message) throw();
109                Message * handleReferencesRequest(const Message * message) throw();
110                Message * handleReferenceNamesRequest(const Message * message) throw();
111            /*
112                Message * handleGetPropertyRequest(const Message * message) throw();
113                Message * handleSetPropertyRequest(const Message * message) throw();
114            */
115                Message * handleInvokeMethodRequest(const Message * message) throw();
116            
117                Message * handleCreateSubscriptionRequest(const Message * message) throw();
118            //    Message * handleModifySubscriptionRequest(const Message * message) throw();
119                Message * handleDeleteSubscriptionRequest(const Message * message) throw();
120                Message * handleEnableIndicationsRequest(const Message * message) throw();
121                Message * handleDisableIndicationsRequest(const Message * message) throw();
122            
123            //  Not supported by CMPI
124            //    Message * handleConsumeIndicationRequest(const Message * message) throw();
125            
126                Message * handleDisableModuleRequest(const Message * message) throw();
127 schuur 1.3     Message * handleEnableModuleRequest(const Message * message) throw();
128                Message * handleStopAllProvidersRequest(const Message * message) throw();
129 chip   1.1 
130 schuur 1.3     ProviderName _resolveProviderName(const ProviderName & providerName);
131 chip   1.1 };
132            
133            PEGASUS_NAMESPACE_END
134            
135            #endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2