X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=include%2Fgom.h;h=5e33076404b26e914615bef67033328fc3179e8b;hb=201d47019dcd117e5203f0d3ae15fc95b263b2dd;hp=566b16376207d44b298d88332876120be13b071e;hpb=0906677c97095d3ac38d11cce722c58fd882d970;p=gedcom-parse.git diff --git a/include/gom.h b/include/gom.h index 566b163..5e33076 100644 --- a/include/gom.h +++ b/include/gom.h @@ -24,7 +24,11 @@ #ifndef __GEDCOM_GOM_H #define __GEDCOM_GOM_H -__BEGIN_DECLS +#include "gedcom.h" + +#ifdef __cplusplus +extern "C" { +#endif /* Sub-structures */ @@ -411,35 +415,45 @@ struct user_rec { /* Functions */ -int gom_parse_file(char *file_name); +int gom_parse_file(const char *file_name); +int gom_new_model(); struct header* gom_get_header(); struct submission* gom_get_submission(); struct family* gom_get_first_family(); -struct family* gom_get_family_by_xref(char *xref); +struct family* gom_get_family_by_xref(const char *xref); struct individual* gom_get_first_individual(); -struct individual* gom_get_individual_by_xref(char *xref); +struct individual* gom_get_individual_by_xref(const char *xref); struct multimedia* gom_get_first_multimedia(); -struct multimedia* gom_get_multimedia_by_xref(char *xref); +struct multimedia* gom_get_multimedia_by_xref(const char *xref); struct note* gom_get_first_note(); -struct note* gom_get_note_by_xref(char *xref); +struct note* gom_get_note_by_xref(const char *xref); struct repository* gom_get_first_repository(); -struct repository* gom_get_repository_by_xref(char *xref); +struct repository* gom_get_repository_by_xref(const char *xref); struct source* gom_get_first_source(); -struct source* gom_get_source_by_xref(char *xref); +struct source* gom_get_source_by_xref(const char *xref); struct submitter* gom_get_first_submitter(); -struct submitter* gom_get_submitter_by_xref(char *xref); +struct submitter* gom_get_submitter_by_xref(const char *xref); struct user_rec* gom_get_first_user_rec(); -struct user_rec* gom_get_user_rec_by_xref(char *xref); +struct user_rec* gom_get_user_rec_by_xref(const char *xref); + +char* gom_get_string(char* data); +char* gom_set_string(char** data, const char* utf8_value); + +char* gom_get_string_locale(char* data, int* conversion_failures); +char* gom_set_string_locale(char** data, const char* locale_value); +void gom_set_unknown(const char* unknown); -__END_DECLS +#ifdef __cplusplus +} +#endif #endif /* __GEDCOM_GOM_H */