From: Thadeu Lima de Souza Cascardo Date: Sat, 9 Aug 2008 08:03:50 +0000 (-0300) Subject: Changed from Atom to AtomEntry and atom_ to atom_entry_ X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fatompub.git;a=commitdiff_plain;h=0553ef19601df3a70c770addc02fda47bb5734f6 Changed from Atom to AtomEntry and atom_ to atom_entry_ --- diff --git a/backend/files/giochannel.c b/backend/files/giochannel.c index dde0c56..cfce2f2 100644 --- a/backend/files/giochannel.c +++ b/backend/files/giochannel.c @@ -61,7 +61,7 @@ giochannel_atom_retrieve_resource (AtomCtx *ctx, IRI *iri) 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; } diff --git a/backend/gio/gio.c b/backend/gio/gio.c index b930e10..84a801a 100644 --- a/backend/gio/gio.c +++ b/backend/gio/gio.c @@ -53,7 +53,7 @@ gio_atom_retrieve_resource (AtomCtx *ctx, IRI *iri) 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; } diff --git a/frontend/cgi/cgi.c b/frontend/cgi/cgi.c index f61ea67..7e80b7d 100644 --- a/frontend/cgi/cgi.c +++ b/frontend/cgi/cgi.c @@ -38,7 +38,7 @@ cgi_serve_request (AtomCtx *ctx) 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); @@ -47,8 +47,8 @@ cgi_serve_request (AtomCtx *ctx) { 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) { diff --git a/include/atompub/entry.h b/include/atompub/entry.h index dd2cf05..a8eadb2 100644 --- a/include/atompub/entry.h +++ b/include/atompub/entry.h @@ -22,11 +22,13 @@ #include -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