X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=backend%2Fgio%2Fgio.c;h=02a86402a856d6534deb12f5e8a14f8a904cca95;hb=dd4b3d257f73f1f464e0e7ffb299b01444c62df0;hp=2f35a009125e220ad5f65357b3d97bff8cf1bb48;hpb=612ba2d28445bece2595eaf38c1f020da04a0551;p=cascardo%2Fatompub.git diff --git a/backend/gio/gio.c b/backend/gio/gio.c index 2f35a00..02a8640 100644 --- a/backend/gio/gio.c +++ b/backend/gio/gio.c @@ -24,11 +24,10 @@ #include static GFile * -gio_id_to_file (AtomCtx *ctx, AtomID *id) +gio_req_to_file (AtomCtx *ctx, char *req) { gchar *root = atom_config_get_str (ctx, "gio", "root"); - gchar *path = atom_id_string (id); - gchar *filename = g_build_filename (root, path, NULL); + gchar *filename = g_build_filename (root, req, NULL); GFile *file = g_file_new_for_path (filename); g_free (root); g_free (filename); @@ -56,11 +55,11 @@ gio_file_to_atom (AtomCtx *ctx, GFile *file) } static AtomEntry * -gio_atom_retrieve_entry (AtomCtx *ctx, AtomID *id) +gio_atom_retrieve_entry (AtomCtx *ctx, char *req) { GFile *file; AtomEntry *atom; - file = gio_id_to_file (ctx, id); + file = gio_req_to_file (ctx, req); atom = gio_file_to_atom (ctx, file); g_object_unref (file); return atom; @@ -127,12 +126,6 @@ gio_enumerate_entries (AtomCtx *ctx, char ***reqs, AtomEntry ***entries, g_ptr_array_free (filenames, FALSE); } -static int -gio_atom_is_feed (AtomCtx *ctx, AtomID *id) -{ - return (!strcmp (atom_id_string (id), "/")); -} - AtomBackend * gio_backend (void) { @@ -140,6 +133,5 @@ gio_backend (void) backend = atom_backend_new (); atom_backend_retrieve_entry_set (backend, gio_atom_retrieve_entry); atom_backend_enumerate_entries_set (backend, gio_enumerate_entries); - atom_backend_is_feed_set (backend, gio_atom_is_feed); return backend; }