(file) Return to ProviderRegistrationProvider.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / ControlProviders / ProviderRegistrationProvider

  1 martin 1.31 //%LICENSE////////////////////////////////////////////////////////////////
  2 martin 1.32 //
  3 martin 1.31 // Licensed to The Open Group (TOG) under one or more contributor license
  4             // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
  5             // this work for additional information regarding copyright ownership.
  6             // Each contributor licenses this file to you under the OpenPegasus Open
  7             // Source License; you may not use this file except in compliance with the
  8             // License.
  9 martin 1.32 //
 10 martin 1.31 // Permission is hereby granted, free of charge, to any person obtaining a
 11             // copy of this software and associated documentation files (the "Software"),
 12             // to deal in the Software without restriction, including without limitation
 13             // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 14             // and/or sell copies of the Software, and to permit persons to whom the
 15             // Software is furnished to do so, subject to the following conditions:
 16 martin 1.32 //
 17 martin 1.31 // The above copyright notice and this permission notice shall be included
 18             // in all copies or substantial portions of the Software.
 19 martin 1.32 //
 20 martin 1.31 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 21 martin 1.32 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 22 martin 1.31 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 23             // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 24             // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 25             // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 26             // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27 martin 1.32 //
 28 martin 1.31 //////////////////////////////////////////////////////////////////////////
 29 kumpf  1.1  //
 30             //%/////////////////////////////////////////////////////////////////////////////
 31             
 32 ks.madhusudan 1.28 #ifndef Pegasus_ProviderRegistrationProvider_h
 33                    #define Pegasus_ProviderRegistrationProvider_h
 34 kumpf         1.1  #include <Pegasus/Common/Config.h>
 35 chuck         1.10 #include <Pegasus/ControlProviders/ProviderRegistrationProvider/Linkage.h>
 36 kumpf         1.1  
 37                    #include <Pegasus/Provider/CIMInstanceProvider.h>
 38                    #include <Pegasus/Provider/CIMMethodProvider.h>
 39 venkat.puvvada 1.36 #include <Pegasus/Provider/CIMIndicationProvider.h>
 40 kumpf          1.18 #include <Pegasus/Common/ModuleController.h>
 41 kumpf          1.1  
 42 kumpf          1.23 #include <Pegasus/Common/AcceptLanguageList.h>
 43 chuck          1.15 
 44 karl           1.27 #include \
 45                         <Pegasus/Server/ProviderRegistrationManager/ProviderRegistrationManager.h>
 46 kumpf          1.1  
 47                     PEGASUS_NAMESPACE_BEGIN
 48                     
 49                     class PEGASUS_PROVREGPROVIDER_LINKAGE ProviderRegistrationProvider :
 50                         public CIMInstanceProvider,
 51 venkat.puvvada 1.36     public CIMMethodProvider ,
 52                         public CIMIndicationProvider
 53 kumpf          1.1  {
 54                     public:
 55 kumpf          1.3  
 56                           class callback_data
 57                           {
 58                              public:
 59                     
 60                                 Message *reply;
 61                                 Semaphore client_sem;
 62                                 ProviderRegistrationProvider & cimom_handle;
 63                     
 64                                 callback_data(ProviderRegistrationProvider *handle)
 65                                    : reply(0), client_sem(0), cimom_handle(*handle)
 66                                 {
 67                                 }
 68                                 ~callback_data()
 69                                 {
 70                                    delete reply;
 71                                 }
 72                     
 73                                 Message *get_reply(void)
 74                                 {
 75                                    Message *ret = reply;
 76 kumpf          1.3                 reply = NULL;
 77                                    return ret;
 78                                 }
 79                     
 80                              private:
 81                                 callback_data(void);
 82                           };
 83                     
 84                     
 85 kumpf          1.1      ProviderRegistrationProvider(
 86                             ProviderRegistrationManager* providerRegistrationManager);
 87                         virtual ~ProviderRegistrationProvider(void);
 88                     
 89 karl           1.27 ProviderRegistrationProvider & operator=
 90                         (const ProviderRegistrationProvider & handle);
 91 kumpf          1.3  
 92 kumpf          1.13     // CIMProvider interface
 93 kumpf          1.26     // Note:  The initialize() and terminate() methods are not called for
 94                         // Control Providers.
 95                         virtual void initialize(CIMOMHandle& cimom) { }
 96                         virtual void terminate() { }
 97 kumpf          1.1  
 98                         // CIMInstanceProvider interface
 99                         virtual void getInstance(
100                             const OperationContext & context,
101 kumpf          1.5          const CIMObjectPath & instanceReference,
102 kumpf          1.12         const Boolean includeQualifiers,
103                             const Boolean includeClassOrigin,
104 kumpf          1.2          const CIMPropertyList & propertyList,
105 kumpf          1.11         InstanceResponseHandler & handler);
106 kumpf          1.1  
107                         virtual void enumerateInstances(
108                             const OperationContext & context,
109 kumpf          1.5          const CIMObjectPath & classReference,
110 kumpf          1.12         const Boolean includeQualifiers,
111                             const Boolean includeClassOrigin,
112 kumpf          1.2          const CIMPropertyList & propertyList,
113 kumpf          1.11         InstanceResponseHandler & handler);
114 kumpf          1.1  
115                         virtual void enumerateInstanceNames(
116                             const OperationContext & context,
117 kumpf          1.5          const CIMObjectPath & classReference,
118 kumpf          1.11         ObjectPathResponseHandler & handler);
119 kumpf          1.1  
120                         virtual void modifyInstance(
121                             const OperationContext & context,
122 kumpf          1.5          const CIMObjectPath & instanceReference,
123 kumpf          1.1          const CIMInstance & instanceObject,
124 kumpf          1.12         const Boolean includeQualifiers,
125 kumpf          1.2          const CIMPropertyList & propertyList,
126 kumpf          1.11         ResponseHandler & handler);
127 kumpf          1.1  
128                         virtual void createInstance(
129                             const OperationContext & context,
130 kumpf          1.5          const CIMObjectPath & instanceReference,
131 kumpf          1.1          const CIMInstance & instanceObject,
132 kumpf          1.11         ObjectPathResponseHandler & handler);
133 kumpf          1.1  
134                         virtual void deleteInstance(
135                             const OperationContext & context,
136 kumpf          1.5          const CIMObjectPath & instanceReference,
137 kumpf          1.11         ResponseHandler & handler);
138 kumpf          1.1  
139                         // CIMMethodProvider interface
140                         virtual void invokeMethod(
141                             const OperationContext & context,
142 kumpf          1.5          const CIMObjectPath & objectReference,
143 kumpf          1.9          const CIMName & methodName,
144 kumpf          1.1          const Array<CIMParamValue> & inParameters,
145 kumpf          1.11         MethodResultResponseHandler & handler);
146 kumpf          1.1  
147 venkat.puvvada 1.36     // CIMIndicationProvider interface
148                         virtual void enableIndications(IndicationResponseHandler& handler);
149                         virtual void disableIndications();
150                     
151                         virtual void createSubscription(
152                             const OperationContext& context,
153                             const CIMObjectPath& subscriptionName,
154                             const Array <CIMObjectPath>& classNames,
155                             const CIMPropertyList& propertyList,
156                             const Uint16 repeatNotificationPolicy){}
157                     
158                         virtual void modifySubscription(
159                             const OperationContext& context,
160                             const CIMObjectPath& subscriptionName,
161                             const Array <CIMObjectPath>& classNames,
162                             const CIMPropertyList& propertyList,
163                             const Uint16 repeatNotificationPolicy){}
164                     
165                         virtual void deleteSubscription(
166                             const OperationContext& context,
167                             const CIMObjectPath& subscriptionName,
168 venkat.puvvada 1.36         const Array <CIMObjectPath>& classNames){}
169                     
170 kumpf          1.1  protected:
171 kumpf          1.3  
172                         ModuleController * _controller;
173                     
174 kumpf          1.1      ProviderRegistrationManager* _providerRegistrationManager;
175 kumpf          1.3  
176                         MessageQueueService * _getProviderManagerService();
177                         Array<Uint16> _sendDisableMessageToProviderManager(
178 karl           1.27         CIMDisableModuleRequestMessage * notify_req);
179 kumpf          1.3      Array<Uint16> _sendEnableMessageToProviderManager(
180 karl           1.27         CIMEnableModuleRequestMessage * notify_req);
181 kumpf          1.4      MessageQueueService * _getIndicationService();
182                         void _sendTerminationMessageToSubscription(
183 karl           1.27         const CIMObjectPath & ref, const String & moduleName,
184                             const Boolean disableProviderOnly,
185 kumpf          1.23         const AcceptLanguageList & al);
186 kumpf          1.14 
187 venkat.puvvada 1.36     void _generatePMIndications(
188                             PMInstAlertCause alertCause);
189                     
190 kumpf          1.33     Sint16 _disableModule(const CIMObjectPath & moduleRef,
191 karl           1.27                           const String & moduleName,
192                                               Boolean disableProviderOnly,
193 kumpf          1.23                       const AcceptLanguageList & al);
194 kumpf          1.16 
195 venkat.puvvada 1.34     Sint16 _setModuleGroupName(const CIMObjectPath & moduleRef,
196                                               const String & moduleName,
197                                               const String & moduleGroupName,
198                                               const AcceptLanguageList & al);
199                     
200 kumpf          1.16     //
201                         // If the provider is an indication provider, return true
202                         // otherwise, return false
203                         //
204                         Boolean _isIndicationProvider(const String & moduleName,
205 kumpf          1.20                                   const CIMInstance & instance);
206 kumpf          1.18 
207 kumpf          1.33     Sint16 _enableModule(const CIMObjectPath & moduleRef,
208 karl           1.27                          const String & moduleName,
209 kumpf          1.33                          const AcceptLanguageList & al);
210 kumpf          1.18 
211                         void _sendEnableMessageToSubscription(
212 karl           1.27         const CIMInstance & mInstance,
213                             const CIMInstance & pInstance,
214                             const Array<CIMInstance> & capInstances,
215                             const AcceptLanguageList & al);
216 kumpf          1.18 
217                          //
218                         // get all the indication capability instances which belongs
219                         // to the provider
220                         //
221                         Array<CIMInstance>  _getIndicationCapInstances(
222 karl           1.27         const String & moduleName,
223                             const CIMInstance & instance,
224                             const CIMObjectPath & providerRef);
225 venkat.puvvada 1.30 private:
226                     
227 venkat.puvvada 1.36     static void _sendIndication(
228                             const Array<CIMInstance> &providerModules,
229                             const CIMInstance &provider,
230                             PMInstAlertCause alertCause);
231 venkat.puvvada 1.30 #ifdef PEGASUS_ENABLE_INTEROP_PROVIDER
232                         void _sendUpdateCacheMessagetoInteropProvider(
233                             const OperationContext & context);
234                     #endif
235 venkat.puvvada 1.36     static IndicationResponseHandler *_indicationResponseHandler;
236                         static  Boolean _enableIndications;
237                         Boolean _sentEnabledIndications;
238                         static Mutex _indicationDeliveryMtx;
239                         static void _PMInstAlertCallback(
240                             const CIMInstance &providerModule,
241                             const CIMInstance &provider,
242                             PMInstAlertCause cause);
243 kumpf          1.1  };
244                     
245                     PEGASUS_NAMESPACE_END
246 mike           1.29 
247                     #endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2