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

  1 mike  1.1.2.1 //%2006////////////////////////////////////////////////////////////////////////
  2               //
  3               // 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               // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
  8               // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
  9               // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10               // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11               // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12               // EMC Corporation; Symantec Corporation; The Open Group.
 13               //
 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 mike  1.1.2.1 // 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               //%/////////////////////////////////////////////////////////////////////////////
 33               
 34               #ifndef Pegasus_Repository_MemoryResidentRepository
 35               #define Pegasus_Repository_MemoryResidentRepository
 36               
 37               #include <Pegasus/Common/Config.h>
 38               #include <Pegasus/Repository/Repository.h>
 39               #include <Pegasus/Common/Pair.h>
 40 mike  1.1.2.2 #include <Pegasus/Common/Buffer.h>
 41 mike  1.1.2.4 #include "MetaTypes.h"
 42 mike  1.1.2.1 
 43               PEGASUS_NAMESPACE_BEGIN
 44               
 45               typedef Pair<CIMNamespaceName, CIMInstance> NamespaceInstancePair;
 46               
 47               #define PEGASUS_ARRAY_T NamespaceInstancePair
 48               # include <Pegasus/Common/ArrayInter.h>
 49               #undef PEGASUS_ARRAY_T
 50               
 51               class RepositoryDeclContext;
 52               class compilerDeclContext;
 53               
 54 mike  1.1.2.2 
 55 mike  1.1.2.1 /** Virtual base class for CIMRepository implementations.
 56               */
 57 mike  1.1.2.2 class PEGASUS_REPOSITORY_LINKAGE MemoryResidentRepository : public Repository
 58 mike  1.1.2.1 {
 59               public:
 60               
 61                   MemoryResidentRepository(
 62                       const String& repositoryRoot, 
 63                       Uint32 repositoryMode);
 64               
 65                   virtual ~MemoryResidentRepository();
 66               
 67                   virtual CIMClass getClass(
 68                       bool lock,
 69                       const CIMNamespaceName& nameSpace,
 70                       const CIMName& className,
 71                       Boolean localOnly,
 72                       Boolean includeQualifiers,
 73                       Boolean includeClassOrigin,
 74                       const CIMPropertyList& propertyList);
 75               
 76                   virtual CIMInstance getInstance(
 77                       bool lock,
 78                       const CIMNamespaceName& nameSpace,
 79 mike  1.1.2.1         const CIMObjectPath& instanceName,
 80                       Boolean localOnly,
 81                       Boolean includeQualifiers,
 82                       Boolean includeClassOrigin,
 83                       const CIMPropertyList& propertyList);
 84               
 85                   virtual void deleteClass(
 86                       bool lock,
 87                       const CIMNamespaceName& nameSpace,
 88                       const CIMName& className);
 89               
 90                   virtual void deleteInstance(
 91                       bool lock,
 92                       const CIMNamespaceName& nameSpace,
 93                       const CIMObjectPath& instanceName);
 94               
 95                   virtual void createClass(
 96                       bool lock,
 97                       const CIMNamespaceName& nameSpace,
 98                       const CIMClass& newClass,
 99                       const ContentLanguageList& contentLangs);
100 mike  1.1.2.1 
101                   virtual CIMObjectPath createInstance(
102                       bool lock,
103                       const CIMNamespaceName& nameSpace,
104                       const CIMInstance& newInstance,
105                       const ContentLanguageList& contentLangs);
106               
107                   virtual void modifyClass(
108                       bool lock,
109                       const CIMNamespaceName& nameSpace,
110                       const CIMClass& modifiedClass,
111                       const ContentLanguageList& contentLangs);
112               
113                   virtual void modifyInstance(
114                       bool lock,
115                       const CIMNamespaceName& nameSpace,
116                       const CIMInstance& modifiedInstance,
117                       Boolean includeQualifiers,
118                       const CIMPropertyList& propertyList,
119                       const ContentLanguageList& contentLangs);
120               
121 mike  1.1.2.1     virtual Array<CIMClass> enumerateClasses(
122                       bool lock,
123                       const CIMNamespaceName& nameSpace,
124                       const CIMName& className,
125                       Boolean deepInheritance,
126                       Boolean localOnly,
127                       Boolean includeQualifiers,
128                       Boolean includeClassOrigin);
129               
130                   virtual Array<CIMName> enumerateClassNames(
131                       bool lock,
132                       const CIMNamespaceName& nameSpace,
133                       const CIMName& className,
134                       Boolean deepInheritance);
135               
136                   virtual Array<CIMInstance> enumerateInstancesForSubtree(
137                       bool lock,
138                       const CIMNamespaceName& nameSpace,
139                       const CIMName& className,
140                       Boolean deepInheritance,
141                       Boolean localOnly,
142 mike  1.1.2.1         Boolean includeQualifiers,
143                       Boolean includeClassOrigin,
144                       const CIMPropertyList& propertyList);
145               
146                   virtual Array<CIMInstance> enumerateInstancesForClass(
147                       bool lock,
148                       const CIMNamespaceName& nameSpace,
149                       const CIMName& className,
150                       Boolean localOnly,
151                       Boolean includeQualifiers,
152                       Boolean includeClassOrigin,
153                       const CIMPropertyList& propertyList);
154               
155                   virtual Array<CIMObjectPath> enumerateInstanceNamesForSubtree(
156                       bool lock,
157                       const CIMNamespaceName& nameSpace,
158                       const CIMName& className);
159               
160                   virtual Array<CIMObjectPath> enumerateInstanceNamesForClass(
161                       bool lock,
162                       const CIMNamespaceName& nameSpace,
163 mike  1.1.2.1         const CIMName& className);
164               
165                   virtual Array<CIMInstance> execQuery(
166                       bool lock,
167                       const String& queryLanguage,
168                       const String& query);
169               
170                   virtual Array<CIMObject> associators(
171                       bool lock,
172                       const CIMNamespaceName& nameSpace,
173                       const CIMObjectPath& objectName,
174                       const CIMName& assocClass,
175                       const CIMName& resultClass,
176                       const String& role,
177                       const String& resultRole,
178                       Boolean includeQualifiers,
179                       Boolean includeClassOrigin,
180                       const CIMPropertyList& propertyList);
181               
182                   virtual Array<CIMObjectPath> associatorNames(
183                       bool lock,
184 mike  1.1.2.1         const CIMNamespaceName& nameSpace,
185                       const CIMObjectPath& objectName,
186                       const CIMName& assocClass,
187                       const CIMName& resultClass,
188                       const String& role,
189                       const String& resultRole);
190               
191                   virtual Array<CIMObject> references(
192                       bool lock,
193                       const CIMNamespaceName& nameSpace,
194                       const CIMObjectPath& objectName,
195                       const CIMName& resultClass,
196                       const String& role,
197                       Boolean includeQualifiers,
198                       Boolean includeClassOrigin,
199                       const CIMPropertyList& propertyList);
200               
201                   virtual Array<CIMObjectPath> referenceNames(
202                       bool lock,
203                       const CIMNamespaceName& nameSpace,
204                       const CIMObjectPath& objectName,
205 mike  1.1.2.1         const CIMName& resultClass,
206                       const String& role);
207               
208                   virtual CIMValue getProperty(
209                       bool lock,
210                       const CIMNamespaceName& nameSpace,
211                       const CIMObjectPath& instanceName,
212                       const CIMName& propertyName);
213               
214                   virtual void setProperty(
215                       bool lock,
216                       const CIMNamespaceName& nameSpace,
217                       const CIMObjectPath& instanceName,
218                       const CIMName& propertyName,
219                       const CIMValue& newValue,
220                       const ContentLanguageList& contentLangs);
221               
222                   virtual CIMQualifierDecl getQualifier(
223                       bool lock,
224                       const CIMNamespaceName& nameSpace,
225                       const CIMName& qualifierName);
226 mike  1.1.2.1 
227                   virtual void setQualifier(
228                       bool lock,
229                       const CIMNamespaceName& nameSpace,
230                       const CIMQualifierDecl& qualifierDecl,
231                       const ContentLanguageList& contentLangs);
232               
233                   virtual void deleteQualifier(
234                       bool lock,
235                       const CIMNamespaceName& nameSpace,
236                       const CIMName& qualifierName);
237               
238                   virtual Array<CIMQualifierDecl> enumerateQualifiers(
239                       bool lock,
240                       const CIMNamespaceName& nameSpace);
241               
242                   virtual void createNameSpace(
243                       bool lock,
244                       const CIMNamespaceName& nameSpace,
245                       const NameSpaceAttributes& attributes);
246               
247 mike  1.1.2.1     virtual void modifyNameSpace(
248                       bool lock,
249                       const CIMNamespaceName& nameSpace,
250                       const NameSpaceAttributes& attributes);
251               
252                   virtual Array<CIMNamespaceName> enumerateNameSpaces(
253                       bool lock) const;
254               
255                   virtual void deleteNameSpace(
256                       bool lock,
257                       const CIMNamespaceName& nameSpace);
258               
259                   virtual Boolean getNameSpaceAttributes(
260                       bool lock,
261                       const CIMNamespaceName& nameSpace,
262                       NameSpaceAttributes& attributes);
263               
264                   virtual void setDeclContext(
265                       bool lock,
266                       RepositoryDeclContext* context);
267               
268 mike  1.1.2.1     virtual Boolean isDefaultInstanceProvider(
269                       bool lock);
270               
271                   virtual void getSubClassNames(
272                       bool lock,
273                       const CIMNamespaceName& nameSpace,
274                       const CIMName& className,
275                       Boolean deepInheritance,
276                       Array<CIMName>& subClassNames) const;
277               
278                   virtual void getSuperClassNames(
279                       bool lock,
280                       const CIMNamespaceName& nameSpace,
281                       const CIMName& className,
282                       Array<CIMName>& superClassNames) const;
283               
284                   virtual Boolean isRemoteNameSpace(
285                       bool lock,
286                       const CIMNamespaceName& nameSpace,
287                       String& remoteInfo);
288               
289 mike  1.1.2.1 #ifdef PEGASUS_DEBUG
290                   virtual void DisplayCacheStatistics(
291                       bool lock);
292               #endif
293               
294 mike  1.1.2.3     // Sets the global save callback that is called whenever the memory-resident
295 mike  1.1.2.2     // instance repository is modified. The buffer argument is a serialized
296                   // copy of the memory-resident instance repository. The handler can do
297                   // things such as save the buffer on disk for later use.
298 mike  1.1.2.3     static void installSaveCallback(
299                       void (*callback)(const Buffer& buffer, void* data),
300                       void* data);
301 mike  1.1.2.2 
302 mike  1.1.2.3     // Sets the global load callback that is called whenever an instance of
303 mike  1.1.2.2     // MemoryResidentRepository is created in order to load the initial set
304                   // of instances (if any).
305 mike  1.1.2.3     static void installLoadCallback(
306                       void (*callback)(Buffer& buffer, void* data),
307                       void* data);
308 mike  1.1.2.1 
309 mike  1.1.2.4     static Boolean addNameSpace(const MetaNameSpace* nameSpace);
310               
311 mike  1.1.2.2 private:
312 mike  1.1.2.1     Uint32 _findInstance(
313                       const CIMNamespaceName& nameSpace,
314                       const CIMObjectPath& instanceName);
315               
316 mike  1.1.2.2     void _processSaveHandler();
317               
318                   void _processLoadHandler();
319               
320 mike  1.1.2.1     Array<NamespaceInstancePair> _rep;
321               };
322               
323               PEGASUS_NAMESPACE_END
324               
325               #endif /* Pegasus_Repository_MemoryResidentRepository */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2