When enumerating/summarizing many entries into one feed, we may need to
read each entry. Making it easier to do this with a function and using
it for retrieving the resource itself.
}
static Atom *
-gio_atom_retrieve_resource (AtomCtx *ctx, IRI *iri)
+gio_file_to_atom (AtomCtx *ctx, GFile *file)
{
- GFile *file;
GError *error = NULL;
gchar *data;
gsize len;
Atom *atom;
- file = gio_iri_to_file (ctx, iri);
error = NULL;
if (!g_file_load_contents (file, NULL, &data, &len, NULL, &error))
{
return atom;
}
+static Atom *
+gio_atom_retrieve_resource (AtomCtx *ctx, IRI *iri)
+{
+ GFile *file;
+ file = gio_iri_to_file (ctx, iri);
+ return gio_file_to_atom (ctx, file);
+}
+
AtomBackend *
gio_backend (void)
{