X-Git-Url: http://git.datanom.net/gtk_lensdatabase.git/blobdiff_plain/b579f6168df36c9cb62de1c1c21ce595fd5e1165..refs/heads/master:/src/database.h diff --git a/src/database.h b/src/database.h index dabc4bf..e0fe722 100644 --- a/src/database.h +++ b/src/database.h @@ -26,6 +26,7 @@ #define DATABASE_H_ 1 #include +#include "lensmaker.h" G_BEGIN_DECLS @@ -37,27 +38,28 @@ G_BEGIN_DECLS #define IS_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE)) #define DATABASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE, DatabaseClass)) -typedef struct Database Database; -typedef struct DatabaseClass DatabaseClass; -typedef struct DatabasePrivate DatabasePrivate; +typedef struct _Database Database; +typedef struct _DatabaseClass DatabaseClass; -struct _Database -{ - GObject parent; - /* add your public declarations here */ - DatabasePrivate *priv; -}; - -struct _DatabaseClass -{ +struct _DatabaseClass { GObjectClass parent_class; + + void (*add_maker) (Database* self, const gchar* name, GError** error); + void (*remove_maker) (Database* self, const gchar* name, GError** error); + + gpointer padding[12]; }; GType database_get_type (void); -GObject *database_new (void); - +Database *database_new (const gchar* path, GError** error); +void database_set_path(Database* self, const gchar* path, GError** error); +void database_add_lens_maker(Database* self, const gchar* name, GError** error); +void database_remove_lens_maker(Database* self, const gchar* name, GError** error); +/* TODO: Make deep copy */ +LensMaker* database_get_lens_maker(Database* self, const gchar* name, GError** error); +void database_print_lens_makers(Database* self); G_END_DECLS