Let configuration mechanism be extensible
[cascardo/atompub.git] / atom / ctx.c
index 37a5a0d..d5011e2 100644 (file)
@@ -24,7 +24,7 @@
 struct _atom_ctx
 {
   AtomError *error;
-  gpointer config_data;
+  AtomConfig *config;
   AtomBackend *backend;
   AtomFrontend *frontend;
   GHashTable *bemap;
@@ -37,7 +37,7 @@ atom_ctx_new ()
   AtomCtx *ctx;
   ctx = g_slice_new (AtomCtx);
   ctx->error = NULL;
-  ctx->config_data = NULL;
+  ctx->config = NULL;
   ctx->backend = NULL;
   ctx->frontend = NULL;
   ctx->bemap = g_hash_table_new_full (g_str_hash, g_str_equal,
@@ -77,16 +77,16 @@ atom_error_get (AtomCtx *ctx)
   return ctx->error;
 }
 
-void *
-atom_config_data (AtomCtx *ctx)
+AtomConfig *
+atom_config (AtomCtx *ctx)
 {
-  return ctx->config_data;
+  return ctx->config;
 }
 
 void
-atom_config_data_set (AtomCtx *ctx, void *data)
+atom_config_set (AtomCtx *ctx, AtomConfig *config)
 {
-  ctx->config_data = data;
+  ctx->config = config;
 }
 
 AtomBackend *