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

  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>
 40           
 41           #ifdef __cplusplus
 42           extern "C" 
 43 mike  1.1 {
 44           #endif
 45           
 46           typedef struct _MOF_Parser MOF_Parser;
 47           
 48           extern MOF_Parser* MOF_Parser_New(
 49               const char* const* paths,
 50               size_t numPaths);
 51           
 52           typedef void (*MOF_ErrorCallback)(
 53               const char* msg, 
 54               const wchar_t* wmsg, 
 55               void* data);
 56           
 57           extern void MOF_Parser_SetErrorCallback(
 58               MOF_Parser* self, 
 59               MOF_ErrorCallback callback,
 60               void* data);
 61           
 62           typedef void (*MOF_WarningCallback)(
 63               const char* msg, const wchar_t* wmsg, void* data);
 64 mike  1.1 
 65           extern void MOF_Parser_SetWarningCallback(
 66               MOF_Parser* self, 
 67               MOF_WarningCallback callback,
 68               void* data);
 69           
 70           typedef void (*MOF_PragmaCallback)(
 71               const char* pragma, 
 72               const char* value, 
 73               void* data);
 74           
 75           extern void MOF_Parser_SetPragmaCallback(
 76               MOF_Parser* self, 
 77               MOF_PragmaCallback callback,
 78               void* data);
 79           
 80           typedef void (*MOF_ClassDeclCallback)(
 81               const MI_ClassDecl* decl, 
 82               void* data);
 83           
 84           typedef void (*MOF_InstanceDeclCallback)(
 85 mike  1.1     const MI_InstanceDecl* decl, 
 86               void* data);
 87           
 88           extern void MOF_Parser_SetClassDeclCallback(
 89               MOF_Parser* self, 
 90               MOF_ClassDeclCallback callback,
 91               void* data);
 92           
 93           extern void MOF_Parser_SetInstanceDeclCallback(
 94               MOF_Parser* self, 
 95               MOF_InstanceDeclCallback callback,
 96               void* data);
 97           
 98           typedef void (*MOF_QualifierDeclCallback)(
 99               const MI_QualifierDecl* decl, 
100               void* data);
101           
102           extern void MOF_Parser_SetQualifierDeclCallback(
103               MOF_Parser* self, 
104               MOF_QualifierDeclCallback callback,
105               void* data);
106 mike  1.1 
107           extern int MOF_Parser_Parse(
108               MOF_Parser* self, 
109               const char* path);
110           
111           extern void MOF_Parser_Delete(
112               MOF_Parser* self);
113           
114           void MOF_Parser_Dump(
115               MOF_Parser* self,
116               FILE* file);
117           
118           #ifdef __cplusplus
119           }
120           #endif
121           
122           #endif /* _mof_mof_h */

ViewCVS 0.9.2