lib_LTLIBRARIES = libatom.la
libatom_la_SOURCES = id.c entry.c person.c feed.c \
- config.c ctx.c backend.c error.c frontend.c
+ config.c ctx.c backend.c error.c frontend.c request.c
libatom_la_CFLAGS = -I$(top_srcdir)/include $(GLIB_CFLAGS)
libatom_la_CFLAGS += $(XML_CFLAGS) $(GIO_CFLAGS)
libatom_la_LIBADD = $(GIO_LIBS) $(GLIB_LIBS) $(XML_LIBS)
--- /dev/null
+/*
+ * Copyright (C) 2008 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>
+
+#include <glib.h>
+
+struct _atom_request
+{
+ int type;
+ char *request;
+};
+
+AtomRequest *
+atom_request_new (int type, char *request)
+{
+ AtomRequest *req;
+ req = g_slice_new (AtomRequest);
+ req->type = type;
+ req->request = g_strdup (request);
+ return req;
+}
+
+void
+atom_request_delete (AtomRequest *req)
+{
+ if (req->request)
+ g_free (req->request);
+ g_slice_free (AtomRequest, req);
+}
+
+int
+atom_request_type (AtomRequest *req)
+{
+ return req->type;
+}
+
+char *
+atom_request_request (AtomRequest *req)
+{
+ return req->request;
+}
pkginclude_HEADERS = atom.h config.h ctx.h entry.h person.h error.h feed.h \
id.h iri.h backend.h atom-glib.h error-glib.h atom-xml.h \
entry-xml.h person-xml.h feed-xml.h globals.h \
- map.h frontend.h
+ map.h frontend.h request.h
#include <atompub/backend.h>
#include <atompub/map.h>
#include <atompub/frontend.h>
+#include <atompub/request.h>
#endif
--- /dev/null
+/*
+ * Copyright (C) 2008 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_REQUEST_H
+#define ATOMPUB_REQUEST_H
+
+#include <atompub/ctx.h>
+
+enum
+{
+ ATOM_REQUEST_NONE,
+ ATOM_REQUEST_GET
+};
+
+typedef struct _atom_request AtomRequest;
+
+AtomRequest *atom_request_new (int, char *);
+void atom_request_delete (AtomRequest *);
+int atom_request_type (AtomRequest *);
+char *atom_request_request (AtomRequest *);
+
+#endif