From: Thadeu Lima de Souza Cascardo Date: Sun, 27 Jan 2008 03:36:40 +0000 (-0200) Subject: Added backend interface. X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fatompub.git;a=commitdiff_plain;h=d0a87a9f0cea802d38b5cb9c87f8a00dea510b71 Added backend interface. --- diff --git a/include/atompub/Makefile.am b/include/atompub/Makefile.am index 706ad3d..d760aed 100644 --- a/include/atompub/Makefile.am +++ b/include/atompub/Makefile.am @@ -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 diff --git a/include/atompub/atom.h b/include/atompub/atom.h index 55142c0..9f524dd 100644 --- a/include/atompub/atom.h +++ b/include/atompub/atom.h @@ -26,5 +26,6 @@ #include #include #include +#include #endif diff --git a/include/atompub/backend.h b/include/atompub/backend.h new file mode 100644 index 0000000..5b3756a --- /dev/null +++ b/include/atompub/backend.h @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2007 Thadeu Lima de Souza Cascardo + * + * 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 +#include +#include + +Atom * atom_retrieve_resource (AtomCtx *, IRI *); + +#endif diff --git a/src/Makefile.am b/src/Makefile.am index ae7253e..781a530 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 index 0000000..cf72b30 --- /dev/null +++ b/src/backend.c @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2007 Thadeu Lima de Souza Cascardo + * + * 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 + +extern Atom *giochannel_atom_retrieve_resource (AtomCtx *, IRI *); + +Atom * +atom_retrieve_resource (AtomCtx *ctx, IRI *iri) +{ + return giochannel_atom_retrieve_resource (ctx, iri); +}