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

  1 karl  1.30 //%2006////////////////////////////////////////////////////////////////////////
  2 chip  1.1  //
  3 karl  1.23 // 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.2  // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.23 // 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.25 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10            // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.30 // 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.23 // 
 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_CMPIProviderManager_h
 35            #define Pegasus_CMPIProviderManager_h
 36            
 37            #include <Pegasus/Common/Config.h>
 38 schuur 1.3  #include <Pegasus/Common/HashTable.h>
 39             #include <Pegasus/ProviderManager2/ProviderName.h>
 40 chip   1.1  #include <Pegasus/ProviderManager2/ProviderManager.h>
 41 kumpf  1.15 #include <Pegasus/Common/OperationContextInternal.h>
 42 schuur 1.7  
 43 schuur 1.3  #include <Pegasus/Config/ConfigManager.h>
 44 schuur 1.8  #include <Pegasus/ProviderManager2/OperationResponseHandler.h>
 45 chip   1.1  
 46 kumpf  1.18 #include <Pegasus/ProviderManager2/CMPI/CMPILocalProviderManager.h>
 47 schuur 1.7  #include <Pegasus/ProviderManager2/CMPI/Linkage.h>
 48             
 49 konrad.r 1.27 #include <Pegasus/Provider/CIMOMHandleQueryContext.h>
 50 chip     1.1  PEGASUS_NAMESPACE_BEGIN
 51               
 52 schuur   1.4  struct CMPI_SelectExp;
 53 schuur   1.3  
 54 schuur   1.7  class PEGASUS_CMPIPM_LINKAGE CMPIProviderManager : public ProviderManager
 55 chip     1.1  {
 56               public:
 57 venkat.puvvada 1.35     enum Mode
 58                         {
 59                             CMPI_MODE,
 60                             CMPI_R_MODE,
 61                             CMPI_O_MODE
 62 schuur         1.3      };
 63                     
 64 venkat.puvvada 1.35     Mode getMode()
 65                         {
 66                             return mode;
 67                         }
 68 schuur         1.3      CMPIProviderManager(Mode=CMPI_MODE);
 69 venkat.puvvada 1.35     virtual ~CMPIProviderManager();
 70 dj.gorey       1.12 
 71 dj.gorey       1.14     virtual Message * processMessage(Message * request);
 72 chip           1.1  
 73 kumpf          1.18     virtual Boolean hasActiveProviders();
 74                         virtual void unloadIdleProviders();
 75 dj.gorey       1.12 
 76 venkat.puvvada 1.35     virtual Boolean supportsRemoteNameSpaces()
 77                         {
 78                             return true;
 79                         }
 80                     
 81                         struct indProvRecord
 82                         {
 83                             indProvRecord() : enabled(false), count(1), handler(NULL)
 84                             {
 85                             }
 86                             Boolean enabled;
 87                             int count;
 88 venkat.puvvada 1.37 #ifdef PEGASUS_ENABLE_REMOTE_CMPI
 89                             String remoteInfo; 
 90                     #endif
 91 venkat.puvvada 1.35         EnableIndicationsResponseHandler* handler;
 92                         };
 93                     
 94                         struct indSelectRecord
 95                         {
 96                             indSelectRecord() : eSelx(NULL), count(1)
 97                             {
 98                             }
 99                             CMPI_SelectExp *eSelx;
100                             CIMOMHandleQueryContext *qContext;
101                             int count;
102                         };
103 schuur         1.21 
104 venkat.puvvada 1.35     typedef HashTable<String,indProvRecord*, \
105                             EqualFunc<String>,HashFunc<String> > IndProvTab;
106                         typedef HashTable<CIMObjectPath,indSelectRecord*, \
107                             EqualFunc<CIMObjectPath>,HashFunc<CIMObjectPath> > IndSelectTab;
108                     
109                         static IndProvTab provTab;
110                         static ReadWriteSem  rwSemProvTab;
111                         static IndSelectTab selxTab;
112                         static ReadWriteSem  rwSemSelxTab;
113 schuur         1.3  protected:
114 kumpf          1.18     CMPILocalProviderManager providerManager;
115                     
116 schuur         1.3      Mode mode;
117                     
118 dj.gorey       1.14     Message * handleUnsupportedRequest(const Message * message);
119 schuur         1.3  
120 dj.gorey       1.14     Message * handleGetInstanceRequest(const Message * message);
121                         Message * handleEnumerateInstancesRequest(const Message * message);
122                         Message * handleEnumerateInstanceNamesRequest(const Message * message);
123                         Message * handleCreateInstanceRequest(const Message * message);
124                         Message * handleModifyInstanceRequest(const Message * message);
125                         Message * handleDeleteInstanceRequest(const Message * message);
126                     
127                         Message * handleExecQueryRequest(const Message * message);
128                     
129                         Message * handleAssociatorsRequest(const Message * message);
130                         Message * handleAssociatorNamesRequest(const Message * message);
131                         Message * handleReferencesRequest(const Message * message);
132                         Message * handleReferenceNamesRequest(const Message * message);
133 dave.sudlik    1.33 
134 dj.gorey       1.14     Message * handleGetPropertyRequest(const Message * message);
135                         Message * handleSetPropertyRequest(const Message * message);
136 dave.sudlik    1.33 
137 dj.gorey       1.14     Message * handleInvokeMethodRequest(const Message * message);
138 schuur         1.3  
139 dj.gorey       1.14     Message * handleCreateSubscriptionRequest(const Message * message);
140                     //    Message * handleModifySubscriptionRequest(const Message * message);
141                         Message * handleDeleteSubscriptionRequest(const Message * message);
142 schuur         1.3  
143                     //  Not supported by CMPI
144 kumpf          1.19 //    Message * handleExportIndicationRequest(const Message * message);
145 schuur         1.3  
146 dj.gorey       1.14     Message * handleDisableModuleRequest(const Message * message);
147                         Message * handleEnableModuleRequest(const Message * message);
148                         Message * handleStopAllProvidersRequest(const Message * message);
149 s.kodali       1.38 //  Note: The PG_Provider AutoStart property is not yet supported
150                     #if 0
151 kumpf          1.16     Message * handleInitializeProviderRequest(const Message * message);
152 s.kodali       1.38 #endif
153 carolann.graves 1.26     Message * handleSubscriptionInitCompleteRequest (const Message * message);
154 chip            1.1  
155 kumpf           1.15     ProviderName _resolveProviderName(const ProviderIdContainer & providerId);
156 carolann.graves 1.26 
157                          /**
158                              Calls the provider's enableIndications() method, if the provider 
159                              version supports enableIndications().
160                      
161                              Note that since an exception thrown by the provider's
162                              enableIndications() method is considered a provider error, any such
163                              exception is ignored, and no exceptions are thrown by this method.
164                      
165                              @param  req_provider  CIMInstance for the provider to be enabled
166 kumpf           1.31         @param  _indicationCallback  PEGASUS_INDICATION_CALLBACK_T for
167                                  indications
168 carolann.graves 1.26         @param  ph  OpProviderHolder for the provider to be enabled
169 dave.sudlik     1.34         @param remoteInfo Remote Information
170 carolann.graves 1.26      */
171 venkat.puvvada  1.35     void _callEnableIndications(
172                              CIMInstance & req_provider,
173                              PEGASUS_INDICATION_CALLBACK_T _indicationCallback,
174                              CMPIProvider::OpProviderHolder & ph,
175                              const char *remoteInfo);
176 carolann.graves 1.26 
177                          /**
178                              Calls the provider's disableIndications() method, if the provider
179                              version supports disableIndications().
180                      
181                              @param  ph  OpProviderHolder for the provider to be enabled
182 dave.sudlik     1.34         @param remoteInfo Remote Information
183 carolann.graves 1.26      */
184 venkat.puvvada  1.35     void _callDisableIndications(
185                              CMPIProvider::OpProviderHolder & ph, 
186                              const char *remoteInfo);
187 chip            1.1  };
188                      
189                      PEGASUS_NAMESPACE_END
190                      
191                      #endif
192 venkat.puvvada  1.35     

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2