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 krisbash 1.3 MI_Context_PostResult(context, MI_RESULT_OK);\n\
|
48 mike 1.1 }\n\
49 \n\
50 void MI_CALL <ALIAS>_Unload(\n\
51 <ALIAS>_Self* self,\n\
52 MI_Context* context)\n\
53 {\n\
|
54 krisbash 1.3 MI_Context_PostResult(context, MI_RESULT_OK);\n\
|
55 mike 1.1 }\n\
56 \n"
57
58 //==============================================================================
59 //
60 // INSTANCE_PROVIDER_STUBS
61 //
62 //==============================================================================
63
64 #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 krisbash 1.3 MI_Context_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
|
75 mike 1.1 }\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 krisbash 1.3 MI_Context_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
|
86 mike 1.1 }\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 krisbash 1.3 MI_Context_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
|
96 mike 1.1 }\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 krisbash 1.3 MI_Context_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
|
107 mike 1.1 }\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 krisbash 1.3 MI_Context_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
|
117 mike 1.1 }\n\
118 \n"
119
120 //==============================================================================
121 //
122 // ASSOCIATION_PROVIDER_STUBS
123 //
124 //==============================================================================
125
126 #define ASSOCIATION_PROVIDER_STUBS INSTANCE_PROVIDER_STUBS "\
127 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 mike 1.1 const MI_Filter* filter)\n\
139 {\n\
|
140 krisbash 1.3 MI_Context_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
|
141 mike 1.1 }\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 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 krisbash 1.3 MI_Context_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
|
155 mike 1.1 }\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 {\n\
|
170 krisbash 1.3 MI_Context_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
|
171 mike 1.1 }\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 krisbash 1.3 MI_Context_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
|
185 mike 1.1 }\n\
186 \n\
187 void MI_CALL <ALIAS>_ReferenceInstances<ROLE1>(\n\
188 <ALIAS>_Self* self,\n\
189 MI_Context* context,\n\
190 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 krisbash 1.3 MI_Context_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
|
198 mike 1.1 }\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 krisbash 1.3 MI_Context_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 krisbash 1.3 /* TODO: store indicationsContext for posting indication usage */\n\
228 /* NOTE:Call one of following functions if and ONLY if encounter a termination error,\n\
229 which will finalize the indicationsContext, \n\
230 and terminate all active subscriptions to current class,\n\
231 MI_Context_PostResult\n\
232 MI_Context_PostError\n\
233 MI_Context_PostCimError\n\
234 */\n\
|
235 mike 1.1 }\n\
236 \n\
237 void MI_CALL <ALIAS>_DisableIndications(\n\
238 <ALIAS>_Self* self,\n\
239 MI_Context* indicationsContext,\n\
240 const MI_Char* nameSpace,\n\
241 const MI_Char* className)\n\
242 {\n\
243 /* TODO: stop background thread that monitors subscriptions */\n\
244 \n\
|
245 krisbash 1.3 MI_Context_PostResult(indicationsContext, MI_RESULT_OK);\n\
|
246 mike 1.1 }\n\
247 \n\
248 void MI_CALL <ALIAS>_Subscribe(\n\
249 <ALIAS>_Self* self,\n\
250 MI_Context* context,\n\
251 const MI_Char* nameSpace,\n\
252 const MI_Char* className,\n\
253 const MI_Filter* filter,\n\
254 const MI_Char* bookmark,\n\
255 MI_Uint64 subscriptionID,\n\
256 void** subscriptionSelf)\n\
257 {\n\
|
258 krisbash 1.3 /* NOTE: This function indicates a new subscription occurs */\n\
|
259 mike 1.1 }\n\
260 \n\
261 void MI_CALL <ALIAS>_Unsubscribe(\n\
262 <ALIAS>_Self* self,\n\
263 MI_Context* context,\n\
264 const MI_Char* nameSpace,\n\
265 const MI_Char* className,\n\
266 MI_Uint64 subscriptionID,\n\
267 void* subscriptionSelf)\n\
268 {\n\
|
269 krisbash 1.3 /* NOTE: This function indicates a subscription was cancelled */\n\
270 MI_Context_PostResult(context, MI_RESULT_OK);\n\
|
271 mike 1.1 }\n\
272 \n"
273
274 //==============================================================================
275 //
276 // EXTRINSIC_METHOD_STUB
277 //
278 //==============================================================================
279
280 #define EXTRINSIC_METHOD_STUB "\
281 void MI_CALL <ALIAS>_Invoke_<METHOD>(\n\
282 <ALIAS>_Self* self,\n\
283 MI_Context* context,\n\
284 const MI_Char* nameSpace,\n\
285 const MI_Char* className,\n\
286 const MI_Char* methodName,\n\
287 const <ALIAS>* instanceName,\n\
288 const <ALIAS>_<METHOD>* in)\n\
289 {\n\
|
290 krisbash 1.3 MI_Context_PostResult(context, MI_RESULT_NOT_SUPPORTED);\n\
|
291 mike 1.1 }\n\
292 \n"
293
294 #endif /* _migen_cprovider_t_h */
|