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

  1 karl  1.8 //%2005////////////////////////////////////////////////////////////////////////
  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.1 //
 12           // Permission is hereby granted, free of charge, to any person obtaining a copy
 13           // of this software and associated documentation files (the "Software"), to
 14           // deal in the Software without restriction, including without limitation the
 15           // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 16           // sell copies of the Software, and to permit persons to whom the Software is
 17           // furnished to do so, subject to the following conditions:
 18 karl  1.2 // 
 19 karl  1.1 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 20           // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 21           // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 22           // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 23           // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 24           // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 25           // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 26           // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 27           //
 28           //==============================================================================
 29           //
 30           // Author: Karl Schopmeyer (k.schopmeyer@opengrooup.org)
 31           //
 32           // Modified By:
 33           //
 34           //%////////////////////////////////////////////////////////////////////////////
 35           
 36           
 37           #ifndef InteropProvider_h
 38           #define InteropProvider_h
 39           
 40 karl  1.1 ///////////////////////////////////////////////////////////////////////////////
 41           //  Interop Provider
 42           ///////////////////////////////////////////////////////////////////////////////
 43           
 44           #include <Pegasus/Common/Config.h>
 45           #include <Pegasus/ControlProviders/InteropProvider/Linkage.h>
 46           
 47           #include <Pegasus/Common/String.h>
 48           #include <Pegasus/Common/System.h>
 49           #include <Pegasus/Common/ArrayInternal.h>
 50           #include <Pegasus/Common/CIMType.h>
 51           #include <Pegasus/Common/CIMInstance.h>
 52           #include <Pegasus/Common/CIMObjectPath.h>
 53           #include <Pegasus/Common/InternalException.h>
 54           #include <Pegasus/Common/CIMStatusCode.h>
 55           #include <Pegasus/Common/Tracer.h>
 56           #include <Pegasus/Config/ConfigManager.h>
 57           
 58           #include <Pegasus/Repository/CIMRepository.h>
 59           #include <Pegasus/Provider/CIMInstanceProvider.h>
 60           #include <Pegasus/Provider/CIMAssociationProvider.h>
 61 karl  1.1 
 62           PEGASUS_NAMESPACE_BEGIN
 63           
 64           /**
 65               The InteropProvider provides information and manipulates the
 66               following classes from the DMTF CIM_Interop schema:
 67               CIM_Namespace - Creation and deletion of namespaces
 68 karl  1.5     Note: Effective Pegasus 2.4, it processes PG_Namespace
 69 karl  1.1     __Namespace - Creation and deletion of namespaces (deprecated)
 70               CIM_ObjectManager - Reports on the status of the object manager
 71               CIM_ObjectManagerCommunicationMechanism - Reports on CIMOM communications
 72               COM_CIMXMLCommunicationMechanism - Reports on CIMXML communications
 73               CIM_ProtocolAdapter
 74               
 75               Associations
 76               NamespaceinManager
 77               
 78               creation and deletion of namespaces using the __namespace class
 79               Note however, that the DMTF specification model does not define a class for
 80               __namespace so that it is, a "false" class.  We assume that it has the
 81               same characteristics as the CIM_namespace class defined in CIM 2.6.
 82           
 83               This provider implements the following functions:
 84               - createInstance		( adds a new namespace to the repository)
 85               - getInstance		( Gets one instance containing a namespace name)
 86 karl  1.5     - modifyInstance		( Limited Support)
 87 karl  1.1     - enumerateInstances	( Lists all namespaces as Instances)
 88               - enumerateInstanceNames	( Lists all namespace names )
 89               TBD
 90           */
 91           
 92           class PEGASUS_INTEROPPROVIDER_LINKAGE InteropProvider :
 93           	public CIMInstanceProvider, public CIMAssociationProvider
 94           {
 95           public:
 96           
 97               InteropProvider(CIMRepository* repository)
 98               {
 99           	PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,"InteropProvider::InteropProvider");
100                   _repository = repository;
101           	PEG_METHOD_EXIT();
102               }
103           
104               virtual ~InteropProvider()
105               {
106           	PEG_METHOD_ENTER(TRC_CONTROLPROVIDER,"InteropProvider::~InteropProvider");
107           
108 karl  1.1 	PEG_METHOD_EXIT();
109               }
110           
111               virtual void createInstance(
112           	const OperationContext & context,
113           	const CIMObjectPath & instanceReference,
114                   const CIMInstance& myInstance,
115           	ObjectPathResponseHandler & handler);
116           
117               virtual void deleteInstance(
118           	const OperationContext & context,
119                   const CIMObjectPath& instanceName,
120           	ResponseHandler & handler);
121           
122               virtual void getInstance(
123           	const OperationContext & context,
124                   const CIMObjectPath& instanceName,
125           	const Boolean includeQualifiers,
126           	const Boolean includeClassOrigin,
127                   const CIMPropertyList& propertyList,
128           	InstanceResponseHandler & handler);
129 karl  1.1 
130               void modifyInstance(
131           	const OperationContext & context,
132           	const CIMObjectPath & instanceReference,
133                   const CIMInstance& modifiedIns,
134           	const Boolean includeQualifiers,
135                   const CIMPropertyList& propertyList,
136 karl  1.5 	ResponseHandler & handler);
137 karl  1.1 
138               virtual void enumerateInstances(
139           	const OperationContext & context,
140           	const CIMObjectPath & ref,
141           	const Boolean includeQualifiers,
142           	const Boolean includeClassOrigin,
143                   const CIMPropertyList& propertyList,
144           	InstanceResponseHandler & handler);
145           
146               virtual void enumerateInstanceNames(
147           	const OperationContext & context,
148           	const CIMObjectPath & classReference,
149                   ObjectPathResponseHandler & handler);
150           
151               // Association Interfaces
152              
153           	// CIMAssociationProvider interface
154           	virtual void associators(
155           		const OperationContext & context,
156           		const CIMObjectPath & objectName,
157           		const CIMName & associationClass,
158 karl  1.1 		const CIMName & resultClass,
159           		const String & role,
160           		const String & resultRole,
161           		const Boolean includeQualifiers,
162           		const Boolean includeClassOrigin,
163           		const CIMPropertyList & propertyList,
164           		ObjectResponseHandler & handler);
165           
166           	virtual void associatorNames(
167           		const OperationContext & context,
168           		const CIMObjectPath & objectName,
169           		const CIMName & associationClass,
170           		const CIMName & resultClass,
171           		const String & role,
172           		const String & resultRole,
173           		ObjectPathResponseHandler & handler);
174           
175           	virtual void references(
176           		const OperationContext & context,
177           		const CIMObjectPath & objectName,
178           		const CIMName & resultClass,
179 karl  1.1 		const String & role,
180           		const Boolean includeQualifiers,
181           		const Boolean includeClassOrigin,
182           		const CIMPropertyList & propertyList,
183           		ObjectResponseHandler & handler);
184           
185           	virtual void referenceNames(
186           		const OperationContext & context,
187           		const CIMObjectPath & objectName,
188           		const CIMName & resultClass,
189           		const String & role,
190           		ObjectPathResponseHandler & handler);
191               
192               /**
193               Standard initialization function for the provider.
194               */
195               void initialize(CIMOMHandle& cimomHandle)
196               {
197               }
198           
199               void terminate(void)
200 karl  1.1     {
201 konrad.r 1.10 	// delete self. this is necessary because the entry point for this object allocated it, and
202                   	// the module is responsible for its memory management.
203               	delete this;
204 karl     1.1      }
205               
206               private:
207               
208 tony     1.4  
209                   CIMInstance _buildInstanceSkeleton(const CIMName& className);
210               
211                   CIMObjectPath _buildReference(const CIMInstance& instance,
212                        const CIMName& className);
213               
214                   CIMObjectPath _buildObjectPath(const CIMNamespaceName& name,
215                                             const CIMName& className, 
216                                             const CIMInstance& instance);
217                   CIMObjectPath _buildInstancePath(const CIMNamespaceName& name,
218                                             const CIMName& className, 
219 karl     1.1                                const CIMInstance& instance);
220                   
221                   CIMClass _getClass(const CIMNamespaceName& nameSpace, const CIMName& className);
222               
223                   Array<CIMNamespaceName> _enumerateNameSpaces();
224                   
225 tony     1.4      CIMInstance _buildInstancePGCIMXMLCommunicationMechanism(
226                       const String& namespaceType,
227                       const String& IPAddress,
228                       const Boolean& includeQualifiers,
229                       const Boolean& includeClassOrigin,
230                       const CIMPropertyList& propertyList);
231               
232                   Array<CIMInstance> _buildInstancesPGCIMXMLCommunicationMechanism(
233                       const Boolean includeQualifiers,
234                       const Boolean includeClassOrigin,
235                       const CIMPropertyList& propertyList);
236               
237 karl     1.9      CIMInstance _getInstanceCIMObjectManager(const Boolean includeQualifiers,
238 tony     1.4                                             const Boolean includeClassOrigin,
239                                                          const CIMPropertyList& propertyList);
240               
241                   Array<CIMInstance> _getInstancesCIMNamespace(const Boolean& includeQualifiers,
242                                                           const Boolean& includeClassOrigin,
243                                                           const CIMPropertyList& propertyList);
244               
245               
246                   CIMInstance _getInstanceCIMNamespace(const CIMNamespaceName & nameSpace);
247 karl     1.1      //
248 karl     1.5      CIMInstance _buildInstancePGNamespace(const CIMNamespaceName & nameSpace);
249 tony     1.4  
250               
251                   Array<CIMInstance> _buildInstancesNamespaceInManager();
252               
253                   Array<CIMInstance> _buildInstancesCommMechanismForManager();
254               
255 karl     1.6  
256 karl     1.9      Boolean _getInstanceFromRepositoryCIMObjectManager(
257                                       CIMInstance& rtnInstance,
258 karl     1.6                          const Boolean includeQualifiers,
259                                       const Boolean includeClassOrigin,
260                                       const CIMPropertyList& propertyList);
261               
262                   void modifyObjectManagerInstance(const OperationContext & context,
263                       const CIMObjectPath & instanceReference,
264                       const CIMInstance& modifiedIns,
265                       const Boolean includeQualifiers,
266                       const CIMPropertyList& propertyList,
267                       ResponseHandler & handler);
268               
269 karl     1.1      // Repository Instance variable
270                   //
271                      CIMRepository*   _repository;
272                      CIMClass * _cimNamespaceClass;
273                      CIMNamespaceName _operationNamespace;
274 karl     1.9         //CIMInstance instanceOfCIMObjectManager;
275 karl     1.1  };
276               
277               PEGASUS_NAMESPACE_END
278               
279               #endif // InteropProvider_h

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2