+/*
+ * 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>
+
+#include <string.h>
+
+struct _atom_frontend
+{
+ void (*map_entries) (AtomCtx *, char **, AtomEntry **, size_t);
+};
+
+AtomFrontend *
+atom_frontend_new ()
+{
+ AtomFrontend *frontend;
+ frontend = g_slice_new (AtomFrontend);
+ frontend->map_entries = NULL;
+ return frontend;
+}
+
+void
+atom_frontend_delete (AtomFrontend *frontend)
+{
+ g_slice_free (AtomFrontend, frontend);
+}
+
+void
+atom_frontend_map_entries_set (AtomFrontend *frontend,
+ void map_entries (AtomCtx *,
+ char **,
+ AtomEntry **,
+ size_t))
+{
+ frontend->map_entries = map_entries;
+}
+
+void
+atom_frontend_map_entries (AtomCtx *ctx, char ** reqs,
+ AtomEntry ** entries, size_t len)
+{
+ AtomFrontend *frontend;
+ frontend = atom_frontend (ctx);
+ if (frontend && frontend->map_entries)
+ {
+ frontend->map_entries (ctx, reqs, entries, len);
+ }
+}