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

  1 karl  1.21 //%2006////////////////////////////////////////////////////////////////////////
  2 karl  1.1  //
  3 karl  1.7  // 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.7  // 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.8  // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10            // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.21 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12            // EMC Corporation; Symantec Corporation; The Open Group.
 13 karl  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.2  // 
 21 karl  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            // Author: Karl Schopmeyer (k.schopmeyer@opengrooup.org)
 33            //
 34            // Modified By:
 35            //
 36            //%////////////////////////////////////////////////////////////////////////////
 37            
 38            
 39            #ifndef InteropProvider_h
 40            #define InteropProvider_h
 41            
 42 karl  1.1  ///////////////////////////////////////////////////////////////////////////////
 43            //  Interop Provider
 44            ///////////////////////////////////////////////////////////////////////////////
 45            
 46            #include <Pegasus/Common/Config.h>
 47            #include <Pegasus/ControlProviders/InteropProvider/Linkage.h>
 48            
 49            #include <Pegasus/Common/String.h>
 50            #include <Pegasus/Common/System.h>
 51            #include <Pegasus/Common/ArrayInternal.h>
 52            #include <Pegasus/Common/CIMType.h>
 53            #include <Pegasus/Common/CIMInstance.h>
 54            #include <Pegasus/Common/CIMObjectPath.h>
 55            #include <Pegasus/Common/InternalException.h>
 56            #include <Pegasus/Common/CIMStatusCode.h>
 57            #include <Pegasus/Common/Tracer.h>
 58            #include <Pegasus/Config/ConfigManager.h>
 59            
 60            #include <Pegasus/Repository/CIMRepository.h>
 61            #include <Pegasus/Provider/CIMInstanceProvider.h>
 62            #include <Pegasus/Provider/CIMAssociationProvider.h>
 63 karl  1.1  
 64            PEGASUS_NAMESPACE_BEGIN
 65            
 66            /**
 67                The InteropProvider provides information and manipulates the
 68                following classes from the DMTF CIM_Interop schema:
 69                CIM_Namespace - Creation and deletion of namespaces
 70 karl  1.5      Note: Effective Pegasus 2.4, it processes PG_Namespace
 71 karl  1.1      __Namespace - Creation and deletion of namespaces (deprecated)
 72                CIM_ObjectManager - Reports on the status of the object manager
 73                CIM_ObjectManagerCommunicationMechanism - Reports on CIMOM communications
 74                COM_CIMXMLCommunicationMechanism - Reports on CIMXML communications
 75                CIM_ProtocolAdapter
 76                
 77                Associations
 78                NamespaceinManager
 79                
 80                creation and deletion of namespaces using the __namespace class
 81                Note however, that the DMTF specification model does not define a class for
 82                __namespace so that it is, a "false" class.  We assume that it has the
 83                same characteristics as the CIM_namespace class defined in CIM 2.6.
 84            
 85                This provider implements the following functions:
 86                - createInstance		( adds a new namespace to the repository)
 87 karl  1.15     - getInstance		( Gets one instance of any supported object)
 88                - modifyInstance		( Limited Support - selected fields in CIM_Namespace)
 89                - enumerateInstances	( Lists all namespaces of all supported classes)
 90                - enumerateInstanceNames	( Lists all namespace names of all supported classes )
 91                - reference and associations 
 92 karl  1.1      TBD
 93            */
 94            
 95            class PEGASUS_INTEROPPROVIDER_LINKAGE InteropProvider :
 96            	public CIMInstanceProvider, public CIMAssociationProvider
 97            {
 98            public:
 99            
100 w.white 1.11     InteropProvider(CIMRepository* repository);
101 karl    1.1      virtual ~InteropProvider()
102                  {
103              	PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,"InteropProvider::~InteropProvider");
104              
105              	PEG_METHOD_EXIT();
106                  }
107              
108                  virtual void createInstance(
109 karl    1.15     	const OperationContext & context,
110                  	const CIMObjectPath & instanceReference,
111 karl    1.1          const CIMInstance& myInstance,
112 karl    1.15     	ObjectPathResponseHandler & handler);
113 karl    1.1  
114                  virtual void deleteInstance(
115 karl    1.15     	const OperationContext & context,
116 karl    1.1          const CIMObjectPath& instanceName,
117 karl    1.15     	ResponseHandler & handler);
118 karl    1.1  
119                  virtual void getInstance(
120 karl    1.15     	const OperationContext & context,
121 karl    1.1          const CIMObjectPath& instanceName,
122 karl    1.15     	const Boolean includeQualifiers,
123                  	const Boolean includeClassOrigin,
124 karl    1.1          const CIMPropertyList& propertyList,
125 karl    1.15     	InstanceResponseHandler & handler);
126 karl    1.1  
127                  void modifyInstance(
128 karl    1.15     	const OperationContext & context,
129                  	const CIMObjectPath & instanceReference,
130 karl    1.1          const CIMInstance& modifiedIns,
131 karl    1.15     	const Boolean includeQualifiers,
132 karl    1.1          const CIMPropertyList& propertyList,
133 karl    1.5  	ResponseHandler & handler);
134 karl    1.1  
135                  virtual void enumerateInstances(
136 karl    1.15     	const OperationContext & context,
137                  	const CIMObjectPath & ref,
138                  	const Boolean includeQualifiers,
139                  	const Boolean includeClassOrigin,
140 karl    1.1          const CIMPropertyList& propertyList,
141 karl    1.15     	InstanceResponseHandler & handler);
142 karl    1.1  
143                  virtual void enumerateInstanceNames(
144              	const OperationContext & context,
145              	const CIMObjectPath & classReference,
146                      ObjectPathResponseHandler & handler);
147              
148                  // Association Interfaces
149                 
150              	// CIMAssociationProvider interface
151              	virtual void associators(
152              		const OperationContext & context,
153              		const CIMObjectPath & objectName,
154              		const CIMName & associationClass,
155              		const CIMName & resultClass,
156              		const String & role,
157              		const String & resultRole,
158              		const Boolean includeQualifiers,
159              		const Boolean includeClassOrigin,
160              		const CIMPropertyList & propertyList,
161              		ObjectResponseHandler & handler);
162              
163 karl    1.1  	virtual void associatorNames(
164              		const OperationContext & context,
165              		const CIMObjectPath & objectName,
166              		const CIMName & associationClass,
167              		const CIMName & resultClass,
168              		const String & role,
169              		const String & resultRole,
170              		ObjectPathResponseHandler & handler);
171              
172              	virtual void references(
173              		const OperationContext & context,
174              		const CIMObjectPath & objectName,
175              		const CIMName & resultClass,
176              		const String & role,
177              		const Boolean includeQualifiers,
178              		const Boolean includeClassOrigin,
179              		const CIMPropertyList & propertyList,
180              		ObjectResponseHandler & handler);
181              
182              	virtual void referenceNames(
183              		const OperationContext & context,
184 karl    1.1  		const CIMObjectPath & objectName,
185              		const CIMName & resultClass,
186              		const String & role,
187              		ObjectPathResponseHandler & handler);
188                  
189                  /**
190                  Standard initialization function for the provider.
191                  */
192                  void initialize(CIMOMHandle& cimomHandle)
193                  {
194                  }
195              
196                  void terminate(void)
197                  {
198 konrad.r 1.10 	// delete self. this is necessary because the entry point for this object allocated it, and
199                   	// the module is responsible for its memory management.
200               	delete this;
201 karl     1.1      }
202               
203               private:
204               
205 karl     1.12     CIMInstance _buildInstanceSkeleton(
206                       const CIMObjectPath & objectPath,
207 karl     1.13         const CIMName& className,
208                       CIMClass& returnedClass);
209 karl     1.12 
210                   CIMObjectPath _buildObjectPath(
211                       const CIMObjectPath& objectPath,
212                       const CIMName& className, 
213                       const CIMInstance& instance);
214                   CIMObjectPath _buildInstancePath(
215                       const CIMObjectPath& objectPath,
216                       const CIMName& className, 
217                       const CIMInstance& instance);
218 karl     1.1      
219 karl     1.12     CIMClass _getClass(const CIMObjectPath& objectPath,
220                       const CIMName& className);
221 karl     1.1  
222                   Array<CIMNamespaceName> _enumerateNameSpaces();
223                   
224 tony     1.4      CIMInstance _buildInstancePGCIMXMLCommunicationMechanism(
225 karl     1.12         const CIMObjectPath& objectPath,
226 tony     1.4          const String& namespaceType,
227 karl     1.14         const Uint16& accessProtocol,
228 karl     1.15         const String& IPAddress);
229 tony     1.4  
230                   Array<CIMInstance> _buildInstancesPGCIMXMLCommunicationMechanism(
231 karl     1.15         const CIMObjectPath& objectPath);
232 tony     1.4  
233 karl     1.12     CIMInstance _getInstanceCIMObjectManager(
234                       const CIMObjectPath& objectPath,
235                       const Boolean includeQualifiers,
236                       const Boolean includeClassOrigin,
237                       const CIMPropertyList& propertyList);
238 tony     1.4  
239 karl     1.18     String _getObjectManagerName();
240               
241 karl     1.12     Array<CIMInstance> _getInstancesCIMNamespace(
242 karl     1.15         const CIMObjectPath& objectPath);
243 tony     1.4  
244 karl     1.12     CIMInstance _getInstanceCIMNamespace(
245                       const CIMObjectPath& objectPath);
246 karl     1.1      //
247 karl     1.12     CIMInstance _buildInstancePGNamespace(
248                       const CIMObjectPath& objectPath,
249                               CIMNamespaceName& nameSpace);
250 tony     1.4  
251 karl     1.12     Array<CIMInstance> _buildInstancesNamespaceInManager(
252                       const CIMObjectPath& objectPath);
253 tony     1.4  
254 karl     1.12     Array<CIMInstance> _buildInstancesCommMechanismForManager(
255                       const CIMObjectPath& objectPath);
256 tony     1.4  
257 karl     1.9      Boolean _getInstanceFromRepositoryCIMObjectManager(
258 karl     1.12         const CIMObjectPath& objectPath,
259                       CIMInstance& rtnInstance,
260                       const Boolean includeQualifiers,
261                       const Boolean includeClassOrigin,
262                       const CIMPropertyList& propertyList);
263 karl     1.6  
264 karl     1.20     Boolean isModifyAllowed(const OperationContext & context,
265 karl     1.19         const CIMObjectPath & instanceReference,
266                       const CIMInstance& modifiedIns,
267                       const Boolean includeQualifiers,
268                       const CIMPropertyList& propertyList,
269                       const CIMPropertyList& allowedModifyProperties);
270               
271 karl     1.6      void modifyObjectManagerInstance(const OperationContext & context,
272                       const CIMObjectPath & instanceReference,
273                       const CIMInstance& modifiedIns,
274                       const Boolean includeQualifiers,
275 karl     1.19         const CIMPropertyList& propertyList);
276 karl     1.6  
277 karl     1.15     // The following are internal equivalents of the operations
278                   // allowing the operations to call one another internally within
279                   // the provider.
280 karl     1.16     Array<CIMInstance> localEnumerateInstances(
281 karl     1.15         const OperationContext & context,
282                       const CIMObjectPath & ref,
283                       const Boolean includeQualifiers,
284                       const Boolean includeClassOrigin,
285                       const CIMPropertyList& propertyList);
286               
287 karl     1.16     Array<CIMObject> localReferences(
288 karl     1.15     	const OperationContext & context,
289                   	const CIMObjectPath & objectName,
290                   	const CIMName & resultClass,
291                   	const String & role,
292                   	const Boolean includeQualifiers,
293                   	const Boolean includeClassOrigin,
294                   	const CIMPropertyList & propertyList);
295               
296 karl     1.17     CIMInstance localGetInstance(
297 karl     1.15         const OperationContext & context,
298                       const CIMObjectPath & instanceName,
299                       const Boolean includeQualifiers,
300                       const Boolean includeClassOrigin,
301                       const CIMPropertyList & propertyList);
302 karl     1.18 
303                       // Repository Instance variable
304 karl     1.1         CIMRepository*   _repository;
305 karl     1.18        // local save for name of object manager
306                      String _objectManagerName;
307 karl     1.1  };
308               
309               PEGASUS_NAMESPACE_END
310               
311               #endif // InteropProvider_h

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2