[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r30430 - gnunet-gtk/src/namestore
From: |
gnunet |
Subject: |
[GNUnet-SVN] r30430 - gnunet-gtk/src/namestore |
Date: |
Sun, 27 Oct 2013 17:35:04 +0100 |
Author: grothoff
Date: 2013-10-27 17:35:04 +0100 (Sun, 27 Oct 2013)
New Revision: 30430
Added:
gnunet-gtk/src/namestore/plugin_gtk_namestore_aaaa.c
gnunet-gtk/src/namestore/plugin_gtk_namestore_cname.c
gnunet-gtk/src/namestore/plugin_gtk_namestore_gns2dns.c
gnunet-gtk/src/namestore/plugin_gtk_namestore_leho.c
gnunet-gtk/src/namestore/plugin_gtk_namestore_mx.c
gnunet-gtk/src/namestore/plugin_gtk_namestore_phone.c
gnunet-gtk/src/namestore/plugin_gtk_namestore_pkey.c
gnunet-gtk/src/namestore/plugin_gtk_namestore_ptr.c
gnunet-gtk/src/namestore/plugin_gtk_namestore_soa.c
gnunet-gtk/src/namestore/plugin_gtk_namestore_srv.c
gnunet-gtk/src/namestore/plugin_gtk_namestore_txt.c
gnunet-gtk/src/namestore/plugin_gtk_namestore_vpn.c
Modified:
gnunet-gtk/src/namestore/Makefile.am
gnunet-gtk/src/namestore/plugin_gtk_namestore_a.c
gnunet-gtk/src/namestore/plugin_gtk_namestore_template.c
Log:
skeletons for all the plugins
Modified: gnunet-gtk/src/namestore/Makefile.am
===================================================================
--- gnunet-gtk/src/namestore/Makefile.am 2013-10-27 16:09:40 UTC (rev
30429)
+++ gnunet-gtk/src/namestore/Makefile.am 2013-10-27 16:35:04 UTC (rev
30430)
@@ -29,10 +29,22 @@
-export-dynamic
-
plugin_LTLIBRARIES = \
- libgnunet_plugin_gtk_namestore_a.la
+ libgnunet_plugin_gtk_namestore_a.la \
+ libgnunet_plugin_gtk_namestore_aaaa.la \
+ libgnunet_plugin_gtk_namestore_cname.la \
+ libgnunet_plugin_gtk_namestore_gns2dns.la \
+ libgnunet_plugin_gtk_namestore_leho.la \
+ libgnunet_plugin_gtk_namestore_mx.la \
+ libgnunet_plugin_gtk_namestore_phone.la \
+ libgnunet_plugin_gtk_namestore_pkey.la \
+ libgnunet_plugin_gtk_namestore_ptr.la \
+ libgnunet_plugin_gtk_namestore_soa.la \
+ libgnunet_plugin_gtk_namestore_srv.la \
+ libgnunet_plugin_gtk_namestore_txt.la \
+ libgnunet_plugin_gtk_namestore_vpn.la
+
libgnunet_plugin_gtk_namestore_a_la_SOURCES = \
plugin_gtk_namestore_a.c
libgnunet_plugin_gtk_namestore_a_la_CFLAGS = \
@@ -43,3 +55,135 @@
-lgnunetutil
libgnunet_plugin_gtk_namestore_a_la_LDFLAGS = \
$(GN_PLUGIN_LDFLAGS)
+
+libgnunet_plugin_gtk_namestore_aaaa_la_SOURCES = \
+ plugin_gtk_namestore_aaaa.c
+libgnunet_plugin_gtk_namestore_aaaa_la_CFLAGS = \
+ @GTK_CFLAGS@ \
+ @GNUNET_CFLAGS@ \
+ @GLADE_CFLAGS@
+libgnunet_plugin_gtk_namestore_aaaa_la_LIBADD = \
+ -lgnunetutil
+libgnunet_plugin_gtk_namestore_aaaa_la_LDFLAGS = \
+ $(GN_PLUGIN_LDFLAGS)
+
+libgnunet_plugin_gtk_namestore_cname_la_SOURCES = \
+ plugin_gtk_namestore_cname.c
+libgnunet_plugin_gtk_namestore_cname_la_CFLAGS = \
+ @GTK_CFLAGS@ \
+ @GNUNET_CFLAGS@ \
+ @GLADE_CFLAGS@
+libgnunet_plugin_gtk_namestore_cname_la_LIBADD = \
+ -lgnunetutil
+libgnunet_plugin_gtk_namestore_cname_la_LDFLAGS = \
+ $(GN_PLUGIN_LDFLAGS)
+
+libgnunet_plugin_gtk_namestore_gns2dns_la_SOURCES = \
+ plugin_gtk_namestore_gns2dns.c
+libgnunet_plugin_gtk_namestore_gns2dns_la_CFLAGS = \
+ @GTK_CFLAGS@ \
+ @GNUNET_CFLAGS@ \
+ @GLADE_CFLAGS@
+libgnunet_plugin_gtk_namestore_gns2dns_la_LIBADD = \
+ -lgnunetutil
+libgnunet_plugin_gtk_namestore_gns2dns_la_LDFLAGS = \
+ $(GN_PLUGIN_LDFLAGS)
+
+libgnunet_plugin_gtk_namestore_leho_la_SOURCES = \
+ plugin_gtk_namestore_leho.c
+libgnunet_plugin_gtk_namestore_leho_la_CFLAGS = \
+ @GTK_CFLAGS@ \
+ @GNUNET_CFLAGS@ \
+ @GLADE_CFLAGS@
+libgnunet_plugin_gtk_namestore_leho_la_LIBADD = \
+ -lgnunetutil
+libgnunet_plugin_gtk_namestore_leho_la_LDFLAGS = \
+ $(GN_PLUGIN_LDFLAGS)
+
+libgnunet_plugin_gtk_namestore_mx_la_SOURCES = \
+ plugin_gtk_namestore_mx.c
+libgnunet_plugin_gtk_namestore_mx_la_CFLAGS = \
+ @GTK_CFLAGS@ \
+ @GNUNET_CFLAGS@ \
+ @GLADE_CFLAGS@
+libgnunet_plugin_gtk_namestore_mx_la_LIBADD = \
+ -lgnunetutil
+libgnunet_plugin_gtk_namestore_mx_la_LDFLAGS = \
+ $(GN_PLUGIN_LDFLAGS)
+
+libgnunet_plugin_gtk_namestore_phone_la_SOURCES = \
+ plugin_gtk_namestore_phone.c
+libgnunet_plugin_gtk_namestore_phone_la_CFLAGS = \
+ @GTK_CFLAGS@ \
+ @GNUNET_CFLAGS@ \
+ @GLADE_CFLAGS@
+libgnunet_plugin_gtk_namestore_phone_la_LIBADD = \
+ -lgnunetutil
+libgnunet_plugin_gtk_namestore_phone_la_LDFLAGS = \
+ $(GN_PLUGIN_LDFLAGS)
+
+libgnunet_plugin_gtk_namestore_pkey_la_SOURCES = \
+ plugin_gtk_namestore_pkey.c
+libgnunet_plugin_gtk_namestore_pkey_la_CFLAGS = \
+ @GTK_CFLAGS@ \
+ @GNUNET_CFLAGS@ \
+ @GLADE_CFLAGS@
+libgnunet_plugin_gtk_namestore_pkey_la_LIBADD = \
+ -lgnunetutil
+libgnunet_plugin_gtk_namestore_pkey_la_LDFLAGS = \
+ $(GN_PLUGIN_LDFLAGS)
+
+libgnunet_plugin_gtk_namestore_ptr_la_SOURCES = \
+ plugin_gtk_namestore_ptr.c
+libgnunet_plugin_gtk_namestore_ptr_la_CFLAGS = \
+ @GTK_CFLAGS@ \
+ @GNUNET_CFLAGS@ \
+ @GLADE_CFLAGS@
+libgnunet_plugin_gtk_namestore_ptr_la_LIBADD = \
+ -lgnunetutil
+libgnunet_plugin_gtk_namestore_ptr_la_LDFLAGS = \
+ $(GN_PLUGIN_LDFLAGS)
+
+libgnunet_plugin_gtk_namestore_soa_la_SOURCES = \
+ plugin_gtk_namestore_soa.c
+libgnunet_plugin_gtk_namestore_soa_la_CFLAGS = \
+ @GTK_CFLAGS@ \
+ @GNUNET_CFLAGS@ \
+ @GLADE_CFLAGS@
+libgnunet_plugin_gtk_namestore_soa_la_LIBADD = \
+ -lgnunetutil
+libgnunet_plugin_gtk_namestore_soa_la_LDFLAGS = \
+ $(GN_PLUGIN_LDFLAGS)
+
+libgnunet_plugin_gtk_namestore_srv_la_SOURCES = \
+ plugin_gtk_namestore_srv.c
+libgnunet_plugin_gtk_namestore_srv_la_CFLAGS = \
+ @GTK_CFLAGS@ \
+ @GNUNET_CFLAGS@ \
+ @GLADE_CFLAGS@
+libgnunet_plugin_gtk_namestore_srv_la_LIBADD = \
+ -lgnunetutil
+libgnunet_plugin_gtk_namestore_srv_la_LDFLAGS = \
+ $(GN_PLUGIN_LDFLAGS)
+
+libgnunet_plugin_gtk_namestore_txt_la_SOURCES = \
+ plugin_gtk_namestore_txt.c
+libgnunet_plugin_gtk_namestore_txt_la_CFLAGS = \
+ @GTK_CFLAGS@ \
+ @GNUNET_CFLAGS@ \
+ @GLADE_CFLAGS@
+libgnunet_plugin_gtk_namestore_txt_la_LIBADD = \
+ -lgnunetutil
+libgnunet_plugin_gtk_namestore_txt_la_LDFLAGS = \
+ $(GN_PLUGIN_LDFLAGS)
+
+libgnunet_plugin_gtk_namestore_vpn_la_SOURCES = \
+ plugin_gtk_namestore_vpn.c
+libgnunet_plugin_gtk_namestore_vpn_la_CFLAGS = \
+ @GTK_CFLAGS@ \
+ @GNUNET_CFLAGS@ \
+ @GLADE_CFLAGS@
+libgnunet_plugin_gtk_namestore_vpn_la_LIBADD = \
+ -lgnunetutil
+libgnunet_plugin_gtk_namestore_vpn_la_LDFLAGS = \
+ $(GN_PLUGIN_LDFLAGS)
Modified: gnunet-gtk/src/namestore/plugin_gtk_namestore_a.c
===================================================================
--- gnunet-gtk/src/namestore/plugin_gtk_namestore_a.c 2013-10-27 16:09:40 UTC
(rev 30429)
+++ gnunet-gtk/src/namestore/plugin_gtk_namestore_a.c 2013-10-27 16:35:04 UTC
(rev 30430)
@@ -131,7 +131,7 @@
* @return always NULL
*/
void *
-libgnunet_plugin_namecache_sqlite_done (void *cls)
+libgnunet_plugin_gtk_namestore_aaaa_done (void *cls)
{
struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
Added: gnunet-gtk/src/namestore/plugin_gtk_namestore_aaaa.c
===================================================================
--- gnunet-gtk/src/namestore/plugin_gtk_namestore_aaaa.c
(rev 0)
+++ gnunet-gtk/src/namestore/plugin_gtk_namestore_aaaa.c 2013-10-27
16:35:04 UTC (rev 30430)
@@ -0,0 +1,123 @@
+/*
+ * This file is part of GNUnet
+ * (C) 2009-2013 Christian Grothoff (and other contributing authors)
+ *
+ * GNUnet 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 3, or (at your
+ * option) any later version.
+ *
+ * GNUnet 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 GNUnet; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * @file namestore/plugin_gtk_namestore_aaaa.c
+ * @brief namestore plugin for editing A records
+ * @author Christian Grothoff
+ */
+#include "gnunet_gtk.h"
+#include "gnunet_gtk_namestore_plugin.h"
+
+
+/**
+ * Function that will be called to initialize the builder's
+ * widgets from the existing record (if there is one).
+ * The `n_value` is the existing value of the record as a string.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param n_value the record as a string
+ * @param builder the edit dialog's builder
+ */
+static void
+aaaa_load (void *cls,
+ gchar *n_value,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+}
+
+
+/**
+ * Function that will be called to retrieve the final value of the
+ * record (in string format) once the dialog is being closed.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return record value as a string, as specified in the dialog
+ */
+static gchar *
+aaaa_store (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return NULL;
+}
+
+
+/**
+ * Function to call to validate the state of the dialog. Should
+ * return #GNUNET_OK if the information in the dialog is valid, and
+ * #GNUNET_SYSERR if some fields contain invalid values. The
+ * function should highlight fields with invalid inputs for the
+ * user.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return #GNUNET_OK if there is a valid record value in the dialog
+ */
+static int
+aaaa_validate (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return GNUNET_OK;
+}
+
+
+/**
+ * Entry point for the plugin.
+ *
+ * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
+ * @return NULL on error, otherwise the plugin context
+ */
+void *
+libgnunet_plugin_gtk_namestore_aaaa_init (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
+
+ plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
+ plugin->cls = env;
+ plugin->dialog_glade_filename = "gnunet_namestore_edit_aaaa.glade";
+ plugin->dialog_widget_name = "edit_aaaa_dialog";
+ plugin->load = &aaaa_load;
+ plugin->store = &aaaa_store;
+ plugin->validate = &aaaa_validate;
+ return plugin;
+}
+
+
+/**
+ * Exit point from the plugin.
+ *
+ * @param cls the plugin context (as returned by "init")
+ * @return always NULL
+ */
+void *
+libgnunet_plugin_gtk_namestore_aaaa_done (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
+
+ GNUNET_free (plugin);
+ return NULL;
+}
+
+/* end of plugin_gtk_namestore_aaaa.c */
Added: gnunet-gtk/src/namestore/plugin_gtk_namestore_cname.c
===================================================================
--- gnunet-gtk/src/namestore/plugin_gtk_namestore_cname.c
(rev 0)
+++ gnunet-gtk/src/namestore/plugin_gtk_namestore_cname.c 2013-10-27
16:35:04 UTC (rev 30430)
@@ -0,0 +1,123 @@
+/*
+ * This file is part of GNUnet
+ * (C) 2009-2013 Christian Grothoff (and other contributing authors)
+ *
+ * GNUnet 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 3, or (at your
+ * option) any later version.
+ *
+ * GNUnet 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 GNUnet; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * @file namestore/plugin_gtk_namestore_cname.c
+ * @brief namestore plugin for editing CNAME records
+ * @author Christian Grothoff
+ */
+#include "gnunet_gtk.h"
+#include "gnunet_gtk_namestore_plugin.h"
+
+
+/**
+ * Function that will be called to initialize the builder's
+ * widgets from the existing record (if there is one).
+ * The `n_value` is the existing value of the record as a string.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param n_value the record as a string
+ * @param builder the edit dialog's builder
+ */
+static void
+cname_load (void *cls,
+ gchar *n_value,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+}
+
+
+/**
+ * Function that will be called to retrieve the final value of the
+ * record (in string format) once the dialog is being closed.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return record value as a string, as specified in the dialog
+ */
+static gchar *
+cname_store (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return NULL;
+}
+
+
+/**
+ * Function to call to validate the state of the dialog. Should
+ * return #GNUNET_OK if the information in the dialog is valid, and
+ * #GNUNET_SYSERR if some fields contain invalid values. The
+ * function should highlight fields with invalid inputs for the
+ * user.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return #GNUNET_OK if there is a valid record value in the dialog
+ */
+static int
+cname_validate (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return GNUNET_OK;
+}
+
+
+/**
+ * Entry point for the plugin.
+ *
+ * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
+ * @return NULL on error, otherwise the plugin context
+ */
+void *
+libgnunet_plugin_gtk_namestore_cname_init (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
+
+ plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
+ plugin->cls = env;
+ plugin->dialog_glade_filename = "gnunet_namestore_edit_cname.glade";
+ plugin->dialog_widget_name = "edit_cname_dialog";
+ plugin->load = &cname_load;
+ plugin->store = &cname_store;
+ plugin->validate = &cname_validate;
+ return plugin;
+}
+
+
+/**
+ * Exit point from the plugin.
+ *
+ * @param cls the plugin context (as returned by "init")
+ * @return always NULL
+ */
+void *
+libgnunet_plugin_gtk_namestore_cname_done (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
+
+ GNUNET_free (plugin);
+ return NULL;
+}
+
+/* end of plugin_gtk_namestore_cname.c */
Added: gnunet-gtk/src/namestore/plugin_gtk_namestore_gns2dns.c
===================================================================
--- gnunet-gtk/src/namestore/plugin_gtk_namestore_gns2dns.c
(rev 0)
+++ gnunet-gtk/src/namestore/plugin_gtk_namestore_gns2dns.c 2013-10-27
16:35:04 UTC (rev 30430)
@@ -0,0 +1,123 @@
+/*
+ * This file is part of GNUnet
+ * (C) 2009-2013 Christian Grothoff (and other contributing authors)
+ *
+ * GNUnet 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 3, or (at your
+ * option) any later version.
+ *
+ * GNUnet 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 GNUnet; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * @file namestore/plugin_gtk_namestore_gns2dns.c
+ * @brief namestore plugin for editing A records
+ * @author Christian Grothoff
+ */
+#include "gnunet_gtk.h"
+#include "gnunet_gtk_namestore_plugin.h"
+
+
+/**
+ * Function that will be called to initialize the builder's
+ * widgets from the existing record (if there is one).
+ * The `n_value` is the existing value of the record as a string.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param n_value the record as a string
+ * @param builder the edit dialog's builder
+ */
+static void
+gns2dns_load (void *cls,
+ gchar *n_value,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+}
+
+
+/**
+ * Function that will be called to retrieve the final value of the
+ * record (in string format) once the dialog is being closed.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return record value as a string, as specified in the dialog
+ */
+static gchar *
+gns2dns_store (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return NULL;
+}
+
+
+/**
+ * Function to call to validate the state of the dialog. Should
+ * return #GNUNET_OK if the information in the dialog is valid, and
+ * #GNUNET_SYSERR if some fields contain invalid values. The
+ * function should highlight fields with invalid inputs for the
+ * user.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return #GNUNET_OK if there is a valid record value in the dialog
+ */
+static int
+gns2dns_validate (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return GNUNET_OK;
+}
+
+
+/**
+ * Entry point for the plugin.
+ *
+ * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
+ * @return NULL on error, otherwise the plugin context
+ */
+void *
+libgnunet_plugin_gtk_namestore_gns2dns_init (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
+
+ plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
+ plugin->cls = env;
+ plugin->dialog_glade_filename = "gnunet_namestore_edit_gns2dns.glade";
+ plugin->dialog_widget_name = "edit_gns2dns_dialog";
+ plugin->load = &gns2dns_load;
+ plugin->store = &gns2dns_store;
+ plugin->validate = &gns2dns_validate;
+ return plugin;
+}
+
+
+/**
+ * Exit point from the plugin.
+ *
+ * @param cls the plugin context (as returned by "init")
+ * @return always NULL
+ */
+void *
+libgnunet_plugin_gtk_namestore_gns2dns_done (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
+
+ GNUNET_free (plugin);
+ return NULL;
+}
+
+/* end of plugin_gtk_namestore_gns2dns.c */
Added: gnunet-gtk/src/namestore/plugin_gtk_namestore_leho.c
===================================================================
--- gnunet-gtk/src/namestore/plugin_gtk_namestore_leho.c
(rev 0)
+++ gnunet-gtk/src/namestore/plugin_gtk_namestore_leho.c 2013-10-27
16:35:04 UTC (rev 30430)
@@ -0,0 +1,123 @@
+/*
+ * This file is part of GNUnet
+ * (C) 2009-2013 Christian Grothoff (and other contributing authors)
+ *
+ * GNUnet 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 3, or (at your
+ * option) any later version.
+ *
+ * GNUnet 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 GNUnet; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * @file namestore/plugin_gtk_namestore_leho.c
+ * @brief namestore plugin for editing A records
+ * @author Christian Grothoff
+ */
+#include "gnunet_gtk.h"
+#include "gnunet_gtk_namestore_plugin.h"
+
+
+/**
+ * Function that will be called to initialize the builder's
+ * widgets from the existing record (if there is one).
+ * The `n_value` is the existing value of the record as a string.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param n_value the record as a string
+ * @param builder the edit dialog's builder
+ */
+static void
+leho_load (void *cls,
+ gchar *n_value,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+}
+
+
+/**
+ * Function that will be called to retrieve the final value of the
+ * record (in string format) once the dialog is being closed.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return record value as a string, as specified in the dialog
+ */
+static gchar *
+leho_store (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return NULL;
+}
+
+
+/**
+ * Function to call to validate the state of the dialog. Should
+ * return #GNUNET_OK if the information in the dialog is valid, and
+ * #GNUNET_SYSERR if some fields contain invalid values. The
+ * function should highlight fields with invalid inputs for the
+ * user.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return #GNUNET_OK if there is a valid record value in the dialog
+ */
+static int
+leho_validate (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return GNUNET_OK;
+}
+
+
+/**
+ * Entry point for the plugin.
+ *
+ * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
+ * @return NULL on error, otherwise the plugin context
+ */
+void *
+libgnunet_plugin_gtk_namestore_leho_init (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
+
+ plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
+ plugin->cls = env;
+ plugin->dialog_glade_filename = "gnunet_namestore_edit_leho.glade";
+ plugin->dialog_widget_name = "edit_leho_dialog";
+ plugin->load = &leho_load;
+ plugin->store = &leho_store;
+ plugin->validate = &leho_validate;
+ return plugin;
+}
+
+
+/**
+ * Exit point from the plugin.
+ *
+ * @param cls the plugin context (as returned by "init")
+ * @return always NULL
+ */
+void *
+libgnunet_plugin_gtk_namestore_leho_done (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
+
+ GNUNET_free (plugin);
+ return NULL;
+}
+
+/* end of plugin_gtk_namestore_leho.c */
Added: gnunet-gtk/src/namestore/plugin_gtk_namestore_mx.c
===================================================================
--- gnunet-gtk/src/namestore/plugin_gtk_namestore_mx.c
(rev 0)
+++ gnunet-gtk/src/namestore/plugin_gtk_namestore_mx.c 2013-10-27 16:35:04 UTC
(rev 30430)
@@ -0,0 +1,123 @@
+/*
+ * This file is part of GNUnet
+ * (C) 2009-2013 Christian Grothoff (and other contributing authors)
+ *
+ * GNUnet 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 3, or (at your
+ * option) any later version.
+ *
+ * GNUnet 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 GNUnet; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * @file namestore/plugin_gtk_namestore_mx.c
+ * @brief namestore plugin for editing A records
+ * @author Christian Grothoff
+ */
+#include "gnunet_gtk.h"
+#include "gnunet_gtk_namestore_plugin.h"
+
+
+/**
+ * Function that will be called to initialize the builder's
+ * widgets from the existing record (if there is one).
+ * The `n_value` is the existing value of the record as a string.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param n_value the record as a string
+ * @param builder the edit dialog's builder
+ */
+static void
+mx_load (void *cls,
+ gchar *n_value,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+}
+
+
+/**
+ * Function that will be called to retrieve the final value of the
+ * record (in string format) once the dialog is being closed.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return record value as a string, as specified in the dialog
+ */
+static gchar *
+mx_store (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return NULL;
+}
+
+
+/**
+ * Function to call to validate the state of the dialog. Should
+ * return #GNUNET_OK if the information in the dialog is valid, and
+ * #GNUNET_SYSERR if some fields contain invalid values. The
+ * function should highlight fields with invalid inputs for the
+ * user.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return #GNUNET_OK if there is a valid record value in the dialog
+ */
+static int
+mx_validate (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return GNUNET_OK;
+}
+
+
+/**
+ * Entry point for the plugin.
+ *
+ * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
+ * @return NULL on error, otherwise the plugin context
+ */
+void *
+libgnunet_plugin_gtk_namestore_mx_init (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
+
+ plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
+ plugin->cls = env;
+ plugin->dialog_glade_filename = "gnunet_namestore_edit_mx.glade";
+ plugin->dialog_widget_name = "edit_mx_dialog";
+ plugin->load = &mx_load;
+ plugin->store = &mx_store;
+ plugin->validate = &mx_validate;
+ return plugin;
+}
+
+
+/**
+ * Exit point from the plugin.
+ *
+ * @param cls the plugin context (as returned by "init")
+ * @return always NULL
+ */
+void *
+libgnunet_plugin_gtk_namestore_aaaa_done (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
+
+ GNUNET_free (plugin);
+ return NULL;
+}
+
+/* end of plugin_gtk_namestore_mx.c */
Added: gnunet-gtk/src/namestore/plugin_gtk_namestore_phone.c
===================================================================
--- gnunet-gtk/src/namestore/plugin_gtk_namestore_phone.c
(rev 0)
+++ gnunet-gtk/src/namestore/plugin_gtk_namestore_phone.c 2013-10-27
16:35:04 UTC (rev 30430)
@@ -0,0 +1,123 @@
+/*
+ * This file is part of GNUnet
+ * (C) 2009-2013 Christian Grothoff (and other contributing authors)
+ *
+ * GNUnet 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 3, or (at your
+ * option) any later version.
+ *
+ * GNUnet 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 GNUnet; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * @file namestore/plugin_gtk_namestore_phone.c
+ * @brief namestore plugin for editing PHONE records
+ * @author Christian Grothoff
+ */
+#include "gnunet_gtk.h"
+#include "gnunet_gtk_namestore_plugin.h"
+
+
+/**
+ * Function that will be called to initialize the builder's
+ * widgets from the existing record (if there is one).
+ * The `n_value` is the existing value of the record as a string.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param n_value the record as a string
+ * @param builder the edit dialog's builder
+ */
+static void
+phone_load (void *cls,
+ gchar *n_value,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+}
+
+
+/**
+ * Function that will be called to retrieve the final value of the
+ * record (in string format) once the dialog is being closed.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return record value as a string, as specified in the dialog
+ */
+static gchar *
+phone_store (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return NULL;
+}
+
+
+/**
+ * Function to call to validate the state of the dialog. Should
+ * return #GNUNET_OK if the information in the dialog is valid, and
+ * #GNUNET_SYSERR if some fields contain invalid values. The
+ * function should highlight fields with invalid inputs for the
+ * user.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return #GNUNET_OK if there is a valid record value in the dialog
+ */
+static int
+phone_validate (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return GNUNET_OK;
+}
+
+
+/**
+ * Entry point for the plugin.
+ *
+ * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
+ * @return NULL on error, otherwise the plugin context
+ */
+void *
+libgnunet_plugin_gtk_namestore_phone_init (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
+
+ plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
+ plugin->cls = env;
+ plugin->dialog_glade_filename = "gnunet_namestore_edit_phone.glade";
+ plugin->dialog_widget_name = "edit_phone_dialog";
+ plugin->load = &phone_load;
+ plugin->store = &phone_store;
+ plugin->validate = &phone_validate;
+ return plugin;
+}
+
+
+/**
+ * Exit point from the plugin.
+ *
+ * @param cls the plugin context (as returned by "init")
+ * @return always NULL
+ */
+void *
+libgnunet_plugin_gtk_namestore_phone_done (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
+
+ GNUNET_free (plugin);
+ return NULL;
+}
+
+/* end of plugin_gtk_namestore_phone.c */
Added: gnunet-gtk/src/namestore/plugin_gtk_namestore_pkey.c
===================================================================
--- gnunet-gtk/src/namestore/plugin_gtk_namestore_pkey.c
(rev 0)
+++ gnunet-gtk/src/namestore/plugin_gtk_namestore_pkey.c 2013-10-27
16:35:04 UTC (rev 30430)
@@ -0,0 +1,123 @@
+/*
+ * This file is part of GNUnet
+ * (C) 2009-2013 Christian Grothoff (and other contributing authors)
+ *
+ * GNUnet 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 3, or (at your
+ * option) any later version.
+ *
+ * GNUnet 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 GNUnet; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * @file namestore/plugin_gtk_namestore_pkey.c
+ * @brief namestore plugin for editing PKEY records
+ * @author Christian Grothoff
+ */
+#include "gnunet_gtk.h"
+#include "gnunet_gtk_namestore_plugin.h"
+
+
+/**
+ * Function that will be called to initialize the builder's
+ * widgets from the existing record (if there is one).
+ * The `n_value` is the existing value of the record as a string.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param n_value the record as a string
+ * @param builder the edit dialog's builder
+ */
+static void
+pkey_load (void *cls,
+ gchar *n_value,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+}
+
+
+/**
+ * Function that will be called to retrieve the final value of the
+ * record (in string format) once the dialog is being closed.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return record value as a string, as specified in the dialog
+ */
+static gchar *
+pkey_store (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return NULL;
+}
+
+
+/**
+ * Function to call to validate the state of the dialog. Should
+ * return #GNUNET_OK if the information in the dialog is valid, and
+ * #GNUNET_SYSERR if some fields contain invalid values. The
+ * function should highlight fields with invalid inputs for the
+ * user.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return #GNUNET_OK if there is a valid record value in the dialog
+ */
+static int
+pkey_validate (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return GNUNET_OK;
+}
+
+
+/**
+ * Entry point for the plugin.
+ *
+ * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
+ * @return NULL on error, otherwise the plugin context
+ */
+void *
+libgnunet_plugin_gtk_namestore_pkey_init (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
+
+ plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
+ plugin->cls = env;
+ plugin->dialog_glade_filename = "gnunet_namestore_edit_pkey.glade";
+ plugin->dialog_widget_name = "edit_pkey_dialog";
+ plugin->load = &pkey_load;
+ plugin->store = &pkey_store;
+ plugin->validate = &pkey_validate;
+ return plugin;
+}
+
+
+/**
+ * Exit point from the plugin.
+ *
+ * @param cls the plugin context (as returned by "init")
+ * @return always NULL
+ */
+void *
+libgnunet_plugin_gtk_namestore_pkey_done (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
+
+ GNUNET_free (plugin);
+ return NULL;
+}
+
+/* end of plugin_gtk_namestore_pkey.c */
Added: gnunet-gtk/src/namestore/plugin_gtk_namestore_ptr.c
===================================================================
--- gnunet-gtk/src/namestore/plugin_gtk_namestore_ptr.c
(rev 0)
+++ gnunet-gtk/src/namestore/plugin_gtk_namestore_ptr.c 2013-10-27 16:35:04 UTC
(rev 30430)
@@ -0,0 +1,123 @@
+/*
+ * This file is part of GNUnet
+ * (C) 2009-2013 Christian Grothoff (and other contributing authors)
+ *
+ * GNUnet 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 3, or (at your
+ * option) any later version.
+ *
+ * GNUnet 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 GNUnet; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * @file namestore/plugin_gtk_namestore_ptr.c
+ * @brief namestore plugin for editing PTR records
+ * @author Christian Grothoff
+ */
+#include "gnunet_gtk.h"
+#include "gnunet_gtk_namestore_plugin.h"
+
+
+/**
+ * Function that will be called to initialize the builder's
+ * widgets from the existing record (if there is one).
+ * The `n_value` is the existing value of the record as a string.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param n_value the record as a string
+ * @param builder the edit dialog's builder
+ */
+static void
+ptr_load (void *cls,
+ gchar *n_value,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+}
+
+
+/**
+ * Function that will be called to retrieve the final value of the
+ * record (in string format) once the dialog is being closed.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return record value as a string, as specified in the dialog
+ */
+static gchar *
+ptr_store (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return NULL;
+}
+
+
+/**
+ * Function to call to validate the state of the dialog. Should
+ * return #GNUNET_OK if the information in the dialog is valid, and
+ * #GNUNET_SYSERR if some fields contain invalid values. The
+ * function should highlight fields with invalid inputs for the
+ * user.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return #GNUNET_OK if there is a valid record value in the dialog
+ */
+static int
+ptr_validate (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return GNUNET_OK;
+}
+
+
+/**
+ * Entry point for the plugin.
+ *
+ * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
+ * @return NULL on error, otherwise the plugin context
+ */
+void *
+libgnunet_plugin_gtk_namestore_ptr_init (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
+
+ plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
+ plugin->cls = env;
+ plugin->dialog_glade_filename = "gnunet_namestore_edit_ptr.glade";
+ plugin->dialog_widget_name = "edit_ptr_dialog";
+ plugin->load = &ptr_load;
+ plugin->store = &ptr_store;
+ plugin->validate = &ptr_validate;
+ return plugin;
+}
+
+
+/**
+ * Exit point from the plugin.
+ *
+ * @param cls the plugin context (as returned by "init")
+ * @return always NULL
+ */
+void *
+libgnunet_plugin_gtk_namestore_ptr_done (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
+
+ GNUNET_free (plugin);
+ return NULL;
+}
+
+/* end of plugin_gtk_namestore_ptr.c */
Added: gnunet-gtk/src/namestore/plugin_gtk_namestore_soa.c
===================================================================
--- gnunet-gtk/src/namestore/plugin_gtk_namestore_soa.c
(rev 0)
+++ gnunet-gtk/src/namestore/plugin_gtk_namestore_soa.c 2013-10-27 16:35:04 UTC
(rev 30430)
@@ -0,0 +1,123 @@
+/*
+ * This file is part of GNUnet
+ * (C) 2009-2013 Christian Grothoff (and other contributing authors)
+ *
+ * GNUnet 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 3, or (at your
+ * option) any later version.
+ *
+ * GNUnet 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 GNUnet; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * @file namestore/plugin_gtk_namestore_soa.c
+ * @brief namestore plugin for editing SOA records
+ * @author Christian Grothoff
+ */
+#include "gnunet_gtk.h"
+#include "gnunet_gtk_namestore_plugin.h"
+
+
+/**
+ * Function that will be called to initialize the builder's
+ * widgets from the existing record (if there is one).
+ * The `n_value` is the existing value of the record as a string.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param n_value the record as a string
+ * @param builder the edit dialog's builder
+ */
+static void
+soa_load (void *cls,
+ gchar *n_value,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+}
+
+
+/**
+ * Function that will be called to retrieve the final value of the
+ * record (in string format) once the dialog is being closed.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return record value as a string, as specified in the dialog
+ */
+static gchar *
+soa_store (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return NULL;
+}
+
+
+/**
+ * Function to call to validate the state of the dialog. Should
+ * return #GNUNET_OK if the information in the dialog is valid, and
+ * #GNUNET_SYSERR if some fields contain invalid values. The
+ * function should highlight fields with invalid inputs for the
+ * user.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return #GNUNET_OK if there is a valid record value in the dialog
+ */
+static int
+soa_validate (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return GNUNET_OK;
+}
+
+
+/**
+ * Entry point for the plugin.
+ *
+ * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
+ * @return NULL on error, otherwise the plugin context
+ */
+void *
+libgnunet_plugin_gtk_namestore_soa_init (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
+
+ plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
+ plugin->cls = env;
+ plugin->dialog_glade_filename = "gnunet_namestore_edit_soa.glade";
+ plugin->dialog_widget_name = "edit_soa_dialog";
+ plugin->load = &soa_load;
+ plugin->store = &soa_store;
+ plugin->validate = &soa_validate;
+ return plugin;
+}
+
+
+/**
+ * Exit point from the plugin.
+ *
+ * @param cls the plugin context (as returned by "init")
+ * @return always NULL
+ */
+void *
+libgnunet_plugin_gtk_namestore_soa_done (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
+
+ GNUNET_free (plugin);
+ return NULL;
+}
+
+/* end of plugin_gtk_namestore_soa.c */
Added: gnunet-gtk/src/namestore/plugin_gtk_namestore_srv.c
===================================================================
--- gnunet-gtk/src/namestore/plugin_gtk_namestore_srv.c
(rev 0)
+++ gnunet-gtk/src/namestore/plugin_gtk_namestore_srv.c 2013-10-27 16:35:04 UTC
(rev 30430)
@@ -0,0 +1,123 @@
+/*
+ * This file is part of GNUnet
+ * (C) 2009-2013 Christian Grothoff (and other contributing authors)
+ *
+ * GNUnet 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 3, or (at your
+ * option) any later version.
+ *
+ * GNUnet 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 GNUnet; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * @file namestore/plugin_gtk_namestore_srv.c
+ * @brief namestore plugin for editing SRV records
+ * @author Christian Grothoff
+ */
+#include "gnunet_gtk.h"
+#include "gnunet_gtk_namestore_plugin.h"
+
+
+/**
+ * Function that will be called to initialize the builder's
+ * widgets from the existing record (if there is one).
+ * The `n_value` is the existing value of the record as a string.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param n_value the record as a string
+ * @param builder the edit dialog's builder
+ */
+static void
+srv_load (void *cls,
+ gchar *n_value,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+}
+
+
+/**
+ * Function that will be called to retrieve the final value of the
+ * record (in string format) once the dialog is being closed.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return record value as a string, as specified in the dialog
+ */
+static gchar *
+srv_store (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return NULL;
+}
+
+
+/**
+ * Function to call to validate the state of the dialog. Should
+ * return #GNUNET_OK if the information in the dialog is valid, and
+ * #GNUNET_SYSERR if some fields contain invalid values. The
+ * function should highlight fields with invalid inputs for the
+ * user.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return #GNUNET_OK if there is a valid record value in the dialog
+ */
+static int
+srv_validate (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return GNUNET_OK;
+}
+
+
+/**
+ * Entry point for the plugin.
+ *
+ * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
+ * @return NULL on error, otherwise the plugin context
+ */
+void *
+libgnunet_plugin_gtk_namestore_srv_init (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
+
+ plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
+ plugin->cls = env;
+ plugin->dialog_glade_filename = "gnunet_namestore_edit_srv.glade";
+ plugin->dialog_widget_name = "edit_a_dialog";
+ plugin->load = &srv_load;
+ plugin->store = &srv_store;
+ plugin->validate = &srv_validate;
+ return plugin;
+}
+
+
+/**
+ * Exit point from the plugin.
+ *
+ * @param cls the plugin context (as returned by "init")
+ * @return always NULL
+ */
+void *
+libgnunet_plugin_gtk_namestore_srv_done (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
+
+ GNUNET_free (plugin);
+ return NULL;
+}
+
+/* end of plugin_gtk_namestore_srv.c */
Modified: gnunet-gtk/src/namestore/plugin_gtk_namestore_template.c
===================================================================
--- gnunet-gtk/src/namestore/plugin_gtk_namestore_template.c 2013-10-27
16:09:40 UTC (rev 30429)
+++ gnunet-gtk/src/namestore/plugin_gtk_namestore_template.c 2013-10-27
16:35:04 UTC (rev 30430)
@@ -112,7 +112,7 @@
* @return always NULL
*/
void *
-libgnunet_plugin_namecache_sqlite_done (void *cls)
+libgnunet_plugin_gtk_namestore_aaaa_done (void *cls)
{
struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
Added: gnunet-gtk/src/namestore/plugin_gtk_namestore_txt.c
===================================================================
--- gnunet-gtk/src/namestore/plugin_gtk_namestore_txt.c
(rev 0)
+++ gnunet-gtk/src/namestore/plugin_gtk_namestore_txt.c 2013-10-27 16:35:04 UTC
(rev 30430)
@@ -0,0 +1,123 @@
+/*
+ * This file is part of GNUnet
+ * (C) 2009-2013 Christian Grothoff (and other contributing authors)
+ *
+ * GNUnet 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 3, or (at your
+ * option) any later version.
+ *
+ * GNUnet 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 GNUnet; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * @file namestore/plugin_gtk_namestore_txt.c
+ * @brief namestore plugin for editing TXT records
+ * @author Christian Grothoff
+ */
+#include "gnunet_gtk.h"
+#include "gnunet_gtk_namestore_plugin.h"
+
+
+/**
+ * Function that will be called to initialize the builder's
+ * widgets from the existing record (if there is one).
+ * The `n_value` is the existing value of the record as a string.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param n_value the record as a string
+ * @param builder the edit dialog's builder
+ */
+static void
+txt_load (void *cls,
+ gchar *n_value,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+}
+
+
+/**
+ * Function that will be called to retrieve the final value of the
+ * record (in string format) once the dialog is being closed.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return record value as a string, as specified in the dialog
+ */
+static gchar *
+txt_store (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return NULL;
+}
+
+
+/**
+ * Function to call to validate the state of the dialog. Should
+ * return #GNUNET_OK if the information in the dialog is valid, and
+ * #GNUNET_SYSERR if some fields contain invalid values. The
+ * function should highlight fields with invalid inputs for the
+ * user.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return #GNUNET_OK if there is a valid record value in the dialog
+ */
+static int
+txt_validate (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return GNUNET_OK;
+}
+
+
+/**
+ * Entry point for the plugin.
+ *
+ * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
+ * @return NULL on error, otherwise the plugin context
+ */
+void *
+libgnunet_plugin_gtk_namestore_txt_init (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
+
+ plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
+ plugin->cls = env;
+ plugin->dialog_glade_filename = "gnunet_namestore_edit_txt.glade";
+ plugin->dialog_widget_name = "edit_txt_dialog";
+ plugin->load = &txt_load;
+ plugin->store = &txt_store;
+ plugin->validate = &txt_validate;
+ return plugin;
+}
+
+
+/**
+ * Exit point from the plugin.
+ *
+ * @param cls the plugin context (as returned by "init")
+ * @return always NULL
+ */
+void *
+libgnunet_plugin_gtk_namestore_txt_done (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
+
+ GNUNET_free (plugin);
+ return NULL;
+}
+
+/* end of plugin_gtk_namestore_txt.c */
Added: gnunet-gtk/src/namestore/plugin_gtk_namestore_vpn.c
===================================================================
--- gnunet-gtk/src/namestore/plugin_gtk_namestore_vpn.c
(rev 0)
+++ gnunet-gtk/src/namestore/plugin_gtk_namestore_vpn.c 2013-10-27 16:35:04 UTC
(rev 30430)
@@ -0,0 +1,123 @@
+/*
+ * This file is part of GNUnet
+ * (C) 2009-2013 Christian Grothoff (and other contributing authors)
+ *
+ * GNUnet 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 3, or (at your
+ * option) any later version.
+ *
+ * GNUnet 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 GNUnet; see the file COPYING. If not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * @file namestore/plugin_gtk_namestore_vpn.c
+ * @brief namestore plugin for editing VPN records
+ * @author Christian Grothoff
+ */
+#include "gnunet_gtk.h"
+#include "gnunet_gtk_namestore_plugin.h"
+
+
+/**
+ * Function that will be called to initialize the builder's
+ * widgets from the existing record (if there is one).
+ * The `n_value` is the existing value of the record as a string.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param n_value the record as a string
+ * @param builder the edit dialog's builder
+ */
+static void
+vpn_load (void *cls,
+ gchar *n_value,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+}
+
+
+/**
+ * Function that will be called to retrieve the final value of the
+ * record (in string format) once the dialog is being closed.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return record value as a string, as specified in the dialog
+ */
+static gchar *
+vpn_store (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return NULL;
+}
+
+
+/**
+ * Function to call to validate the state of the dialog. Should
+ * return #GNUNET_OK if the information in the dialog is valid, and
+ * #GNUNET_SYSERR if some fields contain invalid values. The
+ * function should highlight fields with invalid inputs for the
+ * user.
+ *
+ * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
+ * @param builder the edit dialog's builder
+ * @return #GNUNET_OK if there is a valid record value in the dialog
+ */
+static int
+vpn_validate (void *cls,
+ GtkBuilder *builder)
+{
+ GNUNET_break (0);
+ return GNUNET_OK;
+}
+
+
+/**
+ * Entry point for the plugin.
+ *
+ * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
+ * @return NULL on error, otherwise the plugin context
+ */
+void *
+libgnunet_plugin_gtk_namestore_vpn_init (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
+
+ plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
+ plugin->cls = env;
+ plugin->dialog_glade_filename = "gnunet_namestore_edit_vpn.glade";
+ plugin->dialog_widget_name = "edit_vpn_dialog";
+ plugin->load = &vpn_load;
+ plugin->store = &vpn_store;
+ plugin->validate = &vpn_validate;
+ return plugin;
+}
+
+
+/**
+ * Exit point from the plugin.
+ *
+ * @param cls the plugin context (as returned by "init")
+ * @return always NULL
+ */
+void *
+libgnunet_plugin_gtk_namestore_vpn_done (void *cls)
+{
+ struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
+
+ GNUNET_free (plugin);
+ return NULL;
+}
+
+/* end of plugin_gtk_namestore_vpn.c */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r30430 - gnunet-gtk/src/namestore,
gnunet <=