From bfa4cf8ccaf9d78488c3e69c86f2496e2cd982e7 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Thu, 31 Jul 2014 00:19:09 +0200 Subject: [PATCH] Add AgDbError error type --- src/ag-db.c | 2 ++ src/ag-db.h | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/src/ag-db.c b/src/ag-db.c index 42f0b19..7cf9422 100644 --- a/src/ag-db.c +++ b/src/ag-db.c @@ -17,6 +17,8 @@ typedef struct _AgDbPrivate { GdaConnection *conn; } AgDbPrivate; +G_DEFINE_QUARK(ag_db_error_quark, ag_db_error); + G_DEFINE_TYPE_WITH_PRIVATE(AgDb, ag_db, G_TYPE_OBJECT); static void diff --git a/src/ag-db.h b/src/ag-db.h index 3ac3447..104ad3b 100644 --- a/src/ag-db.h +++ b/src/ag-db.h @@ -49,6 +49,10 @@ typedef struct _AgDbSave { gchar *note; } AgDbSave; +typedef enum { + AG_DB_ERROR_NO_CHART +} AgDbError; + GType ag_db_get_type(void) G_GNUC_CONST; AgDb *ag_db_get(void); @@ -62,6 +66,9 @@ gboolean ag_db_save_chart(AgDb *db, GList *ag_db_get_chart_list(AgDb *db, GError **err); +#define AG_DB_ERROR (ag_db_error_quark()) +GQuark ag_db_error_quark(void); + G_END_DECLS #endif /* __AG_DB_H__ */