Introducing AtomID, which is used in core, instead of IRI
[cascardo/atompub.git] / backend / files / giochannel.c
index 707b822..7661ae1 100644 (file)
 #include <atompub/atom-glib.h>
 
 static gchar *
-giochannel_iri_to_filename (AtomCtx *ctx, IRI *iri)
+giochannel_id_to_filename (AtomCtx *ctx, AtomID *id)
 {
   gchar *root = atom_config_get_str (ctx, "giochannel", "root");
-  gchar *path = iri_get_path (iri);
+  gchar *path = atom_id_string (id);
   gchar *filename = g_build_filename (root, path, NULL);
   g_free (root);
   return filename;
 }
 
 static AtomEntry *
-giochannel_atom_retrieve_entry (AtomCtx *ctx, IRI *iri)
+giochannel_atom_retrieve_entry (AtomCtx *ctx, AtomID *id)
 {
   gchar *filename;
   GIOChannel *channel;
@@ -40,7 +40,7 @@ giochannel_atom_retrieve_entry (AtomCtx *ctx, IRI *iri)
   gchar *data;
   gsize len;
   AtomEntry *atom;
-  filename = giochannel_iri_to_filename (ctx, iri);
+  filename = giochannel_id_to_filename (ctx, id);
   channel = g_io_channel_new_file ((const gchar *) filename, "r", &error);
   g_free (filename);
   if (channel == NULL)