#ifndef HMML_H_ #define HMML_H_ #include #include // Data structures typedef struct { char* name; char* role; } HMML_Credit; typedef struct { char* key; char* value; } HMML_VideoCustomMetaData; typedef struct { char* member; char* stream_platform; char* stream_username; char* project; char* title; char* vod_platform; char* id; char* output; char* template; char* medium; HMML_Credit* credits; size_t credit_count; HMML_VideoCustomMetaData* custom; size_t custom_count; } HMML_VideoMetaData; typedef struct { char* site; char* page; char* url; char* title; char* article; char* author; char* editor; char* publisher; char* isbn; } HMML_Reference; typedef enum { HMML_CATEGORY, HMML_MEMBER, HMML_PROJECT, HMML_MARKER_COUNT, } HMML_MarkerType; typedef struct { HMML_MarkerType type; char* marker; char* parameter; char* episode; } HMML_Marker; typedef struct { int id; char* author; } HMML_Quote; typedef struct { int line; int h, m, s; char* text; char* author; HMML_Reference* references; size_t reference_count; HMML_Marker* markers; size_t marker_count; HMML_Quote quote; _Bool has_quote; } HMML_Annotation; typedef struct { int line; char* message; } HMML_Error; typedef struct { _Bool well_formed; HMML_VideoMetaData metadata; HMML_Annotation* annotations; size_t annotation_count; HMML_Error error; void* free_list; } HMML_Output; // Functions HMML_Output hmml_parse_file (FILE* file); void hmml_dump (HMML_Output* output); void hmml_free (HMML_Output* output); // Version extern const struct HMML_Version { int Major, Minor, Patch; } hmml_version; #endif