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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2