(file) Return to WMIClassProvider.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / WMIMapper / WMIProvider

  1 karl  1.7 //%2006////////////////////////////////////////////////////////////////////////
  2 kumpf 1.1 //
  3 karl  1.5 // 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.4 // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.5 // 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.6 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10           // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.7 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12           // EMC Corporation; Symantec Corporation; The Open Group.
 13 kumpf 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           // 
 21           // 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: Barbara Packard (barbara_packard@hp.com)
 33           //
 34 kumpf 1.2 // Modified By:	Adriano Zanuz (adriano.zanuz@hp.com)
 35 kumpf 1.3 //              Jair Santos, Hewlett-Packard Company (jair.santos@hp.com)
 36 kumpf 1.1 //
 37           //%/////////////////////////////////////////////////////////////////////////////
 38           
 39           #ifndef Pegasus_WMIClassProvider_h
 40           #define Pegasus_WMIClassProvider_h
 41           
 42 kumpf 1.2 #include "Stdafx.h"
 43 kumpf 1.1 #include <WMIMapper/WMIProvider/WMIBaseProvider.h>
 44 kumpf 1.2 #include <WMIMapper/WMIProvider/WMIQualifier.h>
 45 kumpf 1.1 
 46           PEGASUS_NAMESPACE_BEGIN
 47           
 48           
 49           class WMICollector; 
 50           
 51           class PEGASUS_WMIPROVIDER_LINKAGE WMIClassProvider : public WMIBaseProvider
 52           {
 53           public:
 54           	WMIClassProvider(void);
 55           	virtual ~WMIClassProvider(void);
 56           
 57               /// virtual class CIMClass. From the operations class
 58               virtual CIMClass getClass(
 59                   const String& nameSpace,
 60 kumpf 1.2         const String& userName,
 61                   const String& password,
 62 kumpf 1.1         const String& className,
 63                   Boolean localOnly = true,
 64                   Boolean includeQualifiers = true,
 65                   Boolean includeClassOrigin = false,
 66                   const CIMPropertyList& propertyList = CIMPropertyList());	
 67           
 68           	// deleteClass
 69           	virtual void deleteClass(
 70           		const String& nameSpace, 
 71 kumpf 1.2         const String& userName,
 72                   const String& password,
 73 kumpf 1.1 		const String& className);
 74           
 75           	// createClass
 76           	virtual void createClass(
 77           		const String& nameSpace, 
 78 kumpf 1.2         const String& userName,
 79                   const String& password,
 80 kumpf 1.3 		const CIMClass& newClass,
 81           		Boolean updateClass = false);
 82 kumpf 1.1 
 83           	// modifyClass
 84           	virtual void modifyClass(
 85           		const String& nameSpace, 
 86 kumpf 1.2         const String& userName,
 87                   const String& password,
 88 kumpf 1.1 		const CIMClass& modifiedClass);
 89           
 90               /// enumerateClasses
 91               virtual Array<CIMClass> enumerateClasses(
 92                   const String& nameSpace,
 93 kumpf 1.2         const String& userName,
 94                   const String& password,
 95 kumpf 1.1         const String& className = String::EMPTY,
 96                   Boolean deepInheritance = false,
 97                   Boolean localOnly = true,
 98                   Boolean includeQualifiers = true,
 99                   Boolean includeClassOrigin = false);
100           
101               /// enumerateClassNames
102               virtual Array<CIMName> enumerateClassNames(
103                   const String& nameSpace,
104 kumpf 1.2         const String& userName,
105                   const String& password,
106 kumpf 1.1         const String& className = String::EMPTY,
107                   Boolean deepInheritance = false);
108           
109           protected:
110           	
111 kumpf 1.2 	// verifies if the class already exists into the wmi
112 kumpf 1.3 	void performInitialCheck(const CIMClass& newClass,
113           							 Boolean updateClass = false);
114 kumpf 1.2 
115           	// do the initial consistences defined by the CIM model, this is a step of create class
116           	Boolean classAlreadyExists(const String& className);
117           
118 kumpf 1.1 
119           private:
120 kumpf 1.2 	// create the properties for the new class, this is a step of create class
121           	// keys are a special kind of property
122           	void createProperties(const CIMClass& newClass,
123           						  IWbemServices *pServices,
124           						  IWbemClassObject *pNewClass);
125           	// create the class name and the class qualifiers, this is a step of create class
126           	// if the function could create the name and qualifiers, it returns a valid
127           	// pNewClass.
128           	void createClassNameAndClassQualifiers(const CIMClass& newClass,
129           										   IWbemServices *pServices,
130           										   IWbemClassObject **pNewClass,
131            										   const bool hasSuperClass);
132           	// create the methods of a class
133           	void createMethods (const CIMClass& newClass, IWbemServices *pServices, IWbemClassObject *pNewClass);
134           	
135           	// create one property
136           	void createProperty (const CIMProperty &keyProp, IWbemClassObject *pNewClass);
137           	// create one qualifier
138           	void createQualifier (const WMIQualifier &qualifier, IWbemQualifierSet *pQual);
139           	// create a method
140           	void createMethod (CIMConstMethod &method,
141 kumpf 1.2 					   IWbemServices *pServices,
142           					   IWbemClassObject *pNewClass);
143           	// create a parameter
144           	void createParam (const CIMConstParameter &param, IWbemClassObject *pNewClass);
145 kumpf 1.1 };
146           
147           
148           PEGASUS_NAMESPACE_END
149           
150           #endif // ifndef Pegasus_WMIClassProvider_h

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2