return NULL;
}
g_io_channel_unref (channel);
- atom = atom_new_data_len (data, len);
+ atom = atom_entry_new_data_len (data, len);
g_free (data);
return atom;
}
return NULL;
}
g_object_unref (file);
- atom = atom_new_data_len (data, len);
+ atom = atom_entry_new_data_len (data, len);
g_free (data);
return atom;
}
if (!strcmp (method, "GET"))
{
IRI *iri = iri_new ();
- Atom *atom;
+ AtomEntry *atom;
AtomError *error;
iri_set_path (iri, path);
atom = atom_retrieve_resource (ctx, iri);
{
char *header = "Content-type: application/atom+xml\n\n";
write (1, header, strlen (header));
- write (1, atom_string (atom), atom_len (atom));
- atom_delete (atom);
+ write (1, atom_entry_string (atom), atom_entry_len (atom));
+ atom_entry_delete (atom);
}
else if ((error = atom_error_get (ctx)) != NULL)
{
#include <sys/types.h>
-typedef struct _atom_entry Atom;
+typedef struct _atom_entry AtomEntry;
-Atom * atom_new_data_len (char *, size_t);
-void atom_delete (Atom *);
-char * atom_string (Atom *);
-size_t atom_len (Atom *);
+AtomEntry * atom_entry_new_with_prefix (char *);
+AtomEntry * atom_entry_new (void);
+AtomEntry * atom_entry_new_data_len (char *, size_t);
+void atom_entry_delete (AtomEntry *);
+char * atom_entry_string (AtomEntry *);
+size_t atom_entry_len (AtomEntry *);
#endif