00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef C_OBJ_SMBIOS_H
00020 #define C_OBJ_SMBIOS_H
00021
00022
00023 #include "smbios_c/compat.h"
00024 #include "smbios_c/types.h"
00025
00026
00027 #include "smbios_c/config/abi_prefix.h"
00028
00029 EXTERN_C_BEGIN;
00030
00031 #define SMBIOS_DEFAULTS 0x0000
00032 #define SMBIOS_GET_SINGLETON 0x0001
00033 #define SMBIOS_GET_NEW 0x0002
00034 #define SMBIOS_UNIT_TEST_MODE 0x0004
00035 #define SMBIOS_NO_FIXUPS 0x0008
00036 #define SMBIOS_NO_ERR_CLEAR 0x0010
00037
00038 struct smbios_table;
00039 struct smbios_struct;
00040
00041
00042 DLL_SPEC struct smbios_table *smbios_table_factory(int flags, ...);
00043
00044
00045 DLL_SPEC void smbios_table_free(struct smbios_table *);
00046
00048 DLL_SPEC const char * DLL_SPEC smbios_table_strerror(const struct smbios_table *);
00049
00050
00051 DLL_SPEC void smbios_table_walk(struct smbios_table *, void (*smbios_table_walk_fn)(const struct smbios_struct *, void *userdata), void *userdata);
00052
00053
00054 DLL_SPEC struct smbios_struct *smbios_table_get_next_struct(const struct smbios_table *, const struct smbios_struct *cur);
00055 DLL_SPEC struct smbios_struct *smbios_table_get_next_struct_by_type(const struct smbios_table *, const struct smbios_struct *cur, u8 type);
00056 DLL_SPEC struct smbios_struct *smbios_table_get_next_struct_by_handle(const struct smbios_table *, const struct smbios_struct *cur, u16 handle);
00057
00058 #define smbios_table_for_each_struct(table_name, struct_name) \
00059 for( \
00060 const struct smbios_struct *struct_name = smbios_table_get_next_struct(table_name, 0);\
00061 struct_name;\
00062 struct_name = smbios_table_get_next_struct(table_name, struct_name)\
00063 )
00064
00065 #define smbios_table_for_each_struct_type(table_name, struct_name, struct_type) \
00066 for( \
00067 const struct smbios_struct *struct_name = smbios_table_get_next_struct_by_type(table_name, 0, struct_type);\
00068 struct_name;\
00069 struct_name = smbios_table_get_next_struct_by_type(table_name, struct_name, struct_type)\
00070 )
00071
00072 EXTERN_C_END;
00073
00074
00075 #include "smbios_c/config/abi_suffix.h"
00076
00077 #endif