(file) Return to cprovider_t.h CVS log (file) (dir) Up to [OMI] / omi / gen

  1 mike  1.1 /*
  2           **==============================================================================
  3           **
  4           ** Open Management Infrastructure (OMI)
  5           **
  6           ** Copyright (c) Microsoft Corporation
  7           ** 
  8           ** Licensed under the Apache License, Version 2.0 (the "License"); you may not 
  9           ** use this file except in compliance with the License. You may obtain a copy 
 10           ** of the License at 
 11           **
 12           **     http://www.apache.org/licenses/LICENSE-2.0 
 13           **
 14           ** THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 15           ** KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED 
 16           ** WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, 
 17           ** MERCHANTABLITY OR NON-INFRINGEMENT. 
 18           **
 19           ** See the Apache 2 License for the specific language governing permissions 
 20           ** and limitations under the License.
 21           **
 22 mike  1.1 **==============================================================================
 23           */
 24           
 25           //==============================================================================
 26           //
 27           // cprovider.h - source code templates for the provider .c file.
 28           //
 29           //==============================================================================
 30           
 31           #ifndef _migen_cprovider_t_h
 32           #define _migen_cprovider_t_h
 33           
 34           //==============================================================================
 35           //
 36           // COMMON_PROVIDER_STUBS
 37           //
 38           //==============================================================================
 39           
 40           #define COMMON_PROVIDER_STUBS "\
 41           void MI_CALL <ALIAS>_Load(\n\
 42               <ALIAS>_Self** self,\n\
 43 mike  1.1     MI_Module_Self* selfModule,\n\
 44               MI_Context* context)\n\
 45           {\n\
 46               *self = NULL;\n\
 47               MI_PostResult(context, MI_RESULT_OK);\n\
 48           }\n\
 49           \n\
 50           void MI_CALL <ALIAS>_Unload(\n\
 51               <ALIAS>_Self* self,\n\
 52               MI_Context* context)\n\
 53           {\n\
 54               MI_PostResult(context, MI_RESULT_OK);\n\
 55           }\n\
 56           \n"
 57           
 58           //==============================================================================
 59           //
 60           // INSTANCE_PROVIDER_STUBS
 61           //
 62           //==============================================================================
 63           
 64 mike  1.1 #define INSTANCE_PROVIDER_STUBS COMMON_PROVIDER_STUBS "\
 65           void MI_CALL <ALIAS>_EnumerateInstances(\n\
 66               <ALIAS>_Self* self,\n\
 67               MI_Context* context,\n\
 68               const MI_Char* nameSpace,\n\
 69               const MI_Char* className,\n\
 70               const MI_PropertySet* propertySet,\n\
 71               MI_Boolean keysOnly,\n\
 72               const MI_Filter* filter)\n\
 73           {\n\
 74               MI_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
 75           }\n\
 76           \n\
 77           void MI_CALL <ALIAS>_GetInstance(\n\
 78               <ALIAS>_Self* self,\n\
 79               MI_Context* context,\n\
 80               const MI_Char* nameSpace,\n\
 81               const MI_Char* className,\n\
 82               const <ALIAS>* instanceName,\n\
 83               const MI_PropertySet* propertySet)\n\
 84           {\n\
 85 mike  1.1     MI_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
 86           }\n\
 87           \n\
 88           void MI_CALL <ALIAS>_CreateInstance(\n\
 89               <ALIAS>_Self* self,\n\
 90               MI_Context* context,\n\
 91               const MI_Char* nameSpace,\n\
 92               const MI_Char* className,\n\
 93               const <ALIAS>* newInstance)\n\
 94           {\n\
 95               MI_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
 96           }\n\
 97           \n\
 98           void MI_CALL <ALIAS>_ModifyInstance(\n\
 99               <ALIAS>_Self* self,\n\
100               MI_Context* context,\n\
101               const MI_Char* nameSpace,\n\
102               const MI_Char* className,\n\
103               const <ALIAS>* modifiedInstance,\n\
104               const MI_PropertySet* propertySet)\n\
105           {\n\
106 mike  1.1     MI_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
107           }\n\
108           \n\
109           void MI_CALL <ALIAS>_DeleteInstance(\n\
110               <ALIAS>_Self* self,\n\
111               MI_Context* context,\n\
112               const MI_Char* nameSpace,\n\
113               const MI_Char* className,\n\
114               const <ALIAS>* instanceName)\n\
115           {\n\
116               MI_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
117           }\n\
118           \n"
119           
120           //==============================================================================
121           //
122           // ASSOCIATION_PROVIDER_STUBS
123           //
124           //==============================================================================
125           
126           #define ASSOCIATION_PROVIDER_STUBS INSTANCE_PROVIDER_STUBS "\
127 mike  1.1 void MI_CALL <ALIAS>_AssociatorInstances(\n\
128               <ALIAS>_Self* self,\n\
129               MI_Context* context,\n\
130               const MI_Char* nameSpace,\n\
131               const MI_Char* className,\n\
132               const MI_Instance* instanceName,\n\
133               const MI_Char* resultClass,\n\
134               const MI_Char* role,\n\
135               const MI_Char* resultRole,\n\
136               const MI_PropertySet* propertySet,\n\
137               MI_Boolean keysOnly,\n\
138               const MI_Filter* filter)\n\
139           {\n\
140               MI_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
141           }\n\
142           \n\
143           void MI_CALL <ALIAS>_ReferenceInstances(\n\
144               <ALIAS>_Self* self,\n\
145               MI_Context* context,\n\
146               const MI_Char* nameSpace,\n\
147               const MI_Char* className,\n\
148 mike  1.1     const MI_Instance* instanceName,\n\
149               const MI_Char* role,\n\
150               const MI_PropertySet* propertySet,\n\
151               MI_Boolean keysOnly,\n\
152               const MI_Filter* filter)\n\
153           {\n\
154               MI_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
155           }\n\
156           \n"
157           
158           #define ROLE_PROVIDER_STUBS INSTANCE_PROVIDER_STUBS "\
159           void MI_CALL <ALIAS>_AssociatorInstances<ROLE1>(\n\
160               <ALIAS>_Self* self,\n\
161               MI_Context* context,\n\
162               const MI_Char* nameSpace,\n\
163               const MI_Char* className,\n\
164               const <ALIAS1>* instanceName,\n\
165               const MI_Char* resultClass,\n\
166               const MI_PropertySet* propertySet,\n\
167               MI_Boolean keysOnly,\n\
168               const MI_Filter* filter)\n\
169 mike  1.1 {\n\
170               MI_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
171           }\n\
172           \n\
173           void MI_CALL <ALIAS>_AssociatorInstances<ROLE2>(\n\
174               <ALIAS>_Self* self,\n\
175               MI_Context* context,\n\
176               const MI_Char* nameSpace,\n\
177               const MI_Char* className,\n\
178               const <ALIAS2>* instanceName,\n\
179               const MI_Char* resultClass,\n\
180               const MI_PropertySet* propertySet,\n\
181               MI_Boolean keysOnly,\n\
182               const MI_Filter* filter)\n\
183           {\n\
184               MI_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
185           }\n\
186           \n\
187           void MI_CALL <ALIAS>_ReferenceInstances<ROLE1>(\n\
188               <ALIAS>_Self* self,\n\
189               MI_Context* context,\n\
190 mike  1.1     const MI_Char* nameSpace,\n\
191               const MI_Char* className,\n\
192               const <ALIAS1>* instanceName,\n\
193               const MI_PropertySet* propertySet,\n\
194               MI_Boolean keysOnly,\n\
195               const MI_Filter* filter)\n\
196           {\n\
197               MI_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
198           }\n\
199           \n\
200           void MI_CALL <ALIAS>_ReferenceInstances<ROLE2>(\n\
201               <ALIAS>_Self* self,\n\
202               MI_Context* context,\n\
203               const MI_Char* nameSpace,\n\
204               const MI_Char* className,\n\
205               const <ALIAS2>* instanceName,\n\
206               const MI_PropertySet* propertySet,\n\
207               MI_Boolean keysOnly,\n\
208               const MI_Filter* filter)\n\
209           {\n\
210               MI_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
211 mike  1.1 }\n\
212           \n"
213           
214           //==============================================================================
215           //
216           // INDICATION_PROVIDER_STUBS
217           //
218           //==============================================================================
219           
220           #define INDICATION_PROVIDER_STUBS COMMON_PROVIDER_STUBS "\
221           void MI_CALL <ALIAS>_EnableIndications(\n\
222               <ALIAS>_Self* self,\n\
223               MI_Context* indicationsContext,\n\
224               const MI_Char* nameSpace,\n\
225               const MI_Char* className)\n\
226           {\n\
227               /* TODO: store indicationsContext for later usage */\n\
228               /* NOTE: Do not call MI_PostResult on this context */\n\
229           }\n\
230           \n\
231           void MI_CALL <ALIAS>_DisableIndications(\n\
232 mike  1.1     <ALIAS>_Self* self,\n\
233               MI_Context* indicationsContext,\n\
234               const MI_Char* nameSpace,\n\
235               const MI_Char* className)\n\
236           {\n\
237               /* TODO: stop background thread that monitors subscriptions */\n\
238           \n\
239               MI_PostResult(indicationsContext, MI_RESULT_OK);\n\
240           }\n\
241           \n\
242           void MI_CALL <ALIAS>_Subscribe(\n\
243               <ALIAS>_Self* self,\n\
244               MI_Context* context,\n\
245               const MI_Char* nameSpace,\n\
246               const MI_Char* className,\n\
247               const MI_Filter* filter,\n\
248               const MI_Char* bookmark,\n\
249               MI_Uint64  subscriptionID,\n\
250               void** subscriptionSelf)\n\
251           {\n\
252               MI_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
253 mike  1.1 }\n\
254           \n\
255           void MI_CALL <ALIAS>_Unsubscribe(\n\
256               <ALIAS>_Self* self,\n\
257               MI_Context* context,\n\
258               const MI_Char* nameSpace,\n\
259               const MI_Char* className,\n\
260               MI_Uint64  subscriptionID,\n\
261               void* subscriptionSelf)\n\
262           {\n\
263               MI_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
264           }\n\
265           \n"
266           
267           //==============================================================================
268           //
269           // EXTRINSIC_METHOD_STUB
270           //
271           //==============================================================================
272           
273           #define EXTRINSIC_METHOD_STUB "\
274 mike  1.1 void MI_CALL <ALIAS>_Invoke_<METHOD>(\n\
275               <ALIAS>_Self* self,\n\
276               MI_Context* context,\n\
277               const MI_Char* nameSpace,\n\
278               const MI_Char* className,\n\
279               const MI_Char* methodName,\n\
280               const <ALIAS>* instanceName,\n\
281               const <ALIAS>_<METHOD>* in)\n\
282           {\n\
283               MI_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
284           }\n\
285           \n"
286           
287           #endif /* _migen_cprovider_t_h */

ViewCVS 0.9.2