Finished chaging some Atom into AtomEntry types
authorThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Sat, 9 Aug 2008 08:44:51 +0000 (05:44 -0300)
committerThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Sat, 9 Aug 2008 08:44:51 +0000 (05:44 -0300)
backend/files/giochannel.c
backend/gio/gio.c
include/atompub/backend.h
src/backend.c

index cfce2f2..0cc9588 100644 (file)
@@ -31,7 +31,7 @@ giochannel_iri_to_filename (AtomCtx *ctx, IRI *iri)
   return filename;
 }
 
-static Atom *
+static AtomEntry *
 giochannel_atom_retrieve_resource (AtomCtx *ctx, IRI *iri)
 {
   gchar *filename;
@@ -39,7 +39,7 @@ giochannel_atom_retrieve_resource (AtomCtx *ctx, IRI *iri)
   GError *error = NULL;
   gchar *data;
   gsize len;
-  Atom *atom;
+  AtomEntry *atom;
   filename = giochannel_iri_to_filename (ctx, iri);
   channel = g_io_channel_new_file ((const gchar *) filename, "r", &error);
   g_free (filename);
index 8b1dad6..042f6a8 100644 (file)
@@ -34,13 +34,13 @@ gio_iri_to_file (AtomCtx *ctx, IRI *iri)
   return file;
 }
 
-static Atom *
+static AtomEntry *
 gio_file_to_atom (AtomCtx *ctx, GFile *file)
 {
   GError *error = NULL;
   gchar *data;
   gsize len;
-  Atom *atom;
+  AtomEntry *atom;
   error = NULL;
   if (!g_file_load_contents (file, NULL, &data, &len, NULL, &error))
     {
@@ -54,11 +54,11 @@ gio_file_to_atom (AtomCtx *ctx, GFile *file)
   return atom;
 }
 
-static Atom *
+static AtomEntry *
 gio_atom_retrieve_resource (AtomCtx *ctx, IRI *iri)
 {
   GFile *file;
-  Atom *atom;
+  AtomEntry *atom;
   file = gio_iri_to_file (ctx, iri);
   atom = gio_file_to_atom (ctx, file);
   g_object_unref (file);
@@ -66,7 +66,7 @@ gio_atom_retrieve_resource (AtomCtx *ctx, IRI *iri)
 }
 
 static void
-gio_enumerate_entries (AtomCtx *ctx, Atom ***entries, size_t *len)
+gio_enumerate_entries (AtomCtx *ctx, AtomEntry ***entries, size_t *len)
 {
   GFile *dir;
   GFileEnumerator *enumerator;
index 86fe4c5..e242105 100644 (file)
@@ -29,11 +29,11 @@ typedef struct _atom_backend AtomBackend;
 AtomBackend *atom_backend_new (void);
 void atom_backend_delete (AtomBackend *);
 void atom_backend_retrieve_resource_set (AtomBackend *,
-                                        Atom * (AtomCtx *, IRI *));
+                                        AtomEntry * (AtomCtx *, IRI *));
 void atom_backend_enumerate_entries_set (AtomBackend *,
-                                        void (AtomCtx *, Atom ***, size_t *));
-Atom * atom_retrieve_resource (AtomCtx *, IRI *);
-void atom_enumerate_entries (AtomCtx *, Atom ***, size_t *);
+                                        void (AtomCtx *, AtomEntry ***, size_t *));
+AtomEntry * atom_retrieve_resource (AtomCtx *, IRI *);
+void atom_enumerate_entries (AtomCtx *, AtomEntry ***, size_t *);
 AtomBackend * atom_backend (AtomCtx *);
 void atom_backend_set (AtomCtx *, AtomBackend *);
 
index c95e0e3..f6051be 100644 (file)
@@ -22,8 +22,8 @@
 
 struct _atom_backend
 {
-  Atom * (*retrieve_resource) (AtomCtx *, IRI *);
-  void (*enumerate_entries) (AtomCtx *, Atom ***, size_t *);
+  AtomEntry * (*retrieve_resource) (AtomCtx *, IRI *);
+  void (*enumerate_entries) (AtomCtx *, AtomEntry ***, size_t *);
 };
 
 AtomBackend *
@@ -44,8 +44,8 @@ atom_backend_delete (AtomBackend *backend)
 
 void
 atom_backend_retrieve_resource_set (AtomBackend *backend,
-                                   Atom *retrieve_resource (AtomCtx *,
-                                                            IRI *))
+                                   AtomEntry *retrieve_resource (AtomCtx *,
+                                                                 IRI *))
 {
   backend->retrieve_resource = retrieve_resource;
 }
@@ -53,12 +53,12 @@ atom_backend_retrieve_resource_set (AtomBackend *backend,
 void
 atom_backend_enumerate_entries_set (AtomBackend *backend,
                                    void enumerate_entries (AtomCtx *,
-                                                           Atom ***, size_t*))
+                                                           AtomEntry ***, size_t*))
 {
   backend->enumerate_entries = enumerate_entries;
 }
 
-Atom *
+AtomEntry *
 atom_retrieve_resource (AtomCtx *ctx, IRI *iri)
 {
   AtomBackend *backend;
@@ -69,7 +69,7 @@ atom_retrieve_resource (AtomCtx *ctx, IRI *iri)
 }
 
 void
-atom_backend_enumerate_entries (AtomCtx *ctx, Atom *** entries, size_t *len)
+atom_backend_enumerate_entries (AtomCtx *ctx, AtomEntry *** entries, size_t *len)
 {
   AtomBackend *backend;
   backend = atom_backend (ctx);