Completed doxygen conversion of the documentation for the libgedcom part.
[gedcom-parse.git] / include / gom.h
index 15d52a9eea1149cf19c04467802e584bc5fd6e4f..85997e41cbe38f9d723063976501f1253f4c11f4 100644 (file)
@@ -25,6 +25,7 @@
 #define __GEDCOM_GOM_H
 
 #include "gedcom.h"
+#include <time.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -87,9 +88,9 @@ struct note_sub {                     /* NOTE_STRUCTURE */
 struct place {                        /* PLACE_STRUCTURE */
   char *value;                        /* PLACE_VALUE */
   char *place_hierarchy;              /* PLACE_HIERARCHY */
-  struct user_data *extra;
   struct source_citation *citation;
   struct note_sub *note;
+  struct user_data *extra;
 };
 
 struct multimedia_link {              /* MULTIMEDIA_LINK */
@@ -104,6 +105,8 @@ struct multimedia_link {              /* MULTIMEDIA_LINK */
 };
 
 struct lds_event {                    /* LDS_INDIVIDUAL_ORDINANCE */
+  int event;
+  char *event_name;
   char *date_status;                  /* LDS_BAPTISM_DATE_STATUS */
   struct date_value *date;            /* DATE_LDS_ORD */
   char *temple_code;                  /* TEMPLE_CODE */
@@ -420,31 +423,51 @@ int  gom_new_model();
 int  gom_write_file(const char* file_name, int *total_conv_fails);
 
 struct header*     gom_get_header();
+int                gom_header_update_timestamp(time_t t);
+  
 struct submission* gom_get_submission();
+struct submission* gom_new_submission(const char* xrefstr);
+int                gom_delete_submission();
 
 struct family*     gom_get_first_family();
 struct family*     gom_get_family_by_xref(const char *xref);
+struct family*     gom_new_family(const char* xrefstr);
+int                gom_delete_family(struct family* obj);
 
 struct individual* gom_get_first_individual();
 struct individual* gom_get_individual_by_xref(const char *xref);
+struct individual* gom_new_individual(const char* xrefstr);
+int                gom_delete_individual(struct individual* obj);
 
 struct multimedia* gom_get_first_multimedia();
 struct multimedia* gom_get_multimedia_by_xref(const char *xref);
+struct multimedia* gom_new_multimedia(const char* xrefstr);
+int                gom_delete_multimedia(struct multimedia* obj);
 
 struct note*       gom_get_first_note();
 struct note*       gom_get_note_by_xref(const char *xref);
+struct note*       gom_new_note(const char* xrefstr);
+int                gom_delete_note(struct note* obj);
 
 struct repository* gom_get_first_repository();
 struct repository* gom_get_repository_by_xref(const char *xref);
+struct repository* gom_new_repository(const char* xrefstr);
+int                gom_delete_repository(struct repository* obj);
 
 struct source*     gom_get_first_source();
 struct source*     gom_get_source_by_xref(const char *xref);
+struct source*     gom_new_source(const char* xrefstr);
+int                gom_delete_source(struct source* obj);
 
 struct submitter*  gom_get_first_submitter();
 struct submitter*  gom_get_submitter_by_xref(const char *xref);
+struct submitter*  gom_new_submitter(const char* xrefstr);
+int                gom_delete_submitter(struct submitter* obj);
 
 struct user_rec*   gom_get_first_user_rec();
 struct user_rec*   gom_get_user_rec_by_xref(const char *xref);
+struct user_rec*   gom_new_user_rec(const char* xrefstr, const char* tag);
+int                gom_delete_user_rec(struct user_rec* obj);
 
 char* gom_get_string(char* data);
 char* gom_set_string(char** data, const char* utf8_str);
@@ -453,6 +476,128 @@ char* gom_get_string_for_locale(char* data, int* conversion_failures);
 char* gom_set_string_for_locale(char** data, const char* locale_str);
 void  gom_set_unknown(const char* unknown);
 
+typedef enum _DIR {
+  MOVE_UP,
+  MOVE_DOWN
+} Gom_direction;
+  
+struct xref_value* gom_set_xref(struct xref_value** data, const char* xref);
+  
+struct xref_list*  gom_add_xref(struct xref_list** data, const char* xref);
+int                gom_remove_xref(struct xref_list** data, const char* xref);
+int                gom_move_xref(Gom_direction dir, struct xref_list** data,
+                                const char* xref);
+
+struct address*    gom_set_new_address(struct address** obj);
+int                gom_delete_address(struct address** obj);
+
+struct association* gom_add_new_association(struct association** data);
+int                gom_remove_association(struct association** data,
+                                         struct association* obj);
+int                gom_move_association(Gom_direction dir,
+                                       struct association** data,
+                                       struct association* obj);
+  
+struct change_date* gom_set_new_change_date(struct change_date** obj);
+int                 gom_delete_change_date(struct change_date** obj);
+int                 gom_update_timestamp(struct change_date** obj, time_t t);
+
+struct event*      gom_add_new_event(struct event** data);
+int                gom_remove_event(struct event** data, struct event* obj);
+int                gom_move_event(Gom_direction dir, struct event** data,
+                                 struct event* obj);
+  
+struct family_link* gom_add_new_family_link(struct family_link** data);
+int                gom_remove_family_link(struct family_link** data,
+                                         struct family_link* obj);
+int                gom_move_family_link(Gom_direction dir,
+                                       struct family_link** data,
+                                       struct family_link* obj);
+  
+struct lds_event*  gom_add_new_lds_event(struct lds_event** data);
+int                gom_remove_lds_event(struct lds_event** data,
+                                       struct lds_event* obj);
+int                gom_move_lds_event(Gom_direction dir,
+                                     struct lds_event** data,
+                                     struct lds_event* obj);
+  
+struct multimedia_link*
+                   gom_add_new_multimedia_link(struct multimedia_link** data);
+int                gom_remove_multimedia_link(struct multimedia_link** data,
+                                             struct multimedia_link* obj);
+int                gom_move_multimedia_link(Gom_direction dir,
+                                           struct multimedia_link** data,
+                                           struct multimedia_link* obj);
+  
+struct note_sub*   gom_add_new_note_sub(struct note_sub** data);
+int                gom_remove_note_sub(struct note_sub** data,
+                                      struct note_sub* obj);
+int                gom_move_note_sub(Gom_direction dir,
+                                    struct note_sub** data,
+                                    struct note_sub* obj);
+  
+struct pedigree*   gom_add_new_pedigree(struct pedigree** data);
+int                gom_remove_pedigree(struct pedigree** data,
+                                      struct pedigree* obj);
+int                gom_move_pedigree(Gom_direction dir,
+                                    struct pedigree** data,
+                                    struct pedigree* obj);
+  
+struct personal_name* gom_add_new_personal_name(struct personal_name** data);
+int                gom_remove_personal_name(struct personal_name** data,
+                                           struct personal_name* obj);
+int                gom_move_personal_name(Gom_direction dir,
+                                         struct personal_name** data,
+                                         struct personal_name* obj);
+  
+struct place*      gom_set_new_place(struct place** obj);
+int                gom_delete_place(struct place** obj);
+
+struct source_citation*
+                   gom_add_new_source_citation(struct source_citation** data);
+int                gom_remove_source_citation(struct source_citation** data,
+                                             struct source_citation* obj);
+int                gom_move_source_citation(Gom_direction dir,
+                                           struct source_citation** data,
+                                           struct source_citation* obj);
+  
+struct source_description*
+              gom_add_new_source_description(struct source_description** data);
+int           gom_remove_source_description(struct source_description** data,
+                                           struct source_description* obj);
+int           gom_move_source_description(Gom_direction dir,
+                                         struct source_description** data,
+                                         struct source_description* obj);
+  
+struct source_event* gom_add_new_source_event(struct source_event** data);
+int                gom_remove_source_event(struct source_event** data,
+                                          struct source_event* obj);
+int                gom_move_source_event(Gom_direction dir,
+                                        struct source_event** data,
+                                        struct source_event* obj);
+  
+struct text*       gom_add_new_text(struct text** data);
+int                gom_remove_text(struct text** data,
+                                  struct text* obj);
+int                gom_move_text(Gom_direction dir,
+                                struct text** data,
+                                struct text* obj);
+  
+struct user_data*  gom_add_new_user_data(struct user_data** data);
+int                gom_remove_user_data(struct user_data** data,
+                                       struct user_data* obj);
+int                gom_move_user_data(Gom_direction dir,
+                                     struct user_data** data,
+                                     struct user_data* obj);
+  
+struct user_ref_number*
+                   gom_add_new_user_ref_number(struct user_ref_number** data);
+int                gom_remove_user_ref_number(struct user_ref_number** data,
+                                             struct user_ref_number* obj);
+int                gom_move_user_ref_number(Gom_direction dir,
+                                           struct user_ref_number** data,
+                                           struct user_ref_number* obj);
+  
 #ifdef __cplusplus
 }
 #endif