Backend now retrieves a request, not an Atom ID
[cascardo/atompub.git] / backend / gio / gio.c
index 33a8ff9..02a8640 100644 (file)
 #include <string.h>
 
 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;