aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/namestore/Makefile.am148
-rw-r--r--src/namestore/plugin_gtk_namestore_a.c2
-rw-r--r--src/namestore/plugin_gtk_namestore_aaaa.c123
-rw-r--r--src/namestore/plugin_gtk_namestore_cname.c123
-rw-r--r--src/namestore/plugin_gtk_namestore_gns2dns.c123
-rw-r--r--src/namestore/plugin_gtk_namestore_leho.c123
-rw-r--r--src/namestore/plugin_gtk_namestore_mx.c123
-rw-r--r--src/namestore/plugin_gtk_namestore_phone.c123
-rw-r--r--src/namestore/plugin_gtk_namestore_pkey.c123
-rw-r--r--src/namestore/plugin_gtk_namestore_ptr.c123
-rw-r--r--src/namestore/plugin_gtk_namestore_soa.c123
-rw-r--r--src/namestore/plugin_gtk_namestore_srv.c123
-rw-r--r--src/namestore/plugin_gtk_namestore_template.c2
-rw-r--r--src/namestore/plugin_gtk_namestore_txt.c123
-rw-r--r--src/namestore/plugin_gtk_namestore_vpn.c123
15 files changed, 1624 insertions, 4 deletions
diff --git a/src/namestore/Makefile.am b/src/namestore/Makefile.am
index 6f1fc1b1..6098b311 100644
--- a/src/namestore/Makefile.am
+++ b/src/namestore/Makefile.am
@@ -29,9 +29,21 @@ gnunet_namestore_gtk_LDFLAGS = \
29 -export-dynamic 29 -export-dynamic
30 30
31 31
32
33plugin_LTLIBRARIES = \ 32plugin_LTLIBRARIES = \
34 libgnunet_plugin_gtk_namestore_a.la 33 libgnunet_plugin_gtk_namestore_a.la \
34 libgnunet_plugin_gtk_namestore_aaaa.la \
35 libgnunet_plugin_gtk_namestore_cname.la \
36 libgnunet_plugin_gtk_namestore_gns2dns.la \
37 libgnunet_plugin_gtk_namestore_leho.la \
38 libgnunet_plugin_gtk_namestore_mx.la \
39 libgnunet_plugin_gtk_namestore_phone.la \
40 libgnunet_plugin_gtk_namestore_pkey.la \
41 libgnunet_plugin_gtk_namestore_ptr.la \
42 libgnunet_plugin_gtk_namestore_soa.la \
43 libgnunet_plugin_gtk_namestore_srv.la \
44 libgnunet_plugin_gtk_namestore_txt.la \
45 libgnunet_plugin_gtk_namestore_vpn.la
46
35 47
36libgnunet_plugin_gtk_namestore_a_la_SOURCES = \ 48libgnunet_plugin_gtk_namestore_a_la_SOURCES = \
37 plugin_gtk_namestore_a.c 49 plugin_gtk_namestore_a.c
@@ -43,3 +55,135 @@ libgnunet_plugin_gtk_namestore_a_la_LIBADD = \
43 -lgnunetutil 55 -lgnunetutil
44libgnunet_plugin_gtk_namestore_a_la_LDFLAGS = \ 56libgnunet_plugin_gtk_namestore_a_la_LDFLAGS = \
45 $(GN_PLUGIN_LDFLAGS) 57 $(GN_PLUGIN_LDFLAGS)
58
59libgnunet_plugin_gtk_namestore_aaaa_la_SOURCES = \
60 plugin_gtk_namestore_aaaa.c
61libgnunet_plugin_gtk_namestore_aaaa_la_CFLAGS = \
62 @GTK_CFLAGS@ \
63 @GNUNET_CFLAGS@ \
64 @GLADE_CFLAGS@
65libgnunet_plugin_gtk_namestore_aaaa_la_LIBADD = \
66 -lgnunetutil
67libgnunet_plugin_gtk_namestore_aaaa_la_LDFLAGS = \
68 $(GN_PLUGIN_LDFLAGS)
69
70libgnunet_plugin_gtk_namestore_cname_la_SOURCES = \
71 plugin_gtk_namestore_cname.c
72libgnunet_plugin_gtk_namestore_cname_la_CFLAGS = \
73 @GTK_CFLAGS@ \
74 @GNUNET_CFLAGS@ \
75 @GLADE_CFLAGS@
76libgnunet_plugin_gtk_namestore_cname_la_LIBADD = \
77 -lgnunetutil
78libgnunet_plugin_gtk_namestore_cname_la_LDFLAGS = \
79 $(GN_PLUGIN_LDFLAGS)
80
81libgnunet_plugin_gtk_namestore_gns2dns_la_SOURCES = \
82 plugin_gtk_namestore_gns2dns.c
83libgnunet_plugin_gtk_namestore_gns2dns_la_CFLAGS = \
84 @GTK_CFLAGS@ \
85 @GNUNET_CFLAGS@ \
86 @GLADE_CFLAGS@
87libgnunet_plugin_gtk_namestore_gns2dns_la_LIBADD = \
88 -lgnunetutil
89libgnunet_plugin_gtk_namestore_gns2dns_la_LDFLAGS = \
90 $(GN_PLUGIN_LDFLAGS)
91
92libgnunet_plugin_gtk_namestore_leho_la_SOURCES = \
93 plugin_gtk_namestore_leho.c
94libgnunet_plugin_gtk_namestore_leho_la_CFLAGS = \
95 @GTK_CFLAGS@ \
96 @GNUNET_CFLAGS@ \
97 @GLADE_CFLAGS@
98libgnunet_plugin_gtk_namestore_leho_la_LIBADD = \
99 -lgnunetutil
100libgnunet_plugin_gtk_namestore_leho_la_LDFLAGS = \
101 $(GN_PLUGIN_LDFLAGS)
102
103libgnunet_plugin_gtk_namestore_mx_la_SOURCES = \
104 plugin_gtk_namestore_mx.c
105libgnunet_plugin_gtk_namestore_mx_la_CFLAGS = \
106 @GTK_CFLAGS@ \
107 @GNUNET_CFLAGS@ \
108 @GLADE_CFLAGS@
109libgnunet_plugin_gtk_namestore_mx_la_LIBADD = \
110 -lgnunetutil
111libgnunet_plugin_gtk_namestore_mx_la_LDFLAGS = \
112 $(GN_PLUGIN_LDFLAGS)
113
114libgnunet_plugin_gtk_namestore_phone_la_SOURCES = \
115 plugin_gtk_namestore_phone.c
116libgnunet_plugin_gtk_namestore_phone_la_CFLAGS = \
117 @GTK_CFLAGS@ \
118 @GNUNET_CFLAGS@ \
119 @GLADE_CFLAGS@
120libgnunet_plugin_gtk_namestore_phone_la_LIBADD = \
121 -lgnunetutil
122libgnunet_plugin_gtk_namestore_phone_la_LDFLAGS = \
123 $(GN_PLUGIN_LDFLAGS)
124
125libgnunet_plugin_gtk_namestore_pkey_la_SOURCES = \
126 plugin_gtk_namestore_pkey.c
127libgnunet_plugin_gtk_namestore_pkey_la_CFLAGS = \
128 @GTK_CFLAGS@ \
129 @GNUNET_CFLAGS@ \
130 @GLADE_CFLAGS@
131libgnunet_plugin_gtk_namestore_pkey_la_LIBADD = \
132 -lgnunetutil
133libgnunet_plugin_gtk_namestore_pkey_la_LDFLAGS = \
134 $(GN_PLUGIN_LDFLAGS)
135
136libgnunet_plugin_gtk_namestore_ptr_la_SOURCES = \
137 plugin_gtk_namestore_ptr.c
138libgnunet_plugin_gtk_namestore_ptr_la_CFLAGS = \
139 @GTK_CFLAGS@ \
140 @GNUNET_CFLAGS@ \
141 @GLADE_CFLAGS@
142libgnunet_plugin_gtk_namestore_ptr_la_LIBADD = \
143 -lgnunetutil
144libgnunet_plugin_gtk_namestore_ptr_la_LDFLAGS = \
145 $(GN_PLUGIN_LDFLAGS)
146
147libgnunet_plugin_gtk_namestore_soa_la_SOURCES = \
148 plugin_gtk_namestore_soa.c
149libgnunet_plugin_gtk_namestore_soa_la_CFLAGS = \
150 @GTK_CFLAGS@ \
151 @GNUNET_CFLAGS@ \
152 @GLADE_CFLAGS@
153libgnunet_plugin_gtk_namestore_soa_la_LIBADD = \
154 -lgnunetutil
155libgnunet_plugin_gtk_namestore_soa_la_LDFLAGS = \
156 $(GN_PLUGIN_LDFLAGS)
157
158libgnunet_plugin_gtk_namestore_srv_la_SOURCES = \
159 plugin_gtk_namestore_srv.c
160libgnunet_plugin_gtk_namestore_srv_la_CFLAGS = \
161 @GTK_CFLAGS@ \
162 @GNUNET_CFLAGS@ \
163 @GLADE_CFLAGS@
164libgnunet_plugin_gtk_namestore_srv_la_LIBADD = \
165 -lgnunetutil
166libgnunet_plugin_gtk_namestore_srv_la_LDFLAGS = \
167 $(GN_PLUGIN_LDFLAGS)
168
169libgnunet_plugin_gtk_namestore_txt_la_SOURCES = \
170 plugin_gtk_namestore_txt.c
171libgnunet_plugin_gtk_namestore_txt_la_CFLAGS = \
172 @GTK_CFLAGS@ \
173 @GNUNET_CFLAGS@ \
174 @GLADE_CFLAGS@
175libgnunet_plugin_gtk_namestore_txt_la_LIBADD = \
176 -lgnunetutil
177libgnunet_plugin_gtk_namestore_txt_la_LDFLAGS = \
178 $(GN_PLUGIN_LDFLAGS)
179
180libgnunet_plugin_gtk_namestore_vpn_la_SOURCES = \
181 plugin_gtk_namestore_vpn.c
182libgnunet_plugin_gtk_namestore_vpn_la_CFLAGS = \
183 @GTK_CFLAGS@ \
184 @GNUNET_CFLAGS@ \
185 @GLADE_CFLAGS@
186libgnunet_plugin_gtk_namestore_vpn_la_LIBADD = \
187 -lgnunetutil
188libgnunet_plugin_gtk_namestore_vpn_la_LDFLAGS = \
189 $(GN_PLUGIN_LDFLAGS)
diff --git a/src/namestore/plugin_gtk_namestore_a.c b/src/namestore/plugin_gtk_namestore_a.c
index 237a34c1..319e7b0b 100644
--- a/src/namestore/plugin_gtk_namestore_a.c
+++ b/src/namestore/plugin_gtk_namestore_a.c
@@ -131,7 +131,7 @@ libgnunet_plugin_gtk_namestore_a_init (void *cls)
131 * @return always NULL 131 * @return always NULL
132 */ 132 */
133void * 133void *
134libgnunet_plugin_namecache_sqlite_done (void *cls) 134libgnunet_plugin_gtk_namestore_aaaa_done (void *cls)
135{ 135{
136 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls; 136 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
137 137
diff --git a/src/namestore/plugin_gtk_namestore_aaaa.c b/src/namestore/plugin_gtk_namestore_aaaa.c
new file mode 100644
index 00000000..d32fcc6b
--- /dev/null
+++ b/src/namestore/plugin_gtk_namestore_aaaa.c
@@ -0,0 +1,123 @@
1/*
2 * This file is part of GNUnet
3 * (C) 2009-2013 Christian Grothoff (and other contributing authors)
4 *
5 * GNUnet is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; either version 3, or (at your
8 * option) any later version.
9 *
10 * GNUnet is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with GNUnet; see the file COPYING. If not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21/**
22 * @file namestore/plugin_gtk_namestore_aaaa.c
23 * @brief namestore plugin for editing A records
24 * @author Christian Grothoff
25 */
26#include "gnunet_gtk.h"
27#include "gnunet_gtk_namestore_plugin.h"
28
29
30/**
31 * Function that will be called to initialize the builder's
32 * widgets from the existing record (if there is one).
33 * The `n_value` is the existing value of the record as a string.
34 *
35 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
36 * @param n_value the record as a string
37 * @param builder the edit dialog's builder
38 */
39static void
40aaaa_load (void *cls,
41 gchar *n_value,
42 GtkBuilder *builder)
43{
44 GNUNET_break (0);
45}
46
47
48/**
49 * Function that will be called to retrieve the final value of the
50 * record (in string format) once the dialog is being closed.
51 *
52 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
53 * @param builder the edit dialog's builder
54 * @return record value as a string, as specified in the dialog
55 */
56static gchar *
57aaaa_store (void *cls,
58 GtkBuilder *builder)
59{
60 GNUNET_break (0);
61 return NULL;
62}
63
64
65/**
66 * Function to call to validate the state of the dialog. Should
67 * return #GNUNET_OK if the information in the dialog is valid, and
68 * #GNUNET_SYSERR if some fields contain invalid values. The
69 * function should highlight fields with invalid inputs for the
70 * user.
71 *
72 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
73 * @param builder the edit dialog's builder
74 * @return #GNUNET_OK if there is a valid record value in the dialog
75 */
76static int
77aaaa_validate (void *cls,
78 GtkBuilder *builder)
79{
80 GNUNET_break (0);
81 return GNUNET_OK;
82}
83
84
85/**
86 * Entry point for the plugin.
87 *
88 * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
89 * @return NULL on error, otherwise the plugin context
90 */
91void *
92libgnunet_plugin_gtk_namestore_aaaa_init (void *cls)
93{
94 struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
95 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
96
97 plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
98 plugin->cls = env;
99 plugin->dialog_glade_filename = "gnunet_namestore_edit_aaaa.glade";
100 plugin->dialog_widget_name = "edit_aaaa_dialog";
101 plugin->load = &aaaa_load;
102 plugin->store = &aaaa_store;
103 plugin->validate = &aaaa_validate;
104 return plugin;
105}
106
107
108/**
109 * Exit point from the plugin.
110 *
111 * @param cls the plugin context (as returned by "init")
112 * @return always NULL
113 */
114void *
115libgnunet_plugin_gtk_namestore_aaaa_done (void *cls)
116{
117 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
118
119 GNUNET_free (plugin);
120 return NULL;
121}
122
123/* end of plugin_gtk_namestore_aaaa.c */
diff --git a/src/namestore/plugin_gtk_namestore_cname.c b/src/namestore/plugin_gtk_namestore_cname.c
new file mode 100644
index 00000000..581c740c
--- /dev/null
+++ b/src/namestore/plugin_gtk_namestore_cname.c
@@ -0,0 +1,123 @@
1/*
2 * This file is part of GNUnet
3 * (C) 2009-2013 Christian Grothoff (and other contributing authors)
4 *
5 * GNUnet is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; either version 3, or (at your
8 * option) any later version.
9 *
10 * GNUnet is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with GNUnet; see the file COPYING. If not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21/**
22 * @file namestore/plugin_gtk_namestore_cname.c
23 * @brief namestore plugin for editing CNAME records
24 * @author Christian Grothoff
25 */
26#include "gnunet_gtk.h"
27#include "gnunet_gtk_namestore_plugin.h"
28
29
30/**
31 * Function that will be called to initialize the builder's
32 * widgets from the existing record (if there is one).
33 * The `n_value` is the existing value of the record as a string.
34 *
35 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
36 * @param n_value the record as a string
37 * @param builder the edit dialog's builder
38 */
39static void
40cname_load (void *cls,
41 gchar *n_value,
42 GtkBuilder *builder)
43{
44 GNUNET_break (0);
45}
46
47
48/**
49 * Function that will be called to retrieve the final value of the
50 * record (in string format) once the dialog is being closed.
51 *
52 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
53 * @param builder the edit dialog's builder
54 * @return record value as a string, as specified in the dialog
55 */
56static gchar *
57cname_store (void *cls,
58 GtkBuilder *builder)
59{
60 GNUNET_break (0);
61 return NULL;
62}
63
64
65/**
66 * Function to call to validate the state of the dialog. Should
67 * return #GNUNET_OK if the information in the dialog is valid, and
68 * #GNUNET_SYSERR if some fields contain invalid values. The
69 * function should highlight fields with invalid inputs for the
70 * user.
71 *
72 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
73 * @param builder the edit dialog's builder
74 * @return #GNUNET_OK if there is a valid record value in the dialog
75 */
76static int
77cname_validate (void *cls,
78 GtkBuilder *builder)
79{
80 GNUNET_break (0);
81 return GNUNET_OK;
82}
83
84
85/**
86 * Entry point for the plugin.
87 *
88 * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
89 * @return NULL on error, otherwise the plugin context
90 */
91void *
92libgnunet_plugin_gtk_namestore_cname_init (void *cls)
93{
94 struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
95 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
96
97 plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
98 plugin->cls = env;
99 plugin->dialog_glade_filename = "gnunet_namestore_edit_cname.glade";
100 plugin->dialog_widget_name = "edit_cname_dialog";
101 plugin->load = &cname_load;
102 plugin->store = &cname_store;
103 plugin->validate = &cname_validate;
104 return plugin;
105}
106
107
108/**
109 * Exit point from the plugin.
110 *
111 * @param cls the plugin context (as returned by "init")
112 * @return always NULL
113 */
114void *
115libgnunet_plugin_gtk_namestore_cname_done (void *cls)
116{
117 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
118
119 GNUNET_free (plugin);
120 return NULL;
121}
122
123/* end of plugin_gtk_namestore_cname.c */
diff --git a/src/namestore/plugin_gtk_namestore_gns2dns.c b/src/namestore/plugin_gtk_namestore_gns2dns.c
new file mode 100644
index 00000000..76879194
--- /dev/null
+++ b/src/namestore/plugin_gtk_namestore_gns2dns.c
@@ -0,0 +1,123 @@
1/*
2 * This file is part of GNUnet
3 * (C) 2009-2013 Christian Grothoff (and other contributing authors)
4 *
5 * GNUnet is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; either version 3, or (at your
8 * option) any later version.
9 *
10 * GNUnet is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with GNUnet; see the file COPYING. If not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21/**
22 * @file namestore/plugin_gtk_namestore_gns2dns.c
23 * @brief namestore plugin for editing A records
24 * @author Christian Grothoff
25 */
26#include "gnunet_gtk.h"
27#include "gnunet_gtk_namestore_plugin.h"
28
29
30/**
31 * Function that will be called to initialize the builder's
32 * widgets from the existing record (if there is one).
33 * The `n_value` is the existing value of the record as a string.
34 *
35 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
36 * @param n_value the record as a string
37 * @param builder the edit dialog's builder
38 */
39static void
40gns2dns_load (void *cls,
41 gchar *n_value,
42 GtkBuilder *builder)
43{
44 GNUNET_break (0);
45}
46
47
48/**
49 * Function that will be called to retrieve the final value of the
50 * record (in string format) once the dialog is being closed.
51 *
52 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
53 * @param builder the edit dialog's builder
54 * @return record value as a string, as specified in the dialog
55 */
56static gchar *
57gns2dns_store (void *cls,
58 GtkBuilder *builder)
59{
60 GNUNET_break (0);
61 return NULL;
62}
63
64
65/**
66 * Function to call to validate the state of the dialog. Should
67 * return #GNUNET_OK if the information in the dialog is valid, and
68 * #GNUNET_SYSERR if some fields contain invalid values. The
69 * function should highlight fields with invalid inputs for the
70 * user.
71 *
72 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
73 * @param builder the edit dialog's builder
74 * @return #GNUNET_OK if there is a valid record value in the dialog
75 */
76static int
77gns2dns_validate (void *cls,
78 GtkBuilder *builder)
79{
80 GNUNET_break (0);
81 return GNUNET_OK;
82}
83
84
85/**
86 * Entry point for the plugin.
87 *
88 * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
89 * @return NULL on error, otherwise the plugin context
90 */
91void *
92libgnunet_plugin_gtk_namestore_gns2dns_init (void *cls)
93{
94 struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
95 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
96
97 plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
98 plugin->cls = env;
99 plugin->dialog_glade_filename = "gnunet_namestore_edit_gns2dns.glade";
100 plugin->dialog_widget_name = "edit_gns2dns_dialog";
101 plugin->load = &gns2dns_load;
102 plugin->store = &gns2dns_store;
103 plugin->validate = &gns2dns_validate;
104 return plugin;
105}
106
107
108/**
109 * Exit point from the plugin.
110 *
111 * @param cls the plugin context (as returned by "init")
112 * @return always NULL
113 */
114void *
115libgnunet_plugin_gtk_namestore_gns2dns_done (void *cls)
116{
117 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
118
119 GNUNET_free (plugin);
120 return NULL;
121}
122
123/* end of plugin_gtk_namestore_gns2dns.c */
diff --git a/src/namestore/plugin_gtk_namestore_leho.c b/src/namestore/plugin_gtk_namestore_leho.c
new file mode 100644
index 00000000..abf33f6d
--- /dev/null
+++ b/src/namestore/plugin_gtk_namestore_leho.c
@@ -0,0 +1,123 @@
1/*
2 * This file is part of GNUnet
3 * (C) 2009-2013 Christian Grothoff (and other contributing authors)
4 *
5 * GNUnet is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; either version 3, or (at your
8 * option) any later version.
9 *
10 * GNUnet is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with GNUnet; see the file COPYING. If not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21/**
22 * @file namestore/plugin_gtk_namestore_leho.c
23 * @brief namestore plugin for editing A records
24 * @author Christian Grothoff
25 */
26#include "gnunet_gtk.h"
27#include "gnunet_gtk_namestore_plugin.h"
28
29
30/**
31 * Function that will be called to initialize the builder's
32 * widgets from the existing record (if there is one).
33 * The `n_value` is the existing value of the record as a string.
34 *
35 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
36 * @param n_value the record as a string
37 * @param builder the edit dialog's builder
38 */
39static void
40leho_load (void *cls,
41 gchar *n_value,
42 GtkBuilder *builder)
43{
44 GNUNET_break (0);
45}
46
47
48/**
49 * Function that will be called to retrieve the final value of the
50 * record (in string format) once the dialog is being closed.
51 *
52 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
53 * @param builder the edit dialog's builder
54 * @return record value as a string, as specified in the dialog
55 */
56static gchar *
57leho_store (void *cls,
58 GtkBuilder *builder)
59{
60 GNUNET_break (0);
61 return NULL;
62}
63
64
65/**
66 * Function to call to validate the state of the dialog. Should
67 * return #GNUNET_OK if the information in the dialog is valid, and
68 * #GNUNET_SYSERR if some fields contain invalid values. The
69 * function should highlight fields with invalid inputs for the
70 * user.
71 *
72 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
73 * @param builder the edit dialog's builder
74 * @return #GNUNET_OK if there is a valid record value in the dialog
75 */
76static int
77leho_validate (void *cls,
78 GtkBuilder *builder)
79{
80 GNUNET_break (0);
81 return GNUNET_OK;
82}
83
84
85/**
86 * Entry point for the plugin.
87 *
88 * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
89 * @return NULL on error, otherwise the plugin context
90 */
91void *
92libgnunet_plugin_gtk_namestore_leho_init (void *cls)
93{
94 struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
95 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
96
97 plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
98 plugin->cls = env;
99 plugin->dialog_glade_filename = "gnunet_namestore_edit_leho.glade";
100 plugin->dialog_widget_name = "edit_leho_dialog";
101 plugin->load = &leho_load;
102 plugin->store = &leho_store;
103 plugin->validate = &leho_validate;
104 return plugin;
105}
106
107
108/**
109 * Exit point from the plugin.
110 *
111 * @param cls the plugin context (as returned by "init")
112 * @return always NULL
113 */
114void *
115libgnunet_plugin_gtk_namestore_leho_done (void *cls)
116{
117 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
118
119 GNUNET_free (plugin);
120 return NULL;
121}
122
123/* end of plugin_gtk_namestore_leho.c */
diff --git a/src/namestore/plugin_gtk_namestore_mx.c b/src/namestore/plugin_gtk_namestore_mx.c
new file mode 100644
index 00000000..6a61a095
--- /dev/null
+++ b/src/namestore/plugin_gtk_namestore_mx.c
@@ -0,0 +1,123 @@
1/*
2 * This file is part of GNUnet
3 * (C) 2009-2013 Christian Grothoff (and other contributing authors)
4 *
5 * GNUnet is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; either version 3, or (at your
8 * option) any later version.
9 *
10 * GNUnet is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with GNUnet; see the file COPYING. If not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21/**
22 * @file namestore/plugin_gtk_namestore_mx.c
23 * @brief namestore plugin for editing A records
24 * @author Christian Grothoff
25 */
26#include "gnunet_gtk.h"
27#include "gnunet_gtk_namestore_plugin.h"
28
29
30/**
31 * Function that will be called to initialize the builder's
32 * widgets from the existing record (if there is one).
33 * The `n_value` is the existing value of the record as a string.
34 *
35 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
36 * @param n_value the record as a string
37 * @param builder the edit dialog's builder
38 */
39static void
40mx_load (void *cls,
41 gchar *n_value,
42 GtkBuilder *builder)
43{
44 GNUNET_break (0);
45}
46
47
48/**
49 * Function that will be called to retrieve the final value of the
50 * record (in string format) once the dialog is being closed.
51 *
52 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
53 * @param builder the edit dialog's builder
54 * @return record value as a string, as specified in the dialog
55 */
56static gchar *
57mx_store (void *cls,
58 GtkBuilder *builder)
59{
60 GNUNET_break (0);
61 return NULL;
62}
63
64
65/**
66 * Function to call to validate the state of the dialog. Should
67 * return #GNUNET_OK if the information in the dialog is valid, and
68 * #GNUNET_SYSERR if some fields contain invalid values. The
69 * function should highlight fields with invalid inputs for the
70 * user.
71 *
72 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
73 * @param builder the edit dialog's builder
74 * @return #GNUNET_OK if there is a valid record value in the dialog
75 */
76static int
77mx_validate (void *cls,
78 GtkBuilder *builder)
79{
80 GNUNET_break (0);
81 return GNUNET_OK;
82}
83
84
85/**
86 * Entry point for the plugin.
87 *
88 * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
89 * @return NULL on error, otherwise the plugin context
90 */
91void *
92libgnunet_plugin_gtk_namestore_mx_init (void *cls)
93{
94 struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
95 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
96
97 plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
98 plugin->cls = env;
99 plugin->dialog_glade_filename = "gnunet_namestore_edit_mx.glade";
100 plugin->dialog_widget_name = "edit_mx_dialog";
101 plugin->load = &mx_load;
102 plugin->store = &mx_store;
103 plugin->validate = &mx_validate;
104 return plugin;
105}
106
107
108/**
109 * Exit point from the plugin.
110 *
111 * @param cls the plugin context (as returned by "init")
112 * @return always NULL
113 */
114void *
115libgnunet_plugin_gtk_namestore_aaaa_done (void *cls)
116{
117 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
118
119 GNUNET_free (plugin);
120 return NULL;
121}
122
123/* end of plugin_gtk_namestore_mx.c */
diff --git a/src/namestore/plugin_gtk_namestore_phone.c b/src/namestore/plugin_gtk_namestore_phone.c
new file mode 100644
index 00000000..29815538
--- /dev/null
+++ b/src/namestore/plugin_gtk_namestore_phone.c
@@ -0,0 +1,123 @@
1/*
2 * This file is part of GNUnet
3 * (C) 2009-2013 Christian Grothoff (and other contributing authors)
4 *
5 * GNUnet is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; either version 3, or (at your
8 * option) any later version.
9 *
10 * GNUnet is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with GNUnet; see the file COPYING. If not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21/**
22 * @file namestore/plugin_gtk_namestore_phone.c
23 * @brief namestore plugin for editing PHONE records
24 * @author Christian Grothoff
25 */
26#include "gnunet_gtk.h"
27#include "gnunet_gtk_namestore_plugin.h"
28
29
30/**
31 * Function that will be called to initialize the builder's
32 * widgets from the existing record (if there is one).
33 * The `n_value` is the existing value of the record as a string.
34 *
35 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
36 * @param n_value the record as a string
37 * @param builder the edit dialog's builder
38 */
39static void
40phone_load (void *cls,
41 gchar *n_value,
42 GtkBuilder *builder)
43{
44 GNUNET_break (0);
45}
46
47
48/**
49 * Function that will be called to retrieve the final value of the
50 * record (in string format) once the dialog is being closed.
51 *
52 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
53 * @param builder the edit dialog's builder
54 * @return record value as a string, as specified in the dialog
55 */
56static gchar *
57phone_store (void *cls,
58 GtkBuilder *builder)
59{
60 GNUNET_break (0);
61 return NULL;
62}
63
64
65/**
66 * Function to call to validate the state of the dialog. Should
67 * return #GNUNET_OK if the information in the dialog is valid, and
68 * #GNUNET_SYSERR if some fields contain invalid values. The
69 * function should highlight fields with invalid inputs for the
70 * user.
71 *
72 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
73 * @param builder the edit dialog's builder
74 * @return #GNUNET_OK if there is a valid record value in the dialog
75 */
76static int
77phone_validate (void *cls,
78 GtkBuilder *builder)
79{
80 GNUNET_break (0);
81 return GNUNET_OK;
82}
83
84
85/**
86 * Entry point for the plugin.
87 *
88 * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
89 * @return NULL on error, otherwise the plugin context
90 */
91void *
92libgnunet_plugin_gtk_namestore_phone_init (void *cls)
93{
94 struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
95 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
96
97 plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
98 plugin->cls = env;
99 plugin->dialog_glade_filename = "gnunet_namestore_edit_phone.glade";
100 plugin->dialog_widget_name = "edit_phone_dialog";
101 plugin->load = &phone_load;
102 plugin->store = &phone_store;
103 plugin->validate = &phone_validate;
104 return plugin;
105}
106
107
108/**
109 * Exit point from the plugin.
110 *
111 * @param cls the plugin context (as returned by "init")
112 * @return always NULL
113 */
114void *
115libgnunet_plugin_gtk_namestore_phone_done (void *cls)
116{
117 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
118
119 GNUNET_free (plugin);
120 return NULL;
121}
122
123/* end of plugin_gtk_namestore_phone.c */
diff --git a/src/namestore/plugin_gtk_namestore_pkey.c b/src/namestore/plugin_gtk_namestore_pkey.c
new file mode 100644
index 00000000..8b9e5c0a
--- /dev/null
+++ b/src/namestore/plugin_gtk_namestore_pkey.c
@@ -0,0 +1,123 @@
1/*
2 * This file is part of GNUnet
3 * (C) 2009-2013 Christian Grothoff (and other contributing authors)
4 *
5 * GNUnet is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; either version 3, or (at your
8 * option) any later version.
9 *
10 * GNUnet is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with GNUnet; see the file COPYING. If not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21/**
22 * @file namestore/plugin_gtk_namestore_pkey.c
23 * @brief namestore plugin for editing PKEY records
24 * @author Christian Grothoff
25 */
26#include "gnunet_gtk.h"
27#include "gnunet_gtk_namestore_plugin.h"
28
29
30/**
31 * Function that will be called to initialize the builder's
32 * widgets from the existing record (if there is one).
33 * The `n_value` is the existing value of the record as a string.
34 *
35 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
36 * @param n_value the record as a string
37 * @param builder the edit dialog's builder
38 */
39static void
40pkey_load (void *cls,
41 gchar *n_value,
42 GtkBuilder *builder)
43{
44 GNUNET_break (0);
45}
46
47
48/**
49 * Function that will be called to retrieve the final value of the
50 * record (in string format) once the dialog is being closed.
51 *
52 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
53 * @param builder the edit dialog's builder
54 * @return record value as a string, as specified in the dialog
55 */
56static gchar *
57pkey_store (void *cls,
58 GtkBuilder *builder)
59{
60 GNUNET_break (0);
61 return NULL;
62}
63
64
65/**
66 * Function to call to validate the state of the dialog. Should
67 * return #GNUNET_OK if the information in the dialog is valid, and
68 * #GNUNET_SYSERR if some fields contain invalid values. The
69 * function should highlight fields with invalid inputs for the
70 * user.
71 *
72 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
73 * @param builder the edit dialog's builder
74 * @return #GNUNET_OK if there is a valid record value in the dialog
75 */
76static int
77pkey_validate (void *cls,
78 GtkBuilder *builder)
79{
80 GNUNET_break (0);
81 return GNUNET_OK;
82}
83
84
85/**
86 * Entry point for the plugin.
87 *
88 * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
89 * @return NULL on error, otherwise the plugin context
90 */
91void *
92libgnunet_plugin_gtk_namestore_pkey_init (void *cls)
93{
94 struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
95 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
96
97 plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
98 plugin->cls = env;
99 plugin->dialog_glade_filename = "gnunet_namestore_edit_pkey.glade";
100 plugin->dialog_widget_name = "edit_pkey_dialog";
101 plugin->load = &pkey_load;
102 plugin->store = &pkey_store;
103 plugin->validate = &pkey_validate;
104 return plugin;
105}
106
107
108/**
109 * Exit point from the plugin.
110 *
111 * @param cls the plugin context (as returned by "init")
112 * @return always NULL
113 */
114void *
115libgnunet_plugin_gtk_namestore_pkey_done (void *cls)
116{
117 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
118
119 GNUNET_free (plugin);
120 return NULL;
121}
122
123/* end of plugin_gtk_namestore_pkey.c */
diff --git a/src/namestore/plugin_gtk_namestore_ptr.c b/src/namestore/plugin_gtk_namestore_ptr.c
new file mode 100644
index 00000000..ada87eef
--- /dev/null
+++ b/src/namestore/plugin_gtk_namestore_ptr.c
@@ -0,0 +1,123 @@
1/*
2 * This file is part of GNUnet
3 * (C) 2009-2013 Christian Grothoff (and other contributing authors)
4 *
5 * GNUnet is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; either version 3, or (at your
8 * option) any later version.
9 *
10 * GNUnet is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with GNUnet; see the file COPYING. If not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21/**
22 * @file namestore/plugin_gtk_namestore_ptr.c
23 * @brief namestore plugin for editing PTR records
24 * @author Christian Grothoff
25 */
26#include "gnunet_gtk.h"
27#include "gnunet_gtk_namestore_plugin.h"
28
29
30/**
31 * Function that will be called to initialize the builder's
32 * widgets from the existing record (if there is one).
33 * The `n_value` is the existing value of the record as a string.
34 *
35 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
36 * @param n_value the record as a string
37 * @param builder the edit dialog's builder
38 */
39static void
40ptr_load (void *cls,
41 gchar *n_value,
42 GtkBuilder *builder)
43{
44 GNUNET_break (0);
45}
46
47
48/**
49 * Function that will be called to retrieve the final value of the
50 * record (in string format) once the dialog is being closed.
51 *
52 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
53 * @param builder the edit dialog's builder
54 * @return record value as a string, as specified in the dialog
55 */
56static gchar *
57ptr_store (void *cls,
58 GtkBuilder *builder)
59{
60 GNUNET_break (0);
61 return NULL;
62}
63
64
65/**
66 * Function to call to validate the state of the dialog. Should
67 * return #GNUNET_OK if the information in the dialog is valid, and
68 * #GNUNET_SYSERR if some fields contain invalid values. The
69 * function should highlight fields with invalid inputs for the
70 * user.
71 *
72 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
73 * @param builder the edit dialog's builder
74 * @return #GNUNET_OK if there is a valid record value in the dialog
75 */
76static int
77ptr_validate (void *cls,
78 GtkBuilder *builder)
79{
80 GNUNET_break (0);
81 return GNUNET_OK;
82}
83
84
85/**
86 * Entry point for the plugin.
87 *
88 * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
89 * @return NULL on error, otherwise the plugin context
90 */
91void *
92libgnunet_plugin_gtk_namestore_ptr_init (void *cls)
93{
94 struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
95 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
96
97 plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
98 plugin->cls = env;
99 plugin->dialog_glade_filename = "gnunet_namestore_edit_ptr.glade";
100 plugin->dialog_widget_name = "edit_ptr_dialog";
101 plugin->load = &ptr_load;
102 plugin->store = &ptr_store;
103 plugin->validate = &ptr_validate;
104 return plugin;
105}
106
107
108/**
109 * Exit point from the plugin.
110 *
111 * @param cls the plugin context (as returned by "init")
112 * @return always NULL
113 */
114void *
115libgnunet_plugin_gtk_namestore_ptr_done (void *cls)
116{
117 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
118
119 GNUNET_free (plugin);
120 return NULL;
121}
122
123/* end of plugin_gtk_namestore_ptr.c */
diff --git a/src/namestore/plugin_gtk_namestore_soa.c b/src/namestore/plugin_gtk_namestore_soa.c
new file mode 100644
index 00000000..920db7ba
--- /dev/null
+++ b/src/namestore/plugin_gtk_namestore_soa.c
@@ -0,0 +1,123 @@
1/*
2 * This file is part of GNUnet
3 * (C) 2009-2013 Christian Grothoff (and other contributing authors)
4 *
5 * GNUnet is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; either version 3, or (at your
8 * option) any later version.
9 *
10 * GNUnet is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with GNUnet; see the file COPYING. If not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21/**
22 * @file namestore/plugin_gtk_namestore_soa.c
23 * @brief namestore plugin for editing SOA records
24 * @author Christian Grothoff
25 */
26#include "gnunet_gtk.h"
27#include "gnunet_gtk_namestore_plugin.h"
28
29
30/**
31 * Function that will be called to initialize the builder's
32 * widgets from the existing record (if there is one).
33 * The `n_value` is the existing value of the record as a string.
34 *
35 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
36 * @param n_value the record as a string
37 * @param builder the edit dialog's builder
38 */
39static void
40soa_load (void *cls,
41 gchar *n_value,
42 GtkBuilder *builder)
43{
44 GNUNET_break (0);
45}
46
47
48/**
49 * Function that will be called to retrieve the final value of the
50 * record (in string format) once the dialog is being closed.
51 *
52 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
53 * @param builder the edit dialog's builder
54 * @return record value as a string, as specified in the dialog
55 */
56static gchar *
57soa_store (void *cls,
58 GtkBuilder *builder)
59{
60 GNUNET_break (0);
61 return NULL;
62}
63
64
65/**
66 * Function to call to validate the state of the dialog. Should
67 * return #GNUNET_OK if the information in the dialog is valid, and
68 * #GNUNET_SYSERR if some fields contain invalid values. The
69 * function should highlight fields with invalid inputs for the
70 * user.
71 *
72 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
73 * @param builder the edit dialog's builder
74 * @return #GNUNET_OK if there is a valid record value in the dialog
75 */
76static int
77soa_validate (void *cls,
78 GtkBuilder *builder)
79{
80 GNUNET_break (0);
81 return GNUNET_OK;
82}
83
84
85/**
86 * Entry point for the plugin.
87 *
88 * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
89 * @return NULL on error, otherwise the plugin context
90 */
91void *
92libgnunet_plugin_gtk_namestore_soa_init (void *cls)
93{
94 struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
95 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
96
97 plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
98 plugin->cls = env;
99 plugin->dialog_glade_filename = "gnunet_namestore_edit_soa.glade";
100 plugin->dialog_widget_name = "edit_soa_dialog";
101 plugin->load = &soa_load;
102 plugin->store = &soa_store;
103 plugin->validate = &soa_validate;
104 return plugin;
105}
106
107
108/**
109 * Exit point from the plugin.
110 *
111 * @param cls the plugin context (as returned by "init")
112 * @return always NULL
113 */
114void *
115libgnunet_plugin_gtk_namestore_soa_done (void *cls)
116{
117 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
118
119 GNUNET_free (plugin);
120 return NULL;
121}
122
123/* end of plugin_gtk_namestore_soa.c */
diff --git a/src/namestore/plugin_gtk_namestore_srv.c b/src/namestore/plugin_gtk_namestore_srv.c
new file mode 100644
index 00000000..ea70d21f
--- /dev/null
+++ b/src/namestore/plugin_gtk_namestore_srv.c
@@ -0,0 +1,123 @@
1/*
2 * This file is part of GNUnet
3 * (C) 2009-2013 Christian Grothoff (and other contributing authors)
4 *
5 * GNUnet is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; either version 3, or (at your
8 * option) any later version.
9 *
10 * GNUnet is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with GNUnet; see the file COPYING. If not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21/**
22 * @file namestore/plugin_gtk_namestore_srv.c
23 * @brief namestore plugin for editing SRV records
24 * @author Christian Grothoff
25 */
26#include "gnunet_gtk.h"
27#include "gnunet_gtk_namestore_plugin.h"
28
29
30/**
31 * Function that will be called to initialize the builder's
32 * widgets from the existing record (if there is one).
33 * The `n_value` is the existing value of the record as a string.
34 *
35 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
36 * @param n_value the record as a string
37 * @param builder the edit dialog's builder
38 */
39static void
40srv_load (void *cls,
41 gchar *n_value,
42 GtkBuilder *builder)
43{
44 GNUNET_break (0);
45}
46
47
48/**
49 * Function that will be called to retrieve the final value of the
50 * record (in string format) once the dialog is being closed.
51 *
52 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
53 * @param builder the edit dialog's builder
54 * @return record value as a string, as specified in the dialog
55 */
56static gchar *
57srv_store (void *cls,
58 GtkBuilder *builder)
59{
60 GNUNET_break (0);
61 return NULL;
62}
63
64
65/**
66 * Function to call to validate the state of the dialog. Should
67 * return #GNUNET_OK if the information in the dialog is valid, and
68 * #GNUNET_SYSERR if some fields contain invalid values. The
69 * function should highlight fields with invalid inputs for the
70 * user.
71 *
72 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
73 * @param builder the edit dialog's builder
74 * @return #GNUNET_OK if there is a valid record value in the dialog
75 */
76static int
77srv_validate (void *cls,
78 GtkBuilder *builder)
79{
80 GNUNET_break (0);
81 return GNUNET_OK;
82}
83
84
85/**
86 * Entry point for the plugin.
87 *
88 * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
89 * @return NULL on error, otherwise the plugin context
90 */
91void *
92libgnunet_plugin_gtk_namestore_srv_init (void *cls)
93{
94 struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
95 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
96
97 plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
98 plugin->cls = env;
99 plugin->dialog_glade_filename = "gnunet_namestore_edit_srv.glade";
100 plugin->dialog_widget_name = "edit_a_dialog";
101 plugin->load = &srv_load;
102 plugin->store = &srv_store;
103 plugin->validate = &srv_validate;
104 return plugin;
105}
106
107
108/**
109 * Exit point from the plugin.
110 *
111 * @param cls the plugin context (as returned by "init")
112 * @return always NULL
113 */
114void *
115libgnunet_plugin_gtk_namestore_srv_done (void *cls)
116{
117 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
118
119 GNUNET_free (plugin);
120 return NULL;
121}
122
123/* end of plugin_gtk_namestore_srv.c */
diff --git a/src/namestore/plugin_gtk_namestore_template.c b/src/namestore/plugin_gtk_namestore_template.c
index d8c6a8ab..e27d604b 100644
--- a/src/namestore/plugin_gtk_namestore_template.c
+++ b/src/namestore/plugin_gtk_namestore_template.c
@@ -112,7 +112,7 @@ libgnunet_plugin_gtk_namestore_a_init (void *cls)
112 * @return always NULL 112 * @return always NULL
113 */ 113 */
114void * 114void *
115libgnunet_plugin_namecache_sqlite_done (void *cls) 115libgnunet_plugin_gtk_namestore_aaaa_done (void *cls)
116{ 116{
117 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls; 117 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
118 118
diff --git a/src/namestore/plugin_gtk_namestore_txt.c b/src/namestore/plugin_gtk_namestore_txt.c
new file mode 100644
index 00000000..b11ffacb
--- /dev/null
+++ b/src/namestore/plugin_gtk_namestore_txt.c
@@ -0,0 +1,123 @@
1/*
2 * This file is part of GNUnet
3 * (C) 2009-2013 Christian Grothoff (and other contributing authors)
4 *
5 * GNUnet is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; either version 3, or (at your
8 * option) any later version.
9 *
10 * GNUnet is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with GNUnet; see the file COPYING. If not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21/**
22 * @file namestore/plugin_gtk_namestore_txt.c
23 * @brief namestore plugin for editing TXT records
24 * @author Christian Grothoff
25 */
26#include "gnunet_gtk.h"
27#include "gnunet_gtk_namestore_plugin.h"
28
29
30/**
31 * Function that will be called to initialize the builder's
32 * widgets from the existing record (if there is one).
33 * The `n_value` is the existing value of the record as a string.
34 *
35 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
36 * @param n_value the record as a string
37 * @param builder the edit dialog's builder
38 */
39static void
40txt_load (void *cls,
41 gchar *n_value,
42 GtkBuilder *builder)
43{
44 GNUNET_break (0);
45}
46
47
48/**
49 * Function that will be called to retrieve the final value of the
50 * record (in string format) once the dialog is being closed.
51 *
52 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
53 * @param builder the edit dialog's builder
54 * @return record value as a string, as specified in the dialog
55 */
56static gchar *
57txt_store (void *cls,
58 GtkBuilder *builder)
59{
60 GNUNET_break (0);
61 return NULL;
62}
63
64
65/**
66 * Function to call to validate the state of the dialog. Should
67 * return #GNUNET_OK if the information in the dialog is valid, and
68 * #GNUNET_SYSERR if some fields contain invalid values. The
69 * function should highlight fields with invalid inputs for the
70 * user.
71 *
72 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
73 * @param builder the edit dialog's builder
74 * @return #GNUNET_OK if there is a valid record value in the dialog
75 */
76static int
77txt_validate (void *cls,
78 GtkBuilder *builder)
79{
80 GNUNET_break (0);
81 return GNUNET_OK;
82}
83
84
85/**
86 * Entry point for the plugin.
87 *
88 * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
89 * @return NULL on error, otherwise the plugin context
90 */
91void *
92libgnunet_plugin_gtk_namestore_txt_init (void *cls)
93{
94 struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
95 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
96
97 plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
98 plugin->cls = env;
99 plugin->dialog_glade_filename = "gnunet_namestore_edit_txt.glade";
100 plugin->dialog_widget_name = "edit_txt_dialog";
101 plugin->load = &txt_load;
102 plugin->store = &txt_store;
103 plugin->validate = &txt_validate;
104 return plugin;
105}
106
107
108/**
109 * Exit point from the plugin.
110 *
111 * @param cls the plugin context (as returned by "init")
112 * @return always NULL
113 */
114void *
115libgnunet_plugin_gtk_namestore_txt_done (void *cls)
116{
117 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
118
119 GNUNET_free (plugin);
120 return NULL;
121}
122
123/* end of plugin_gtk_namestore_txt.c */
diff --git a/src/namestore/plugin_gtk_namestore_vpn.c b/src/namestore/plugin_gtk_namestore_vpn.c
new file mode 100644
index 00000000..d37dabd5
--- /dev/null
+++ b/src/namestore/plugin_gtk_namestore_vpn.c
@@ -0,0 +1,123 @@
1/*
2 * This file is part of GNUnet
3 * (C) 2009-2013 Christian Grothoff (and other contributing authors)
4 *
5 * GNUnet is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; either version 3, or (at your
8 * option) any later version.
9 *
10 * GNUnet is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with GNUnet; see the file COPYING. If not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
19 */
20
21/**
22 * @file namestore/plugin_gtk_namestore_vpn.c
23 * @brief namestore plugin for editing VPN records
24 * @author Christian Grothoff
25 */
26#include "gnunet_gtk.h"
27#include "gnunet_gtk_namestore_plugin.h"
28
29
30/**
31 * Function that will be called to initialize the builder's
32 * widgets from the existing record (if there is one).
33 * The `n_value` is the existing value of the record as a string.
34 *
35 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
36 * @param n_value the record as a string
37 * @param builder the edit dialog's builder
38 */
39static void
40vpn_load (void *cls,
41 gchar *n_value,
42 GtkBuilder *builder)
43{
44 GNUNET_break (0);
45}
46
47
48/**
49 * Function that will be called to retrieve the final value of the
50 * record (in string format) once the dialog is being closed.
51 *
52 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
53 * @param builder the edit dialog's builder
54 * @return record value as a string, as specified in the dialog
55 */
56static gchar *
57vpn_store (void *cls,
58 GtkBuilder *builder)
59{
60 GNUNET_break (0);
61 return NULL;
62}
63
64
65/**
66 * Function to call to validate the state of the dialog. Should
67 * return #GNUNET_OK if the information in the dialog is valid, and
68 * #GNUNET_SYSERR if some fields contain invalid values. The
69 * function should highlight fields with invalid inputs for the
70 * user.
71 *
72 * @param cls the `struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *`
73 * @param builder the edit dialog's builder
74 * @return #GNUNET_OK if there is a valid record value in the dialog
75 */
76static int
77vpn_validate (void *cls,
78 GtkBuilder *builder)
79{
80 GNUNET_break (0);
81 return GNUNET_OK;
82}
83
84
85/**
86 * Entry point for the plugin.
87 *
88 * @param cls the "struct GNUNET_GTK_NAMESTORE_PluginEnvironment*"
89 * @return NULL on error, otherwise the plugin context
90 */
91void *
92libgnunet_plugin_gtk_namestore_vpn_init (void *cls)
93{
94 struct GNUNET_GTK_NAMESTORE_PluginEnvirionment *env = cls;
95 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin;
96
97 plugin = GNUNET_new (struct GNUNET_GTK_NAMESTORE_PluginFunctions);
98 plugin->cls = env;
99 plugin->dialog_glade_filename = "gnunet_namestore_edit_vpn.glade";
100 plugin->dialog_widget_name = "edit_vpn_dialog";
101 plugin->load = &vpn_load;
102 plugin->store = &vpn_store;
103 plugin->validate = &vpn_validate;
104 return plugin;
105}
106
107
108/**
109 * Exit point from the plugin.
110 *
111 * @param cls the plugin context (as returned by "init")
112 * @return always NULL
113 */
114void *
115libgnunet_plugin_gtk_namestore_vpn_done (void *cls)
116{
117 struct GNUNET_GTK_NAMESTORE_PluginFunctions *plugin = cls;
118
119 GNUNET_free (plugin);
120 return NULL;
121}
122
123/* end of plugin_gtk_namestore_vpn.c */