{
AtomEntry * (*retrieve_entry) (AtomCtx *, char *);
void (*enumerate_entries) (AtomCtx *, char ***, AtomEntry ***, size_t *);
+ void (*publish_entry) (AtomCtx *, char *, AtomEntry *);
};
AtomBackend *
backend->enumerate_entries = enumerate_entries;
}
+void
+atom_backend_publish_entry_set (AtomBackend *backend,
+ void publish_entry (AtomCtx *, char *,
+ AtomEntry *))
+{
+ backend->publish_entry = publish_entry;
+}
+
AtomEntry *
atom_retrieve_entry (AtomCtx *ctx, char *req)
{
g_free (entries);
return feed;
}
+
+void
+atom_publish_entry (AtomCtx *ctx, char *req, AtomEntry *entry)
+{
+ AtomBackend *backend;
+ AtomError *aerr;
+ backend = atom_backend (ctx);
+ if (backend && backend->publish_entry)
+ {
+ backend->publish_entry (ctx, req, entry);
+ }
+ else
+ {
+ aerr = atom_error_new ();
+ atom_error_code_set (aerr, 501);
+ atom_error_message_set (aerr, "Not Implemented");
+ atom_error_set (ctx, aerr);
+ }
+}
void atom_backend_enumerate_entries_set (AtomBackend *,
void (AtomCtx *, char ***,
AtomEntry ***, size_t *));
+void atom_backend_publish_entry_set (AtomBackend *,
+ void (AtomCtx *, char *, AtomEntry*));
AtomEntry * atom_retrieve_entry (AtomCtx *, char *);
void atom_enumerate_entries (AtomCtx *, char ***, AtomEntry ***, size_t *);
AtomFeed * atom_retrieve_feed (AtomCtx *);
+void atom_publish_entry (AtomCtx *, char *, AtomEntry *);
AtomBackend * atom_backend (AtomCtx *);
void atom_backend_set (AtomCtx *, AtomBackend *);