aboutsummaryrefslogtreecommitdiff
path: root/src/namestore/gnunet-namestore-gtk_edit.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/namestore/gnunet-namestore-gtk_edit.h')
-rw-r--r--src/namestore/gnunet-namestore-gtk_edit.h292
1 files changed, 0 insertions, 292 deletions
diff --git a/src/namestore/gnunet-namestore-gtk_edit.h b/src/namestore/gnunet-namestore-gtk_edit.h
deleted file mode 100644
index dc8f0571..00000000
--- a/src/namestore/gnunet-namestore-gtk_edit.h
+++ /dev/null
@@ -1,292 +0,0 @@
1/*
2 This file is part of GNUnet
3 (C) 2012, 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 src/namestore/gnunet-namestore-gtk_edit.h
23 * @author Christian Grothoff
24 * @brief editing dialogs for GNS records
25 */
26#ifndef GNUNET_SETUP_GNS_EDIT_H
27#define GNUNET_SETUP_GNS_EDIT_H
28
29#include "gnunet_gtk.h"
30#include <gnunet/gnunet_namestore_service.h>
31#include <gnunet/gnunet_dnsparser_lib.h>
32
33
34/**
35 * Columns in the zone list store.
36 */
37enum ZONE_COLUMNS
38{
39
40 /**
41 * A gchararray
42 */
43 ZONE_LS_NAME = 0,
44
45
46 /**
47 * A `struct GNUNET_IDENTITY_Ego`
48 */
49 ZONE_LS_EGO = 1
50};
51
52
53
54/**
55 * Context for edit operations.
56 */
57struct EditDialogContext;
58
59
60/**
61 * Signature of the continuation function invoked once the
62 * edit dialog is done.
63 *
64 * @param edc dialog context
65 * @param ret return code from the dialog
66 */
67typedef void (*GNS_EditContinuation)(struct EditDialogContext *edc,
68 GtkResponseType ret);
69
70
71/**
72 * Signature of a dialog-specific validation function to validate the
73 * value. Should either call 'edit_dialog_disable_save' if the value
74 * is invalid, or 'edit_dialog_check_save' if the value is valid.
75 */
76typedef void (*GNS_EditValidator)(struct EditDialogContext *edc);
77
78
79/**
80 * Context for edit operations.
81 */
82struct EditDialogContext
83{
84
85 /**
86 * Where in the tree view are we editing?
87 */
88 struct RecordInfo *ri;
89
90 /**
91 * Function to call at the end.
92 */
93 GNS_EditContinuation cont;
94
95 /**
96 * Function to call to validate the state of the dialog and
97 * ultimately update the 'save' button sensitivity.
98 */
99 GNS_EditValidator validator;
100
101 /**
102 * Builder for the dialog (internal to gnunet-setup-gns-edit.c).
103 */
104 GtkBuilder *builder;
105
106 /**
107 * Main dialog window.
108 */
109 GtkDialog *dialog;
110
111 /**
112 * Name of the record.
113 */
114 gchar *name;
115
116 /**
117 * Value of the record in string format.
118 */
119 gchar *n_value;
120
121 /**
122 * Name of the zone into which the record should be placed.
123 */
124 gchar *new_zone_option;
125
126 /**
127 * Ego of the zone into which the record should be placed.
128 */
129 struct GNUNET_IDENTITY_Ego *ego;
130
131 /**
132 * Expiration time value (absolute or relative).
133 */
134 guint64 n_exp_time;
135
136 /**
137 * Offset of the record we are editing in the 'rd' list of 'ri'.
138 */
139 unsigned int off;
140
141 /**
142 * Flag indicating if the old record was in the namestore.
143 */
144 int old_record_in_namestore;
145
146 /**
147 * Type of the record.
148 */
149 uint32_t record_type;
150
151 /**
152 * Is this record 'public'?
153 */
154 gboolean n_public;
155
156 /**
157 * Is the expiration time relative?
158 */
159 gboolean n_is_relative;
160
161 /**
162 * Is this record a shadow record?
163 */
164 gboolean n_is_shadow;
165
166 /**
167 * List of all zones.
168 */
169 GtkListStore *zone_liststore;
170
171};
172
173
174
175/**
176 * Run an GNS Edit dialog for an 'A' Record.
177 *
178 * @param edc editing context to use
179 */
180void
181GNS_edit_dialog_a (struct EditDialogContext *edc);
182
183
184/**
185 * Run an GNS Edit dialog for an 'AAAA' Record.
186 *
187 * @param edc editing context to use
188 */
189void
190GNS_edit_dialog_aaaa (struct EditDialogContext *edc);
191
192
193/**
194 * Run an GNS Edit dialog for an 'CNAME' Record.
195 *
196 * @param edc editing context to use
197 */
198void
199GNS_edit_dialog_cname (struct EditDialogContext *edc);
200
201
202/**
203 * Run an GNS Edit dialog for an 'LEHO' Record.
204 *
205 * @param edc editing context to use
206 */
207void
208GNS_edit_dialog_leho (struct EditDialogContext *edc);
209
210
211/**
212 * Run an GNS Edit dialog for an 'MX' Record.
213 *
214 * @param edc editing context to use
215 */
216void
217GNS_edit_dialog_mx (struct EditDialogContext *edc);
218
219
220/**
221 * Run an GNS Edit dialog for an 'NS' Record.
222 *
223 * @param edc editing context to use
224 */
225void
226GNS_edit_dialog_gns2dns (struct EditDialogContext *edc);
227
228
229/**
230 * Run an GNS Edit dialog for a 'PHONE' Record.
231 *
232 * @param edc editing context to use
233 */
234void
235GNS_edit_dialog_phone (struct EditDialogContext *edc);
236
237
238/**
239 * Run an GNS Edit dialog for an 'PKEY' Record.
240 *
241 * @param edc editing context to use
242 */
243void
244GNS_edit_dialog_pkey (struct EditDialogContext *edc);
245
246
247/**
248 * Run an GNS Edit dialog for an 'PTR' Record.
249 *
250 * @param edc editing context to use
251 */
252void
253GNS_edit_dialog_ptr (struct EditDialogContext *edc);
254
255
256/**
257 * Run an GNS Edit dialog for an 'SOA' Record.
258 *
259 * @param edc editing context to use
260 */
261void
262GNS_edit_dialog_soa (struct EditDialogContext *edc);
263
264
265/**
266 * Run an GNS Edit dialog for an 'SRV' Record.
267 *
268 * @param edc editing context to use
269 */
270void
271GNS_edit_dialog_srv (struct EditDialogContext *edc);
272
273
274/**
275 * Run an GNS Edit dialog for an 'TXT' Record.
276 *
277 * @param edc editing context to use
278 */
279void
280GNS_edit_dialog_txt (struct EditDialogContext *edc);
281
282
283/**
284 * Run an GNS Edit dialog for an 'VPN' Record.
285 *
286 * @param edc editing context to use
287 */
288void
289GNS_edit_dialog_vpn (struct EditDialogContext *edc);
290
291
292#endif