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

  1 krisbash 1.1 /* @migen@ */
  2              /*
  3              **==============================================================================
  4              **
  5              ** WARNING: THIS FILE WAS AUTOMATICALLY GENERATED. PLEASE DO NOT EDIT.
  6              **
  7              **==============================================================================
  8              */
  9              #ifndef _OMI_Error_h
 10              #define _OMI_Error_h
 11              
 12              #include <MI.h>
 13              #include "CIM_Error.h"
 14              
 15              /*
 16              **==============================================================================
 17              **
 18              ** OMI_Error [OMI_Error]
 19              **
 20              ** Keys:
 21              **
 22 krisbash 1.1 **==============================================================================
 23              */
 24              
 25              typedef struct _OMI_Error /* extends CIM_Error */
 26              {
 27                  MI_Instance __instance;
 28                  /* CIM_Error properties */
 29                  MI_ConstUint16Field ErrorType;
 30                  MI_ConstStringField OtherErrorType;
 31                  MI_ConstStringField OwningEntity;
 32                  MI_ConstStringField MessageID;
 33                  MI_ConstStringField Message;
 34                  MI_ConstStringAField MessageArguments;
 35                  MI_ConstUint16Field PerceivedSeverity;
 36                  MI_ConstUint16Field ProbableCause;
 37                  MI_ConstStringField ProbableCauseDescription;
 38                  MI_ConstStringAField RecommendedActions;
 39                  MI_ConstStringField ErrorSource;
 40                  MI_ConstUint16Field ErrorSourceFormat;
 41                  MI_ConstStringField OtherErrorSourceFormat;
 42                  MI_ConstUint32Field CIMStatusCode;
 43 krisbash 1.1     MI_ConstStringField CIMStatusCodeDescription;
 44                  /* OMI_Error properties */
 45                  MI_ConstUint32Field error_Code;
 46                  MI_ConstStringField error_Type;
 47                  MI_ConstUint16Field error_Category;
 48              }
 49              OMI_Error;
 50              
 51              typedef struct _OMI_Error_Ref
 52              {
 53                  OMI_Error* value;
 54                  MI_Boolean exists;
 55                  MI_Uint8 flags;
 56              }
 57              OMI_Error_Ref;
 58              
 59              typedef struct _OMI_Error_ConstRef
 60              {
 61                  MI_CONST OMI_Error* value;
 62                  MI_Boolean exists;
 63                  MI_Uint8 flags;
 64 krisbash 1.1 }
 65              OMI_Error_ConstRef;
 66              
 67              typedef struct _OMI_Error_Array
 68              {
 69                  struct _OMI_Error** data;
 70                  MI_Uint32 size;
 71              }
 72              OMI_Error_Array;
 73              
 74              typedef struct _OMI_Error_ConstArray
 75              {
 76                  struct _OMI_Error MI_CONST* MI_CONST* data;
 77                  MI_Uint32 size;
 78              }
 79              OMI_Error_ConstArray;
 80              
 81              typedef struct _OMI_Error_ArrayRef
 82              {
 83                  OMI_Error_Array value;
 84                  MI_Boolean exists;
 85 krisbash 1.1     MI_Uint8 flags;
 86              }
 87              OMI_Error_ArrayRef;
 88              
 89              typedef struct _OMI_Error_ConstArrayRef
 90              {
 91                  OMI_Error_ConstArray value;
 92                  MI_Boolean exists;
 93                  MI_Uint8 flags;
 94              }
 95              OMI_Error_ConstArrayRef;
 96              
 97              MI_EXTERN_C MI_CONST MI_ClassDecl OMI_Error_rtti;
 98              
 99              MI_INLINE MI_Result MI_CALL OMI_Error_Clone(
100                  _In_ const OMI_Error* self,
101                  _Outptr_ OMI_Error** newInstance)
102              {
103                  return MI_Instance_Clone(
104                      &self->__instance, (MI_Instance**)newInstance);
105              }
106 krisbash 1.1 
107              MI_INLINE MI_Boolean MI_CALL OMI_Error_IsA(
108                  _In_ const MI_Instance* self)
109              {
110                  MI_Boolean res = MI_FALSE;
111                  return MI_Instance_IsA(self, &OMI_Error_rtti, &res) == MI_RESULT_OK && res;
112              }
113              
114              MI_INLINE MI_Result MI_CALL OMI_Error_Destruct(_Inout_ OMI_Error* self)
115              {
116                  return MI_Instance_Destruct(&self->__instance);
117              }
118              
119              MI_INLINE MI_Result MI_CALL OMI_Error_Delete(_Inout_ OMI_Error* self)
120              {
121                  return MI_Instance_Delete(&self->__instance);
122              }
123              
124              MI_INLINE MI_Result MI_CALL OMI_Error_Set_ErrorType(
125                  _Inout_ OMI_Error* self,
126                  _In_ MI_Uint16 x)
127 krisbash 1.1 {
128                  ((MI_Uint16Field*)&self->ErrorType)->value = x;
129                  ((MI_Uint16Field*)&self->ErrorType)->exists = 1;
130                  return MI_RESULT_OK;
131              }
132              
133              MI_INLINE MI_Result MI_CALL OMI_Error_Clear_ErrorType(
134                  _Inout_ OMI_Error* self)
135              {
136                  memset((void*)&self->ErrorType, 0, sizeof(self->ErrorType));
137                  return MI_RESULT_OK;
138              }
139              
140              MI_INLINE MI_Result MI_CALL OMI_Error_Set_OtherErrorType(
141                  _Inout_ OMI_Error* self,
142                  _In_z_ const MI_Char* str)
143              {
144                  return self->__instance.ft->SetElementAt(
145                      (MI_Instance*)&self->__instance,
146                      1,
147                      (MI_Value*)&str,
148 krisbash 1.1         MI_STRING,
149                      0);
150              }
151              
152              MI_INLINE MI_Result MI_CALL OMI_Error_SetPtr_OtherErrorType(
153                  _Inout_ OMI_Error* self,
154                  _In_z_ const MI_Char* str)
155              {
156                  return self->__instance.ft->SetElementAt(
157                      (MI_Instance*)&self->__instance,
158                      1,
159                      (MI_Value*)&str,
160                      MI_STRING,
161                      MI_FLAG_BORROW);
162              }
163              
164              MI_INLINE MI_Result MI_CALL OMI_Error_Clear_OtherErrorType(
165                  _Inout_ OMI_Error* self)
166              {
167                  return self->__instance.ft->ClearElementAt(
168                      (MI_Instance*)&self->__instance,
169 krisbash 1.1         1);
170              }
171              
172              MI_INLINE MI_Result MI_CALL OMI_Error_Set_OwningEntity(
173                  _Inout_ OMI_Error* self,
174                  _In_z_ const MI_Char* str)
175              {
176                  return self->__instance.ft->SetElementAt(
177                      (MI_Instance*)&self->__instance,
178                      2,
179                      (MI_Value*)&str,
180                      MI_STRING,
181                      0);
182              }
183              
184              MI_INLINE MI_Result MI_CALL OMI_Error_SetPtr_OwningEntity(
185                  _Inout_ OMI_Error* self,
186                  _In_z_ const MI_Char* str)
187              {
188                  return self->__instance.ft->SetElementAt(
189                      (MI_Instance*)&self->__instance,
190 krisbash 1.1         2,
191                      (MI_Value*)&str,
192                      MI_STRING,
193                      MI_FLAG_BORROW);
194              }
195              
196              MI_INLINE MI_Result MI_CALL OMI_Error_Clear_OwningEntity(
197                  _Inout_ OMI_Error* self)
198              {
199                  return self->__instance.ft->ClearElementAt(
200                      (MI_Instance*)&self->__instance,
201                      2);
202              }
203              
204              MI_INLINE MI_Result MI_CALL OMI_Error_Set_MessageID(
205                  _Inout_ OMI_Error* self,
206                  _In_z_ const MI_Char* str)
207              {
208                  return self->__instance.ft->SetElementAt(
209                      (MI_Instance*)&self->__instance,
210                      3,
211 krisbash 1.1         (MI_Value*)&str,
212                      MI_STRING,
213                      0);
214              }
215              
216              MI_INLINE MI_Result MI_CALL OMI_Error_SetPtr_MessageID(
217                  _Inout_ OMI_Error* self,
218                  _In_z_ const MI_Char* str)
219              {
220                  return self->__instance.ft->SetElementAt(
221                      (MI_Instance*)&self->__instance,
222                      3,
223                      (MI_Value*)&str,
224                      MI_STRING,
225                      MI_FLAG_BORROW);
226              }
227              
228              MI_INLINE MI_Result MI_CALL OMI_Error_Clear_MessageID(
229                  _Inout_ OMI_Error* self)
230              {
231                  return self->__instance.ft->ClearElementAt(
232 krisbash 1.1         (MI_Instance*)&self->__instance,
233                      3);
234              }
235              
236              MI_INLINE MI_Result MI_CALL OMI_Error_Set_Message(
237                  _Inout_ OMI_Error* self,
238                  _In_z_ const MI_Char* str)
239              {
240                  return self->__instance.ft->SetElementAt(
241                      (MI_Instance*)&self->__instance,
242                      4,
243                      (MI_Value*)&str,
244                      MI_STRING,
245                      0);
246              }
247              
248              MI_INLINE MI_Result MI_CALL OMI_Error_SetPtr_Message(
249                  _Inout_ OMI_Error* self,
250                  _In_z_ const MI_Char* str)
251              {
252                  return self->__instance.ft->SetElementAt(
253 krisbash 1.1         (MI_Instance*)&self->__instance,
254                      4,
255                      (MI_Value*)&str,
256                      MI_STRING,
257                      MI_FLAG_BORROW);
258              }
259              
260              MI_INLINE MI_Result MI_CALL OMI_Error_Clear_Message(
261                  _Inout_ OMI_Error* self)
262              {
263                  return self->__instance.ft->ClearElementAt(
264                      (MI_Instance*)&self->__instance,
265                      4);
266              }
267              
268              MI_INLINE MI_Result MI_CALL OMI_Error_Set_MessageArguments(
269                  _Inout_ OMI_Error* self,
270                  _In_reads_opt_(size) const MI_Char** data,
271                  _In_ MI_Uint32 size)
272              {
273                  MI_Array arr;
274 krisbash 1.1     arr.data = (void*)data;
275                  arr.size = size;
276                  return self->__instance.ft->SetElementAt(
277                      (MI_Instance*)&self->__instance,
278                      5,
279                      (MI_Value*)&arr,
280                      MI_STRINGA,
281                      0);
282              }
283              
284              MI_INLINE MI_Result MI_CALL OMI_Error_SetPtr_MessageArguments(
285                  _Inout_ OMI_Error* self,
286                  _In_reads_opt_(size) const MI_Char** data,
287                  _In_ MI_Uint32 size)
288              {
289                  MI_Array arr;
290                  arr.data = (void*)data;
291                  arr.size = size;
292                  return self->__instance.ft->SetElementAt(
293                      (MI_Instance*)&self->__instance,
294                      5,
295 krisbash 1.1         (MI_Value*)&arr,
296                      MI_STRINGA,
297                      MI_FLAG_BORROW);
298              }
299              
300              MI_INLINE MI_Result MI_CALL OMI_Error_Clear_MessageArguments(
301                  _Inout_ OMI_Error* self)
302              {
303                  return self->__instance.ft->ClearElementAt(
304                      (MI_Instance*)&self->__instance,
305                      5);
306              }
307              
308              MI_INLINE MI_Result MI_CALL OMI_Error_Set_PerceivedSeverity(
309                  _Inout_ OMI_Error* self,
310                  _In_ MI_Uint16 x)
311              {
312                  ((MI_Uint16Field*)&self->PerceivedSeverity)->value = x;
313                  ((MI_Uint16Field*)&self->PerceivedSeverity)->exists = 1;
314                  return MI_RESULT_OK;
315              }
316 krisbash 1.1 
317              MI_INLINE MI_Result MI_CALL OMI_Error_Clear_PerceivedSeverity(
318                  _Inout_ OMI_Error* self)
319              {
320                  memset((void*)&self->PerceivedSeverity, 0, sizeof(self->PerceivedSeverity));
321                  return MI_RESULT_OK;
322              }
323              
324              MI_INLINE MI_Result MI_CALL OMI_Error_Set_ProbableCause(
325                  _Inout_ OMI_Error* self,
326                  _In_ MI_Uint16 x)
327              {
328                  ((MI_Uint16Field*)&self->ProbableCause)->value = x;
329                  ((MI_Uint16Field*)&self->ProbableCause)->exists = 1;
330                  return MI_RESULT_OK;
331              }
332              
333              MI_INLINE MI_Result MI_CALL OMI_Error_Clear_ProbableCause(
334                  _Inout_ OMI_Error* self)
335              {
336                  memset((void*)&self->ProbableCause, 0, sizeof(self->ProbableCause));
337 krisbash 1.1     return MI_RESULT_OK;
338              }
339              
340              MI_INLINE MI_Result MI_CALL OMI_Error_Set_ProbableCauseDescription(
341                  _Inout_ OMI_Error* self,
342                  _In_z_ const MI_Char* str)
343              {
344                  return self->__instance.ft->SetElementAt(
345                      (MI_Instance*)&self->__instance,
346                      8,
347                      (MI_Value*)&str,
348                      MI_STRING,
349                      0);
350              }
351              
352              MI_INLINE MI_Result MI_CALL OMI_Error_SetPtr_ProbableCauseDescription(
353                  _Inout_ OMI_Error* self,
354                  _In_z_ const MI_Char* str)
355              {
356                  return self->__instance.ft->SetElementAt(
357                      (MI_Instance*)&self->__instance,
358 krisbash 1.1         8,
359                      (MI_Value*)&str,
360                      MI_STRING,
361                      MI_FLAG_BORROW);
362              }
363              
364              MI_INLINE MI_Result MI_CALL OMI_Error_Clear_ProbableCauseDescription(
365                  _Inout_ OMI_Error* self)
366              {
367                  return self->__instance.ft->ClearElementAt(
368                      (MI_Instance*)&self->__instance,
369                      8);
370              }
371              
372              MI_INLINE MI_Result MI_CALL OMI_Error_Set_RecommendedActions(
373                  _Inout_ OMI_Error* self,
374                  _In_reads_opt_(size) const MI_Char** data,
375                  _In_ MI_Uint32 size)
376              {
377                  MI_Array arr;
378                  arr.data = (void*)data;
379 krisbash 1.1     arr.size = size;
380                  return self->__instance.ft->SetElementAt(
381                      (MI_Instance*)&self->__instance,
382                      9,
383                      (MI_Value*)&arr,
384                      MI_STRINGA,
385                      0);
386              }
387              
388              MI_INLINE MI_Result MI_CALL OMI_Error_SetPtr_RecommendedActions(
389                  _Inout_ OMI_Error* self,
390                  _In_reads_opt_(size) const MI_Char** data,
391                  _In_ MI_Uint32 size)
392              {
393                  MI_Array arr;
394                  arr.data = (void*)data;
395                  arr.size = size;
396                  return self->__instance.ft->SetElementAt(
397                      (MI_Instance*)&self->__instance,
398                      9,
399                      (MI_Value*)&arr,
400 krisbash 1.1         MI_STRINGA,
401                      MI_FLAG_BORROW);
402              }
403              
404              MI_INLINE MI_Result MI_CALL OMI_Error_Clear_RecommendedActions(
405                  _Inout_ OMI_Error* self)
406              {
407                  return self->__instance.ft->ClearElementAt(
408                      (MI_Instance*)&self->__instance,
409                      9);
410              }
411              
412              MI_INLINE MI_Result MI_CALL OMI_Error_Set_ErrorSource(
413                  _Inout_ OMI_Error* self,
414                  _In_z_ const MI_Char* str)
415              {
416                  return self->__instance.ft->SetElementAt(
417                      (MI_Instance*)&self->__instance,
418                      10,
419                      (MI_Value*)&str,
420                      MI_STRING,
421 krisbash 1.1         0);
422              }
423              
424              MI_INLINE MI_Result MI_CALL OMI_Error_SetPtr_ErrorSource(
425                  _Inout_ OMI_Error* self,
426                  _In_z_ const MI_Char* str)
427              {
428                  return self->__instance.ft->SetElementAt(
429                      (MI_Instance*)&self->__instance,
430                      10,
431                      (MI_Value*)&str,
432                      MI_STRING,
433                      MI_FLAG_BORROW);
434              }
435              
436              MI_INLINE MI_Result MI_CALL OMI_Error_Clear_ErrorSource(
437                  _Inout_ OMI_Error* self)
438              {
439                  return self->__instance.ft->ClearElementAt(
440                      (MI_Instance*)&self->__instance,
441                      10);
442 krisbash 1.1 }
443              
444              MI_INLINE MI_Result MI_CALL OMI_Error_Set_ErrorSourceFormat(
445                  _Inout_ OMI_Error* self,
446                  _In_ MI_Uint16 x)
447              {
448                  ((MI_Uint16Field*)&self->ErrorSourceFormat)->value = x;
449                  ((MI_Uint16Field*)&self->ErrorSourceFormat)->exists = 1;
450                  return MI_RESULT_OK;
451              }
452              
453              MI_INLINE MI_Result MI_CALL OMI_Error_Clear_ErrorSourceFormat(
454                  _Inout_ OMI_Error* self)
455              {
456                  memset((void*)&self->ErrorSourceFormat, 0, sizeof(self->ErrorSourceFormat));
457                  return MI_RESULT_OK;
458              }
459              
460              MI_INLINE MI_Result MI_CALL OMI_Error_Set_OtherErrorSourceFormat(
461                  _Inout_ OMI_Error* self,
462                  _In_z_ const MI_Char* str)
463 krisbash 1.1 {
464                  return self->__instance.ft->SetElementAt(
465                      (MI_Instance*)&self->__instance,
466                      12,
467                      (MI_Value*)&str,
468                      MI_STRING,
469                      0);
470              }
471              
472              MI_INLINE MI_Result MI_CALL OMI_Error_SetPtr_OtherErrorSourceFormat(
473                  _Inout_ OMI_Error* self,
474                  _In_z_ const MI_Char* str)
475              {
476                  return self->__instance.ft->SetElementAt(
477                      (MI_Instance*)&self->__instance,
478                      12,
479                      (MI_Value*)&str,
480                      MI_STRING,
481                      MI_FLAG_BORROW);
482              }
483              
484 krisbash 1.1 MI_INLINE MI_Result MI_CALL OMI_Error_Clear_OtherErrorSourceFormat(
485                  _Inout_ OMI_Error* self)
486              {
487                  return self->__instance.ft->ClearElementAt(
488                      (MI_Instance*)&self->__instance,
489                      12);
490              }
491              
492              MI_INLINE MI_Result MI_CALL OMI_Error_Set_CIMStatusCode(
493                  _Inout_ OMI_Error* self,
494                  _In_ MI_Uint32 x)
495              {
496                  ((MI_Uint32Field*)&self->CIMStatusCode)->value = x;
497                  ((MI_Uint32Field*)&self->CIMStatusCode)->exists = 1;
498                  return MI_RESULT_OK;
499              }
500              
501              MI_INLINE MI_Result MI_CALL OMI_Error_Clear_CIMStatusCode(
502                  _Inout_ OMI_Error* self)
503              {
504                  memset((void*)&self->CIMStatusCode, 0, sizeof(self->CIMStatusCode));
505 krisbash 1.1     return MI_RESULT_OK;
506              }
507              
508              MI_INLINE MI_Result MI_CALL OMI_Error_Set_CIMStatusCodeDescription(
509                  _Inout_ OMI_Error* self,
510                  _In_z_ const MI_Char* str)
511              {
512                  return self->__instance.ft->SetElementAt(
513                      (MI_Instance*)&self->__instance,
514                      14,
515                      (MI_Value*)&str,
516                      MI_STRING,
517                      0);
518              }
519              
520              MI_INLINE MI_Result MI_CALL OMI_Error_SetPtr_CIMStatusCodeDescription(
521                  _Inout_ OMI_Error* self,
522                  _In_z_ const MI_Char* str)
523              {
524                  return self->__instance.ft->SetElementAt(
525                      (MI_Instance*)&self->__instance,
526 krisbash 1.1         14,
527                      (MI_Value*)&str,
528                      MI_STRING,
529                      MI_FLAG_BORROW);
530              }
531              
532              MI_INLINE MI_Result MI_CALL OMI_Error_Clear_CIMStatusCodeDescription(
533                  _Inout_ OMI_Error* self)
534              {
535                  return self->__instance.ft->ClearElementAt(
536                      (MI_Instance*)&self->__instance,
537                      14);
538              }
539              
540              MI_INLINE MI_Result MI_CALL OMI_Error_Set_error_Code(
541                  _Inout_ OMI_Error* self,
542                  _In_ MI_Uint32 x)
543              {
544                  ((MI_Uint32Field*)&self->error_Code)->value = x;
545                  ((MI_Uint32Field*)&self->error_Code)->exists = 1;
546                  return MI_RESULT_OK;
547 krisbash 1.1 }
548              
549              MI_INLINE MI_Result MI_CALL OMI_Error_Clear_error_Code(
550                  _Inout_ OMI_Error* self)
551              {
552                  memset((void*)&self->error_Code, 0, sizeof(self->error_Code));
553                  return MI_RESULT_OK;
554              }
555              
556              MI_INLINE MI_Result MI_CALL OMI_Error_Set_error_Type(
557                  _Inout_ OMI_Error* self,
558                  _In_z_ const MI_Char* str)
559              {
560                  return self->__instance.ft->SetElementAt(
561                      (MI_Instance*)&self->__instance,
562                      16,
563                      (MI_Value*)&str,
564                      MI_STRING,
565                      0);
566              }
567              
568 krisbash 1.1 MI_INLINE MI_Result MI_CALL OMI_Error_SetPtr_error_Type(
569                  _Inout_ OMI_Error* self,
570                  _In_z_ const MI_Char* str)
571              {
572                  return self->__instance.ft->SetElementAt(
573                      (MI_Instance*)&self->__instance,
574                      16,
575                      (MI_Value*)&str,
576                      MI_STRING,
577                      MI_FLAG_BORROW);
578              }
579              
580              MI_INLINE MI_Result MI_CALL OMI_Error_Clear_error_Type(
581                  _Inout_ OMI_Error* self)
582              {
583                  return self->__instance.ft->ClearElementAt(
584                      (MI_Instance*)&self->__instance,
585                      16);
586              }
587              
588              MI_INLINE MI_Result MI_CALL OMI_Error_Set_error_Category(
589 krisbash 1.1     _Inout_ OMI_Error* self,
590                  _In_ MI_Uint16 x)
591              {
592                  ((MI_Uint16Field*)&self->error_Category)->value = x;
593                  ((MI_Uint16Field*)&self->error_Category)->exists = 1;
594                  return MI_RESULT_OK;
595              }
596              
597              MI_INLINE MI_Result MI_CALL OMI_Error_Clear_error_Category(
598                  _Inout_ OMI_Error* self)
599              {
600                  memset((void*)&self->error_Category, 0, sizeof(self->error_Category));
601                  return MI_RESULT_OK;
602              }
603              
604              
605              #endif /* _OMI_Error_h */

ViewCVS 0.9.2