Backend now retrieves a request, not an Atom ID
[cascardo/atompub.git] / backend / files / giochannel.c
index 7661ae1..1c4bcf0 100644 (file)
 #include <atompub/atom-glib.h>
 
 static gchar *
-giochannel_id_to_filename (AtomCtx *ctx, AtomID *id)
+giochannel_req_to_filename (AtomCtx *ctx, char *req)
 {
   gchar *root = atom_config_get_str (ctx, "giochannel", "root");
-  gchar *path = atom_id_string (id);
-  gchar *filename = g_build_filename (root, path, NULL);
+  gchar *filename = g_build_filename (root, req, NULL);
   g_free (root);
   return filename;
 }
 
 static AtomEntry *
-giochannel_atom_retrieve_entry (AtomCtx *ctx, AtomID *id)
+giochannel_atom_retrieve_entry (AtomCtx *ctx, char *req)
 {
   gchar *filename;
   GIOChannel *channel;
@@ -40,7 +39,7 @@ giochannel_atom_retrieve_entry (AtomCtx *ctx, AtomID *id)
   gchar *data;
   gsize len;
   AtomEntry *atom;
-  filename = giochannel_id_to_filename (ctx, id);
+  filename = giochannel_req_to_filename (ctx, req);
   channel = g_io_channel_new_file ((const gchar *) filename, "r", &error);
   g_free (filename);
   if (channel == NULL)