X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=backend%2Ffiles%2Fgiochannel.c;fp=backend%2Ffiles%2Fgiochannel.c;h=e8a4bb783f53045e2de8bf6fe7340319deb30a34;hb=df7e3fe62449a935b2f91800ee237e5d8da0d47a;hp=f4e876a5e19ff4e1fe1e93efa31f332f9f544d66;hpb=cffbf1cf22d9a392a6c60222b1e6ac779866a273;p=cascardo%2Fatompub.git diff --git a/backend/files/giochannel.c b/backend/files/giochannel.c index f4e876a..e8a4bb7 100644 --- a/backend/files/giochannel.c +++ b/backend/files/giochannel.c @@ -20,7 +20,8 @@ #include #include -gchar *giochannel_iri_to_filename (AtomCtx *ctx, IRI *iri) +static gchar * +giochannel_iri_to_filename (AtomCtx *ctx, IRI *iri) { gchar *root = atom_config_get_str (ctx, "giochannel", "root"); gchar *path = iri_get_path (iri); @@ -29,7 +30,8 @@ gchar *giochannel_iri_to_filename (AtomCtx *ctx, IRI *iri) return filename; } -Atom * giochannel_atom_retrieve_resource (AtomCtx *ctx, IRI *iri) +static Atom * +giochannel_atom_retrieve_resource (AtomCtx *ctx, IRI *iri) { gchar *filename; GIOChannel *channel; @@ -58,3 +60,13 @@ Atom * giochannel_atom_retrieve_resource (AtomCtx *ctx, IRI *iri) g_free (data); return atom; } + +AtomBackend * +giochannel_backend (void) +{ + AtomBackend *backend; + backend = atom_backend_new (); + atom_backend_retrieve_resource_set (backend, + giochannel_atom_retrieve_resource); + return backend; +}