Added backend interface.
authorThadeu Lima de Souza Cascardo <cascardo@minaslivre.org>
Sun, 27 Jan 2008 03:36:40 +0000 (01:36 -0200)
committerThadeu Lima de Souza Cascardo <cascardo@minaslivre.org>
Sun, 27 Jan 2008 03:36:40 +0000 (01:36 -0200)
include/atompub/Makefile.am
include/atompub/atom.h
include/atompub/backend.h [new file with mode: 0644]
src/Makefile.am
src/backend.c [new file with mode: 0644]

index 706ad3d..d760aed 100644 (file)
@@ -1 +1 @@
-include_HEADERS = atom.h config.h ctx.h entry.h error.h feed.h iri.h
+include_HEADERS = atom.h config.h ctx.h entry.h error.h feed.h iri.h backend.h
index 55142c0..9f524dd 100644 (file)
@@ -26,5 +26,6 @@
 #include <atompub/iri.h>
 #include <atompub/entry.h>
 #include <atompub/feed.h>
+#include <atompub/backend.h>
 
 #endif
diff --git a/include/atompub/backend.h b/include/atompub/backend.h
new file mode 100644 (file)
index 0000000..5b3756a
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ *  Copyright (C) 2007  Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+
+#ifndef ATOMPUB_BACKEND_H
+#define ATOMPUB_BACKEND_H
+
+#include <atompub/ctx.h>
+#include <atompub/entry.h>
+#include <atompub/iri.h>
+
+Atom * atom_retrieve_resource (AtomCtx *, IRI *);
+
+#endif
index ae7253e..781a530 100644 (file)
@@ -1,5 +1,5 @@
 bin_PROGRAMS = atompub
-atompub_SOURCES = main.c config.c ctx.c
+atompub_SOURCES = main.c config.c ctx.c backend.c
 atompub_CFLAGS = -I$(top_srcdir)/include
 atompub_CFLAGS += $(GLIB_CFLAGS)
 atompub_LDADD = -L$(top_builddir)/backend/files -lgiochannel
diff --git a/src/backend.c b/src/backend.c
new file mode 100644 (file)
index 0000000..cf72b30
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ *  Copyright (C) 2007  Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License along
+ *  with this program; if not, write to the Free Software Foundation, Inc.,
+ *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+
+#include <atompub/atom.h>
+
+extern Atom *giochannel_atom_retrieve_resource (AtomCtx *, IRI *);
+
+Atom *
+atom_retrieve_resource (AtomCtx *ctx, IRI *iri)
+{
+  return giochannel_atom_retrieve_resource (ctx, iri);
+}