(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.5 #include "SchemaTypes.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 mike  1.1.2.5     MemoryResidentRepository();
 62 mike  1.1.2.1 
 63                   virtual ~MemoryResidentRepository();
 64               
 65                   virtual CIMClass getClass(
 66                       bool lock,
 67                       const CIMNamespaceName& nameSpace,
 68                       const CIMName& className,
 69                       Boolean localOnly,
 70                       Boolean includeQualifiers,
 71                       Boolean includeClassOrigin,
 72                       const CIMPropertyList& propertyList);
 73               
 74                   virtual CIMInstance getInstance(
 75                       bool lock,
 76                       const CIMNamespaceName& nameSpace,
 77                       const CIMObjectPath& instanceName,
 78                       Boolean localOnly,
 79                       Boolean includeQualifiers,
 80                       Boolean includeClassOrigin,
 81                       const CIMPropertyList& propertyList);
 82               
 83 mike  1.1.2.1     virtual void deleteClass(
 84                       bool lock,
 85                       const CIMNamespaceName& nameSpace,
 86                       const CIMName& className);
 87               
 88                   virtual void deleteInstance(
 89                       bool lock,
 90                       const CIMNamespaceName& nameSpace,
 91                       const CIMObjectPath& instanceName);
 92               
 93                   virtual void createClass(
 94                       bool lock,
 95                       const CIMNamespaceName& nameSpace,
 96                       const CIMClass& newClass,
 97                       const ContentLanguageList& contentLangs);
 98               
 99                   virtual CIMObjectPath createInstance(
100                       bool lock,
101                       const CIMNamespaceName& nameSpace,
102                       const CIMInstance& newInstance,
103                       const ContentLanguageList& contentLangs);
104 mike  1.1.2.1 
105                   virtual void modifyClass(
106                       bool lock,
107                       const CIMNamespaceName& nameSpace,
108                       const CIMClass& modifiedClass,
109                       const ContentLanguageList& contentLangs);
110               
111                   virtual void modifyInstance(
112                       bool lock,
113                       const CIMNamespaceName& nameSpace,
114                       const CIMInstance& modifiedInstance,
115                       Boolean includeQualifiers,
116                       const CIMPropertyList& propertyList,
117                       const ContentLanguageList& contentLangs);
118               
119                   virtual Array<CIMClass> enumerateClasses(
120                       bool lock,
121                       const CIMNamespaceName& nameSpace,
122                       const CIMName& className,
123                       Boolean deepInheritance,
124                       Boolean localOnly,
125 mike  1.1.2.1         Boolean includeQualifiers,
126                       Boolean includeClassOrigin);
127               
128                   virtual Array<CIMName> enumerateClassNames(
129                       bool lock,
130                       const CIMNamespaceName& nameSpace,
131                       const CIMName& className,
132                       Boolean deepInheritance);
133               
134                   virtual Array<CIMInstance> enumerateInstancesForSubtree(
135                       bool lock,
136                       const CIMNamespaceName& nameSpace,
137                       const CIMName& className,
138                       Boolean deepInheritance,
139                       Boolean localOnly,
140                       Boolean includeQualifiers,
141                       Boolean includeClassOrigin,
142                       const CIMPropertyList& propertyList);
143               
144                   virtual Array<CIMInstance> enumerateInstancesForClass(
145                       bool lock,
146 mike  1.1.2.1         const CIMNamespaceName& nameSpace,
147                       const CIMName& className,
148                       Boolean localOnly,
149                       Boolean includeQualifiers,
150                       Boolean includeClassOrigin,
151                       const CIMPropertyList& propertyList);
152               
153                   virtual Array<CIMObjectPath> enumerateInstanceNamesForSubtree(
154                       bool lock,
155                       const CIMNamespaceName& nameSpace,
156                       const CIMName& className);
157               
158                   virtual Array<CIMObjectPath> enumerateInstanceNamesForClass(
159                       bool lock,
160                       const CIMNamespaceName& nameSpace,
161                       const CIMName& className);
162               
163                   virtual Array<CIMInstance> execQuery(
164                       bool lock,
165                       const String& queryLanguage,
166                       const String& query);
167 mike  1.1.2.1 
168                   virtual Array<CIMObject> associators(
169                       bool lock,
170                       const CIMNamespaceName& nameSpace,
171                       const CIMObjectPath& objectName,
172                       const CIMName& assocClass,
173                       const CIMName& resultClass,
174                       const String& role,
175                       const String& resultRole,
176                       Boolean includeQualifiers,
177                       Boolean includeClassOrigin,
178                       const CIMPropertyList& propertyList);
179               
180                   virtual Array<CIMObjectPath> associatorNames(
181                       bool lock,
182                       const CIMNamespaceName& nameSpace,
183                       const CIMObjectPath& objectName,
184                       const CIMName& assocClass,
185                       const CIMName& resultClass,
186                       const String& role,
187                       const String& resultRole);
188 mike  1.1.2.1 
189                   virtual Array<CIMObject> references(
190                       bool lock,
191                       const CIMNamespaceName& nameSpace,
192                       const CIMObjectPath& objectName,
193                       const CIMName& resultClass,
194                       const String& role,
195                       Boolean includeQualifiers,
196                       Boolean includeClassOrigin,
197                       const CIMPropertyList& propertyList);
198               
199                   virtual Array<CIMObjectPath> referenceNames(
200                       bool lock,
201                       const CIMNamespaceName& nameSpace,
202                       const CIMObjectPath& objectName,
203                       const CIMName& resultClass,
204                       const String& role);
205               
206                   virtual CIMValue getProperty(
207                       bool lock,
208                       const CIMNamespaceName& nameSpace,
209 mike  1.1.2.1         const CIMObjectPath& instanceName,
210                       const CIMName& propertyName);
211               
212                   virtual void setProperty(
213                       bool lock,
214                       const CIMNamespaceName& nameSpace,
215                       const CIMObjectPath& instanceName,
216                       const CIMName& propertyName,
217                       const CIMValue& newValue,
218                       const ContentLanguageList& contentLangs);
219               
220                   virtual CIMQualifierDecl getQualifier(
221                       bool lock,
222                       const CIMNamespaceName& nameSpace,
223                       const CIMName& qualifierName);
224               
225                   virtual void setQualifier(
226                       bool lock,
227                       const CIMNamespaceName& nameSpace,
228                       const CIMQualifierDecl& qualifierDecl,
229                       const ContentLanguageList& contentLangs);
230 mike  1.1.2.1 
231                   virtual void deleteQualifier(
232                       bool lock,
233                       const CIMNamespaceName& nameSpace,
234                       const CIMName& qualifierName);
235               
236                   virtual Array<CIMQualifierDecl> enumerateQualifiers(
237                       bool lock,
238                       const CIMNamespaceName& nameSpace);
239               
240                   virtual void createNameSpace(
241                       bool lock,
242                       const CIMNamespaceName& nameSpace,
243                       const NameSpaceAttributes& attributes);
244               
245                   virtual void modifyNameSpace(
246                       bool lock,
247                       const CIMNamespaceName& nameSpace,
248                       const NameSpaceAttributes& attributes);
249               
250                   virtual Array<CIMNamespaceName> enumerateNameSpaces(
251 mike  1.1.2.1         bool lock) const;
252               
253                   virtual void deleteNameSpace(
254                       bool lock,
255                       const CIMNamespaceName& nameSpace);
256               
257                   virtual Boolean getNameSpaceAttributes(
258                       bool lock,
259                       const CIMNamespaceName& nameSpace,
260                       NameSpaceAttributes& attributes);
261               
262                   virtual void setDeclContext(
263                       bool lock,
264                       RepositoryDeclContext* context);
265               
266                   virtual Boolean isDefaultInstanceProvider(
267                       bool lock);
268               
269                   virtual void getSubClassNames(
270                       bool lock,
271                       const CIMNamespaceName& nameSpace,
272 mike  1.1.2.1         const CIMName& className,
273                       Boolean deepInheritance,
274                       Array<CIMName>& subClassNames) const;
275               
276                   virtual void getSuperClassNames(
277                       bool lock,
278                       const CIMNamespaceName& nameSpace,
279                       const CIMName& className,
280                       Array<CIMName>& superClassNames) const;
281               
282                   virtual Boolean isRemoteNameSpace(
283                       bool lock,
284                       const CIMNamespaceName& nameSpace,
285                       String& remoteInfo);
286               
287               #ifdef PEGASUS_DEBUG
288                   virtual void DisplayCacheStatistics(
289                       bool lock);
290               #endif
291               
292 mike  1.1.2.6     // Installs the initialize callback that is called when the repository is 
293                   // initially created (from the MemoryResidentRepository constructor).
294                   static void installInitializeCallback(
295                       void (*callback)(MemoryResidentRepository* repository, void * data),
296                       void *data);
297               
298                   // Installs the global save callback that is called when the memory-resident
299 mike  1.1.2.2     // instance repository is modified. The buffer argument is a serialized
300 mike  1.1.2.6     // copy of the memory-resident instance repository. The callback can do
301 mike  1.1.2.2     // things such as save the buffer on disk for later use.
302 mike  1.1.2.3     static void installSaveCallback(
303                       void (*callback)(const Buffer& buffer, void* data),
304                       void* data);
305 mike  1.1.2.2 
306 mike  1.1.2.6     // Installs the global load callback that is called when an instance of
307 mike  1.1.2.2     // MemoryResidentRepository is created in order to load the initial set
308                   // of instances (if any).
309 mike  1.1.2.3     static void installLoadCallback(
310                       void (*callback)(Buffer& buffer, void* data),
311                       void* data);
312 mike  1.1.2.1 
313 mike  1.1.2.6     // Add the given namespace of qualifier declarations and classes.
314 mike  1.1.2.5     static Boolean addNameSpace(const SchemaNameSpace* nameSpace);
315 mike  1.1.2.4 
316 mike  1.1.2.2 private:
317 mike  1.1.2.6 
318 mike  1.1.2.1     Uint32 _findInstance(
319                       const CIMNamespaceName& nameSpace,
320                       const CIMObjectPath& instanceName);
321               
322 mike  1.1.2.6     void _processSaveCallback();
323 mike  1.1.2.2 
324 mike  1.1.2.6     void _processLoadCallback();
325 mike  1.1.2.2 
326 mike  1.1.2.1     Array<NamespaceInstancePair> _rep;
327               };
328               
329               PEGASUS_NAMESPACE_END
330               
331               #endif /* Pegasus_Repository_MemoryResidentRepository */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2