return filename;
}
-static Atom *
+static AtomEntry *
giochannel_atom_retrieve_resource (AtomCtx *ctx, IRI *iri)
{
gchar *filename;
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);
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))
{
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);
}
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;
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 *);
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 *
void
atom_backend_retrieve_resource_set (AtomBackend *backend,
- Atom *retrieve_resource (AtomCtx *,
- IRI *))
+ AtomEntry *retrieve_resource (AtomCtx *,
+ IRI *))
{
backend->retrieve_resource = retrieve_resource;
}
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;
}
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);