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

  1 mike  1.1 //BEGIN_LICENSE
  2           //
  3           // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM
  4           //
  5           // Permission is hereby granted, free of charge, to any person obtaining a
  6           // copy of this software and associated documentation files (the "Software"),
  7           // to deal in the Software without restriction, including without limitation
  8           // the rights to use, copy, modify, merge, publish, distribute, sublicense,
  9           // and/or sell copies of the Software, and to permit persons to whom the
 10           // Software is furnished to do so, subject to the following conditions:
 11           //
 12           // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 13           // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 14           // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 15           // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 16           // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 17           // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 18           // DEALINGS IN THE SOFTWARE.
 19           //
 20           //END_LICENSE
 21           //BEGIN_HISTORY
 22 mike  1.1 //
 23           // Author:
 24           //
 25 mike  1.2 // $Log: Client.h,v $
 26 mike  1.4 // Revision 1.3  2001/02/06 17:04:03  karl
 27           // add documentation
 28           //
 29 karl  1.3 // Revision 1.2  2001/01/31 08:20:51  mike
 30           // Added dispatcher framework.
 31           // Added enumerateInstanceNames.
 32           //
 33 mike  1.2 // Revision 1.1.1.1  2001/01/14 19:50:31  mike
 34           // Pegasus import
 35           //
 36 mike  1.1 //
 37           //END_HISTORY
 38           
 39           ////////////////////////////////////////////////////////////////////////////////
 40           //
 41           // Client.h
 42           //
 43           ////////////////////////////////////////////////////////////////////////////////
 44           
 45           #ifndef Pegasus_Client_h
 46           #define Pegasus_Client_h
 47           
 48           #include <fstream>
 49           #include <Pegasus/Common/Config.h>
 50           #include <Pegasus/Common/Operations.h>
 51           #include <Pegasus/Client/ClientException.h>
 52           
 53           PEGASUS_NAMESPACE_BEGIN
 54           
 55           struct ClientRep;
 56 karl  1.3 /** Class Client - This class defines the client interfaces for Pegasus.
 57           These are the interfaces that could be used by a CIM Client written in C++.
 58           These interfaces are based completely on the operations interfaces defined in
 59           the Pegasus Operations.h file with some extensions for the client interface.
 60           @see "The Operations Class"
 61           */
 62 mike  1.1 class PEGASUS_CLIENT_LINKAGE Client : public Operations
 63           {
 64           public:
 65           
 66               enum { DEFAULT_TIMEOUT_MILLISECONDS = 20000 };
 67 karl  1.3     ///
 68 mike  1.1     Client(Uint32 timeOutMilliseconds = DEFAULT_TIMEOUT_MILLISECONDS);
 69 karl  1.3     ///
 70 mike  1.1     ~Client();
 71 karl  1.3     ///
 72               Uint32 getTimeOut() const
 73 mike  1.1     {
 74 karl  1.3 	return _timeOutMilliseconds;
 75 mike  1.1     }
 76 karl  1.3     ///
 77 mike  1.1     void setTimeOut(Uint32 timeOutMilliseconds)
 78               {
 79 karl  1.3 	_timeOutMilliseconds = timeOutMilliseconds;
 80 mike  1.1     }
 81 karl  1.3      ///
 82 mike  1.1     void connect(const char* hostName, Uint32 port);
 83 karl  1.3     ///
 84 mike  1.1     void get(const char* document) const;
 85 karl  1.3     ///
 86 mike  1.1     void runOnce();
 87 karl  1.3     ///
 88 mike  1.1     void runForever();
 89 karl  1.3     ///
 90 mike  1.1     virtual ClassDecl getClass(
 91           	const String& nameSpace,
 92           	const String& className,
 93           	Boolean localOnly = true,
 94           	Boolean includeQualifiers = true,
 95           	Boolean includeClassOrigin = false,
 96           	const Array<String>& propertyList = _getStringArray());
 97 karl  1.3     ///
 98 mike  1.1     virtual InstanceDecl getInstance(
 99           	const String& nameSpace,
100           	const Reference& instanceName,
101           	Boolean localOnly = true,
102           	Boolean includeQualifiers = false,
103           	Boolean includeClassOrigin = false,
104           	const Array<String>& propertyList = _getStringArray());
105 karl  1.3     ///
106 mike  1.1     virtual void deleteClass(
107           	const String& nameSpace,
108           	const String& className);
109 karl  1.3     ///
110 mike  1.1     virtual void deleteInstance(
111           	const String& nameSpace,
112           	const Reference& instanceName);
113 karl  1.3     ///
114 mike  1.1     virtual void createClass(
115           	const String& nameSpace,
116           	ClassDecl& newClass);
117 karl  1.3     ///
118 mike  1.1     virtual void createInstance(
119           	const String& nameSpace,
120 mike  1.4 	InstanceDecl& newInstance) ;
121 karl  1.3     ///
122 mike  1.1     virtual void modifyClass(
123           	const String& nameSpace,
124           	ClassDecl& modifiedClass);
125 karl  1.3     ///
126 mike  1.1     virtual void modifyInstance(
127           	const String& nameSpace,
128           	const InstanceDecl& modifiedInstance);
129 karl  1.3     ///
130 mike  1.1     virtual Array<ClassDecl> enumerateClasses(
131           	const String& nameSpace,
132           	const String& className = String::EMPTY,
133           	Boolean deepInheritance = false,
134           	Boolean localOnly = true,
135           	Boolean includeQualifiers  = true,
136           	Boolean includeClassOrigin = false);
137 karl  1.3     ///
138 mike  1.1     virtual Array<String> enumerateClassNames(
139           	const String& nameSpace,
140           	const String& className = String::EMPTY,
141           	Boolean deepInheritance = false);
142 karl  1.3     ///
143 mike  1.1     virtual Array<InstanceDecl> enumerateInstances(
144           	const String& nameSpace,
145           	const String& className,
146           	Boolean deepInheritance = true,
147           	Boolean localOnly = true,
148           	Boolean includeQualifiers = false,
149           	Boolean includeClassOrigin = false,
150           	const Array<String>& propertyList = _getStringArray());
151 karl  1.3     ///
152 mike  1.2     virtual Array<Reference> enumerateInstanceNames(
153 mike  1.1 	const String& nameSpace,
154           	const String& className);
155 karl  1.3     ///
156 mike  1.1     virtual Array<InstanceDecl> execQuery(
157           	const String& queryLanguage,
158           	const String& query) ;
159 karl  1.3     ///
160 mike  1.1     virtual Array<InstanceDecl> associators(
161           	const String& nameSpace,
162           	const Reference& objectName,
163           	const String& assocClass = String::EMPTY,
164           	const String& resultClass = String::EMPTY,
165           	const String& role = String::EMPTY,
166           	const String& resultRole = String::EMPTY,
167           	Boolean includeQualifiers = false,
168           	Boolean includeClassOrigin = false,
169           	const Array<String>& propertyList = _getStringArray());
170 karl  1.3     ///
171 mike  1.1     virtual Array<Reference> associatorNames(
172           	const String& nameSpace,
173           	const Reference& objectName,
174           	const String& assocClass = String::EMPTY,
175           	const String& resultClass = String::EMPTY,
176           	const String& role = String::EMPTY,
177           	const String& resultRole = String::EMPTY);
178 karl  1.3     ///
179 mike  1.1     virtual Array<InstanceDecl> references(
180           	const String& nameSpace,
181           	const Reference& objectName,
182           	const String& resultClass = String::EMPTY,
183           	const String& role = String::EMPTY,
184           	Boolean includeQualifiers = false,
185           	Boolean includeClassOrigin = false,
186           	const Array<String>& propertyList = _getStringArray());
187 karl  1.3     ///
188 mike  1.1     virtual Array<Reference> referenceNames(
189           	const String& nameSpace,
190           	const Reference& objectName,
191           	const String& resultClass = String::EMPTY,
192           	const String& role = String::EMPTY);
193 karl  1.3     ///
194 mike  1.1     virtual Value getProperty(
195           	const String& nameSpace,
196           	const Reference& instanceName,
197           	const String& propertyName);
198 karl  1.3     ////
199 mike  1.1     virtual void setProperty(
200           	const String& nameSpace,
201           	const Reference& instanceName,
202           	const String& propertyName,
203           	const Value& newValue = Value());
204 karl  1.3     ///
205 mike  1.1     virtual QualifierDecl getQualifier(
206           	const String& nameSpace,
207           	const String& qualifierName);
208 karl  1.3     ///
209 mike  1.1     virtual void setQualifier(
210           	const String& nameSpace,
211           	const QualifierDecl& qualifierDeclaration);
212 karl  1.3     ///
213 mike  1.1     virtual void deleteQualifier(
214           	const String& nameSpace,
215           	const String& qualifierName);
216 karl  1.3     ///
217 mike  1.1     virtual Array<QualifierDecl> enumerateQualifiers(
218           	const String& nameSpace);
219 karl  1.3     ///
220 mike  1.1     virtual Value invokeMethod(
221           	const String& nameSpace,
222           	const Reference& instanceName,
223           	const String& methodName,
224           	const Array<Value>& inParameters,
225           	Array<Value>& outParameters);
226           
227           private:
228           
229               static Array<String> _getStringArray()
230               {
231           	return Array<String>();
232               }
233           
234               void _sendMessage(const Array<Sint8>& message);
235           
236               ClientRep* _rep;
237               void* _handler;
238               Uint32 _timeOutMilliseconds;
239           };
240           
241 mike  1.1 PEGASUS_NAMESPACE_END
242           
243           #endif /* Pegasus_Client_h */
244 karl  1.3 

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2