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

  1 karl  1.24 //%2003////////////////////////////////////////////////////////////////////////
  2 chip  1.1  //
  3 karl  1.24 // 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.24 // 
 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: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com)
 29            //              Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com)
 30 mday  1.19 //              Mike Day, IBM (mdday@us.ibm.com)
 31 kumpf 1.21 //              Yi Zhou, Hewlett-Packard Company (yi_zhou@hp.com)
 32 a.arora 1.26 //              Amit K Arora, (amita@in.ibm.com) for PEP101
 33 chip    1.1  //
 34              //%/////////////////////////////////////////////////////////////////////////////
 35              
 36              #ifndef Pegasus_ProviderFacade_h
 37              #define Pegasus_ProviderFacade_h
 38              
 39              #include <Pegasus/Common/Config.h>
 40 mday    1.19 #include <Pegasus/Common/IPC.h>
 41 a.arora 1.26 #include <Pegasus/Common/AutoPtr.h>
 42 kumpf   1.18 #include <Pegasus/Provider/CIMProvider.h>
 43 chip    1.1  #include <Pegasus/Provider/CIMInstanceProvider.h>
 44              #include <Pegasus/Provider/CIMClassProvider.h>
 45              #include <Pegasus/Provider/CIMAssociationProvider.h>
 46              #include <Pegasus/Provider/CIMMethodProvider.h>
 47              #include <Pegasus/Provider/CIMQueryProvider.h>
 48              #include <Pegasus/Provider/CIMIndicationProvider.h>
 49 kumpf   1.21 #include <Pegasus/Provider/CIMIndicationConsumerProvider.h>
 50 kumpf   1.14 #include <Pegasus/Server/Linkage.h>
 51 chip    1.1  
 52              PEGASUS_NAMESPACE_BEGIN
 53              
 54 mday    1.19 
 55 chip    1.4  // The ProviderModule class wraps a provider pointer extracted from a provider
 56              // module to ensure it is complete and well behaved. So, regardless of the
 57              // method supported by a "real" provider, it can be placed inside a reliable
 58              // facade with a known interface.
 59 chip    1.1  class PEGASUS_SERVER_LINKAGE ProviderFacade :
 60 chip    1.6      public CIMInstanceProvider,
 61 chip    1.5      public CIMClassProvider,
 62                  public CIMAssociationProvider,
 63                  public CIMMethodProvider,
 64                  public CIMQueryProvider,
 65                  public CIMIndicationProvider,
 66 kumpf   1.21     public CIMIndicationConsumerProvider
 67 chip    1.1  {
 68              public:
 69 kumpf   1.18     ProviderFacade(CIMProvider * provider);
 70 chip    1.5      virtual ~ProviderFacade(void);
 71 chip    1.1  
 72 kumpf   1.18     // CIMProvider interface
 73 chip    1.5      virtual void initialize(CIMOMHandle & cimom);
 74 kumpf   1.23 #ifdef PEGASUS_PRESERVE_TRYTERMINATE
 75 mday    1.20     virtual Boolean tryTerminate(void);
 76 kumpf   1.23 #endif
 77 mday    1.20     
 78 chip    1.5      virtual void terminate(void);
 79              
 80                  // CIMInstanceProvider interface
 81                  virtual void getInstance(
 82 chip    1.11         const OperationContext & context,
 83                      const CIMObjectPath & instanceReference,
 84 kumpf   1.17         const Boolean includeQualifiers,
 85                      const Boolean includeClassOrigin,
 86 chip    1.11         const CIMPropertyList & propertyList,
 87 kumpf   1.16         InstanceResponseHandler & handler);
 88 chip    1.5  
 89                  virtual void enumerateInstances(
 90 chip    1.11         const OperationContext & context,
 91                      const CIMObjectPath & classReference,
 92 kumpf   1.17         const Boolean includeQualifiers,
 93                      const Boolean includeClassOrigin,
 94 chip    1.11         const CIMPropertyList & propertyList,
 95 kumpf   1.16         InstanceResponseHandler & handler);
 96 chip    1.5  
 97                  virtual void enumerateInstanceNames(
 98 chip    1.11         const OperationContext & context,
 99                      const CIMObjectPath & classReference,
100 kumpf   1.16         ObjectPathResponseHandler & handler);
101 chip    1.5  
102                  virtual void modifyInstance(
103 chip    1.11         const OperationContext & context,
104                      const CIMObjectPath & instanceReference,
105                      const CIMInstance & instanceObject,
106 kumpf   1.17         const Boolean includeQualifiers,
107 chip    1.11         const CIMPropertyList & propertyList,
108 kumpf   1.16         ResponseHandler & handler);
109 chip    1.5  
110                  virtual void createInstance(
111 chip    1.11         const OperationContext & context,
112                      const CIMObjectPath & instanceReference,
113                      const CIMInstance & instanceObject,
114 kumpf   1.16         ObjectPathResponseHandler & handler);
115 chip    1.5  
116                  virtual void deleteInstance(
117 chip    1.11         const OperationContext & context,
118                      const CIMObjectPath & instanceReference,
119 kumpf   1.16         ResponseHandler & handler);
120 chip    1.5  
121                  // CIMClassProvider interface
122                  virtual void getClass(
123 chip    1.11         const OperationContext & context,
124                      const CIMObjectPath & classReference,
125 kumpf   1.17         const Boolean localOnly,
126                      const Boolean includeQualifiers,
127                      const Boolean includeClassOrigin,
128 chip    1.11         const CIMPropertyList & propertyList,
129 kumpf   1.16         ClassResponseHandler & handler);
130 chip    1.5  
131                  virtual void enumerateClasses(
132 chip    1.11         const OperationContext & context,
133                      const CIMObjectPath & classReference,
134 kumpf   1.17         const Boolean deepInheritance,
135                      const Boolean localOnly,
136                      const Boolean includeQualifiers,
137                      const Boolean includeClassOrigin,
138 kumpf   1.16         ClassResponseHandler & handler);
139 chip    1.5  
140                  virtual void enumerateClassNames(
141 chip    1.11         const OperationContext & context,
142                      const CIMObjectPath & classReference,
143 kumpf   1.17         const Boolean deepInheritance,
144 kumpf   1.16         ObjectPathResponseHandler & handler);
145 chip    1.5  
146                  virtual void modifyClass(
147 chip    1.11         const OperationContext & context,
148                      const CIMObjectPath & classReference,
149                      const CIMClass & classObject,
150 kumpf   1.16         ResponseHandler & handler);
151 chip    1.5  
152                  virtual void createClass(
153 chip    1.11         const OperationContext & context,
154                      const CIMObjectPath & classReference,
155                      const CIMClass & classObject,
156 kumpf   1.16         ResponseHandler & handler);
157 chip    1.5  
158                  virtual void deleteClass(
159 chip    1.11         const OperationContext & context,
160                      const CIMObjectPath & classReference,
161 kumpf   1.16         ResponseHandler & handler);
162 chip    1.5  
163                  // CIMAssociationProvider interface
164                  virtual void associators(
165 chip    1.11         const OperationContext & context,
166                      const CIMObjectPath & objectName,
167 kumpf   1.15         const CIMName & associationClass,
168                      const CIMName & resultClass,
169 chip    1.11         const String & role,
170                      const String & resultRole,
171 kumpf   1.17         const Boolean includeQualifiers,
172                      const Boolean includeClassOrigin,
173 chip    1.11         const CIMPropertyList & propertyList,
174 kumpf   1.16         ObjectResponseHandler & handler);
175 chip    1.5  
176                  virtual void associatorNames(
177 chip    1.11         const OperationContext & context,
178                      const CIMObjectPath & objectName,
179 kumpf   1.15         const CIMName & associationClass,
180                      const CIMName & resultClass,
181 chip    1.11         const String & role,
182                      const String & resultRole,
183 kumpf   1.16         ObjectPathResponseHandler & handler);
184 chip    1.5  
185                  virtual void references(
186 chip    1.11         const OperationContext & context,
187                      const CIMObjectPath & objectName,
188 kumpf   1.15         const CIMName & resultClass,
189 chip    1.11         const String & role,
190 kumpf   1.17         const Boolean includeQualifiers,
191                      const Boolean includeClassOrigin,
192 chip    1.11         const CIMPropertyList & propertyList,
193 kumpf   1.16         ObjectResponseHandler & handler);
194 chip    1.5  
195                  virtual void referenceNames(
196 chip    1.11         const OperationContext & context,
197                      const CIMObjectPath & objectName,
198 kumpf   1.15         const CIMName & resultClass,
199 chip    1.11         const String & role,
200 kumpf   1.16         ObjectPathResponseHandler & handler);
201 chip    1.5  
202 kumpf   1.27     // Property operation interfaces
203                  // Note: Property operations are not supported at the provider level.
204                  // These methods should be removed, and the caller should be changed to
205                  // use the CIMInstanceProvider interface.
206 chip    1.5      virtual void getProperty(
207 chip    1.11         const OperationContext & context,
208                      const CIMObjectPath & instanceReference,
209 kumpf   1.15         const CIMName & propertyName,
210 kumpf   1.16         ValueResponseHandler & handler);
211 chip    1.5  
212                  virtual void setProperty(
213 chip    1.11         const OperationContext & context,
214                      const CIMObjectPath & instanceReference,
215 kumpf   1.15         const CIMName & propertyName,
216 chip    1.11         const CIMValue & newValue,
217 kumpf   1.16         ResponseHandler & handler);
218 chip    1.5  
219                  // CIMMethodProviderFacade
220                  virtual void invokeMethod(
221 chip    1.11         const OperationContext & context,
222                      const CIMObjectPath & objectReference,
223 kumpf   1.15         const CIMName & methodName,
224 chip    1.11         const Array<CIMParamValue> & inParameters,
225 kumpf   1.16         MethodResultResponseHandler & handler);
226 chip    1.5  
227                  // CIMQueryProvider interface
228                  virtual void executeQuery(
229 chip    1.11         const OperationContext & context,
230 kumpf   1.15         const CIMNamespaceName & nameSpace,
231 chip    1.11         const String & queryLanguage,
232                      const String & query,
233 kumpf   1.16         ObjectResponseHandler & handler);
234 chip    1.5  
235                  // CIMIndicationProvider interface
236 chip    1.8      virtual void enableIndications(
237 kumpf   1.16         IndicationResponseHandler & handler);
238 chip    1.6  
239 chip    1.8      virtual void disableIndications(void);
240 chip    1.6  
241                  virtual void createSubscription(
242 chip    1.11         const OperationContext & context,
243                      const CIMObjectPath & subscriptionName,
244                      const Array<CIMObjectPath> & classNames,
245                      const CIMPropertyList & propertyList,
246                      const Uint16 repeatNotificationPolicy);
247 chip    1.6  
248                  virtual void modifySubscription(
249 chip    1.11         const OperationContext & context,
250                      const CIMObjectPath & subscriptionName,
251                      const Array<CIMObjectPath> & classNames,
252                      const CIMPropertyList & propertyList,
253                      const Uint16 repeatNotificationPolicy);
254 chip    1.6  
255                  virtual void deleteSubscription(
256 chip    1.11         const OperationContext & context,
257                      const CIMObjectPath & subscriptionName,
258                      const Array<CIMObjectPath> & classNames);
259 chip    1.5  
260 kumpf   1.21     // CIMIndicationConsumerProvider interface
261                  virtual void consumeIndication(
262 chip    1.11         const OperationContext & context,
263 kumpf   1.21         const String & destinationPath,
264 mday    1.19         const CIMInstance& indicationInstance);
265                  
266 chip    1.1  protected:
267 a.arora 1.26     AutoPtr<CIMProvider> _provider; //PEP101
268 mday    1.19     AtomicInt _current_operations;
269 kumpf   1.25     Boolean _indications_enabled;
270 mday    1.19 };
271 chip    1.1  
272              
273              PEGASUS_NAMESPACE_END
274              
275              #endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2