diff options
Diffstat (limited to 'src/setup/gnunet-setup-gns-edit.h')
-rw-r--r-- | src/setup/gnunet-setup-gns-edit.h | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/src/setup/gnunet-setup-gns-edit.h b/src/setup/gnunet-setup-gns-edit.h new file mode 100644 index 00000000..56af72e0 --- /dev/null +++ b/src/setup/gnunet-setup-gns-edit.h | |||
@@ -0,0 +1,127 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet | ||
3 | (C) 2012 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 2, 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/setup/gnunet-setup-gns-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-setup-gns.h" | ||
31 | #include <gnunet/gnunet_namestore_service.h> | ||
32 | #include <gnunet/gnunet_dnsparser_lib.h> | ||
33 | |||
34 | |||
35 | /** | ||
36 | * Context for edit operations. | ||
37 | */ | ||
38 | struct EditDialogContext; | ||
39 | |||
40 | |||
41 | /** | ||
42 | * Signature of the continuation function invoked once the | ||
43 | * edit dialog is done. | ||
44 | * | ||
45 | * @param edc dialog context | ||
46 | * @param ret return code from the dialog | ||
47 | */ | ||
48 | typedef void (*GNS_EditContinuation)(struct EditDialogContext *edc, | ||
49 | GtkResponseType ret); | ||
50 | |||
51 | |||
52 | |||
53 | /** | ||
54 | * Context for edit operations. | ||
55 | */ | ||
56 | struct EditDialogContext | ||
57 | { | ||
58 | |||
59 | /** | ||
60 | * Function to call at the end. | ||
61 | */ | ||
62 | GNS_EditContinuation cont; | ||
63 | |||
64 | /** | ||
65 | * Where in the tree view are we editing? | ||
66 | */ | ||
67 | GtkTreeIter it; | ||
68 | |||
69 | /** | ||
70 | * Expiration time value (absolute or relative). | ||
71 | */ | ||
72 | guint64 n_exp_time; | ||
73 | |||
74 | /** | ||
75 | * Old name of the record (for deletion). | ||
76 | */ | ||
77 | gchar *n_name; | ||
78 | |||
79 | /** | ||
80 | * New name. | ||
81 | */ | ||
82 | gchar *n_new_name; | ||
83 | |||
84 | /** | ||
85 | * Value of the record in string format. | ||
86 | */ | ||
87 | gchar *n_value; | ||
88 | |||
89 | /** | ||
90 | * Zone into which the record should be placed. | ||
91 | */ | ||
92 | const char *new_zone_option; | ||
93 | |||
94 | /** | ||
95 | * Flag indicating if the old record was in the namestore. | ||
96 | */ | ||
97 | int old_record_in_namestore; | ||
98 | |||
99 | /** | ||
100 | * Is this record 'public'? | ||
101 | */ | ||
102 | gboolean n_public; | ||
103 | |||
104 | /** | ||
105 | * Is the expiration time relative? | ||
106 | */ | ||
107 | gboolean n_is_relative; | ||
108 | |||
109 | /** | ||
110 | * Is this record a shadow record? | ||
111 | */ | ||
112 | gboolean n_is_shadow; | ||
113 | |||
114 | }; | ||
115 | |||
116 | |||
117 | |||
118 | /** | ||
119 | * Run an GNS Edit dialog for an 'A' Record. | ||
120 | * | ||
121 | * @param edc editing context to use | ||
122 | */ | ||
123 | void | ||
124 | GNS_edit_dialog_a (struct EditDialogContext *edc); | ||
125 | |||
126 | |||
127 | #endif | ||