#include <gio/gio.h>
#include <atompub/atom.h>
-GFile *gio_iri_to_file (AtomCtx *ctx, IRI *iri)
+static GFile *
+gio_iri_to_file (AtomCtx *ctx, IRI *iri)
{
gchar *root = atom_config_get_str (ctx, "gio", "root");
gchar *path = iri_get_path (iri);
return file;
}
-Atom * gio_atom_retrieve_resource (AtomCtx *ctx, IRI *iri)
+static Atom *
+gio_atom_retrieve_resource (AtomCtx *ctx, IRI *iri)
{
GFile *file;
GError *error = NULL;
atom_error_set (ctx, error);
return NULL;
}
- g_object_unref (channel);
+ g_object_unref (file);
atom = atom_new_data_len (data, len);
g_free (data);
return atom;
}
+
+AtomBackend *
+gio_backend (void)
+{
+ AtomBackend *backend;
+ backend = atom_backend_new ();
+ atom_backend_retrieve_resource_set (backend, gio_atom_retrieve_resource);
+ return backend;
+}