1*e42fb487SThu Nguyen #ifndef CPER_SECTION_H 2*e42fb487SThu Nguyen #define CPER_SECTION_H 3*e42fb487SThu Nguyen 4*e42fb487SThu Nguyen #ifdef __cplusplus 5*e42fb487SThu Nguyen extern "C" { 6*e42fb487SThu Nguyen #endif 7*e42fb487SThu Nguyen 8*e42fb487SThu Nguyen #include <json.h> 9*e42fb487SThu Nguyen #include <stdio.h> 10*e42fb487SThu Nguyen #include <stdlib.h> 11*e42fb487SThu Nguyen #include <libcper/Cper.h> 12*e42fb487SThu Nguyen 13*e42fb487SThu Nguyen //Definition structure for a single CPER section type. 14*e42fb487SThu Nguyen typedef struct { 15*e42fb487SThu Nguyen EFI_GUID *Guid; 16*e42fb487SThu Nguyen const char *ReadableName; 17*e42fb487SThu Nguyen const char *ShortName; 18*e42fb487SThu Nguyen json_object *(*ToIR)(void *); 19*e42fb487SThu Nguyen void (*ToCPER)(json_object *, FILE *); 20*e42fb487SThu Nguyen } CPER_SECTION_DEFINITION; 21*e42fb487SThu Nguyen 22*e42fb487SThu Nguyen extern CPER_SECTION_DEFINITION section_definitions[]; 23*e42fb487SThu Nguyen extern const size_t section_definitions_len; 24*e42fb487SThu Nguyen 25*e42fb487SThu Nguyen #ifdef __cplusplus 26*e42fb487SThu Nguyen } 27*e42fb487SThu Nguyen #endif 28*e42fb487SThu Nguyen 29*e42fb487SThu Nguyen #endif 30