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 #ifndef _mof_mof_h
26 #define _mof_mof_h
27
28 #ifdef MI_CHAR_TYPE
29 # if (MI_CHAR_TYPE != 1)
30 # error "MOF compiler requires MI_CHAR_TYPE == 1"
31 # endif
32 #endif
33
34 #ifndef MI_CHAR_TYPE
35 # define MI_CHAR_TYPE 1
36 #endif
37
38 #include <MI.h>
39 #include <stdio.h>
|
41 mike 1.1
42 #ifdef __cplusplus
43 extern "C"
44 {
45 #endif
46
47 typedef struct _MOF_Parser MOF_Parser;
48
49 extern MOF_Parser* MOF_Parser_New(
50 const char* const* paths,
51 size_t numPaths);
52
53 typedef void (*MOF_ErrorCallback)(
54 const char* msg,
55 const wchar_t* wmsg,
56 void* data);
57
58 extern void MOF_Parser_SetErrorCallback(
59 MOF_Parser* self,
60 MOF_ErrorCallback callback,
61 void* data);
62 mike 1.1
63 typedef void (*MOF_WarningCallback)(
64 const char* msg, const wchar_t* wmsg, void* data);
65
66 extern void MOF_Parser_SetWarningCallback(
67 MOF_Parser* self,
68 MOF_WarningCallback callback,
69 void* data);
70
71 typedef void (*MOF_PragmaCallback)(
72 const char* pragma,
73 const char* value,
74 void* data);
75
76 extern void MOF_Parser_SetPragmaCallback(
77 MOF_Parser* self,
78 MOF_PragmaCallback callback,
79 void* data);
80
81 typedef void (*MOF_ClassDeclCallback)(
82 const MI_ClassDecl* decl,
83 mike 1.1 void* data);
84
85 typedef void (*MOF_InstanceDeclCallback)(
86 const MI_InstanceDecl* decl,
87 void* data);
88
89 extern void MOF_Parser_SetClassDeclCallback(
90 MOF_Parser* self,
91 MOF_ClassDeclCallback callback,
92 void* data);
93
94 extern void MOF_Parser_SetInstanceDeclCallback(
95 MOF_Parser* self,
96 MOF_InstanceDeclCallback callback,
97 void* data);
98
99 typedef void (*MOF_QualifierDeclCallback)(
100 const MI_QualifierDecl* decl,
101 void* data);
102
103 extern void MOF_Parser_SetQualifierDeclCallback(
104 mike 1.1 MOF_Parser* self,
105 MOF_QualifierDeclCallback callback,
106 void* data);
107
108 extern int MOF_Parser_Parse(
109 MOF_Parser* self,
110 const char* path);
111
112 extern void MOF_Parser_Delete(
113 MOF_Parser* self);
114
|