[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r25242 - in gnunet-gtk: contrib src/setup
From: |
gnunet |
Subject: |
[GNUnet-SVN] r25242 - in gnunet-gtk: contrib src/setup |
Date: |
Tue, 4 Dec 2012 16:47:22 +0100 |
Author: grothoff
Date: 2012-12-04 16:47:22 +0100 (Tue, 04 Dec 2012)
New Revision: 25242
Modified:
gnunet-gtk/contrib/gnunet_setup_gns_edit_soa.glade
gnunet-gtk/contrib/gnunet_setup_gns_edit_srv.glade
gnunet-gtk/contrib/gnunet_setup_gns_edit_vpn.glade
gnunet-gtk/contrib/gnunet_setup_gtk_main_window.glade
gnunet-gtk/src/setup/gnunet-setup-gns-edit.c
gnunet-gtk/src/setup/gnunet-setup-gns-edit.h
gnunet-gtk/src/setup/gnunet-setup-gns.c
Log:
-record editing code
Modified: gnunet-gtk/contrib/gnunet_setup_gns_edit_soa.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_setup_gns_edit_soa.glade 2012-12-04 15:42:52 UTC
(rev 25241)
+++ gnunet-gtk/contrib/gnunet_setup_gns_edit_soa.glade 2012-12-04 15:47:22 UTC
(rev 25242)
@@ -464,6 +464,7 @@
<property
name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property
name="secondary_icon_sensitive">True</property>
+ <signal name="changed"
handler="GNS_edit_dialog_soa_source_host_entry_changed_cb" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
@@ -480,6 +481,7 @@
<property
name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property
name="secondary_icon_sensitive">True</property>
+ <signal name="changed"
handler="GNS_edit_dialog_soa_contact_email_entry_changed_cb" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
Modified: gnunet-gtk/contrib/gnunet_setup_gns_edit_srv.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_setup_gns_edit_srv.glade 2012-12-04 15:42:52 UTC
(rev 25241)
+++ gnunet-gtk/contrib/gnunet_setup_gns_edit_srv.glade 2012-12-04 15:47:22 UTC
(rev 25242)
@@ -34,11 +34,6 @@
</row>
</data>
</object>
- <object class="GtkAdjustment" id="srv_weight_adjustment">
- <property name="upper">65535</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
- </object>
<object class="GtkAdjustment" id="srv_port_adjustment">
<property name="upper">65535</property>
<property name="step_increment">1</property>
@@ -49,6 +44,11 @@
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
+ <object class="GtkAdjustment" id="srv_weight_adjustment">
+ <property name="upper">65535</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
<object class="GtkListStore" id="zone_liststore">
<columns>
<!-- column-name zonename -->
@@ -368,6 +368,7 @@
<property
name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property
name="secondary_icon_sensitive">True</property>
+ <signal name="changed"
handler="GNS_edit_dialog_srv_target_entry_changed_cb" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
Modified: gnunet-gtk/contrib/gnunet_setup_gns_edit_vpn.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_setup_gns_edit_vpn.glade 2012-12-04 15:42:52 UTC
(rev 25241)
+++ gnunet-gtk/contrib/gnunet_setup_gns_edit_vpn.glade 2012-12-04 15:47:22 UTC
(rev 25242)
@@ -328,6 +328,7 @@
<property
name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property
name="secondary_icon_sensitive">True</property>
+ <signal name="changed"
handler="GNS_edit_dialog_vpn_peer_entry_changed_cb" swapped="no"/>
</object>
<packing>
<property name="left_attach">1</property>
Modified: gnunet-gtk/contrib/gnunet_setup_gtk_main_window.glade
===================================================================
--- gnunet-gtk/contrib/gnunet_setup_gtk_main_window.glade 2012-12-04
15:42:52 UTC (rev 25241)
+++ gnunet-gtk/contrib/gnunet_setup_gtk_main_window.glade 2012-12-04
15:47:22 UTC (rev 25242)
@@ -4724,10 +4724,6 @@
<col id="1" translatable="no">LEHO</col>
</row>
<row>
- <col id="0">33</col>
- <col id="1" translatable="no">SRV</col>
- </row>
- <row>
<col id="0">65539</col>
<col id="1" translatable="no">VPN</col>
</row>
Modified: gnunet-gtk/src/setup/gnunet-setup-gns-edit.c
===================================================================
--- gnunet-gtk/src/setup/gnunet-setup-gns-edit.c 2012-12-04 15:42:52 UTC
(rev 25241)
+++ gnunet-gtk/src/setup/gnunet-setup-gns-edit.c 2012-12-04 15:47:22 UTC
(rev 25242)
@@ -363,7 +363,7 @@
cb = GTK_COMBO_BOX (gtk_builder_get_object (edc->builder,
"edit_dialog_expiration_relative_combobox"));
tm = gtk_combo_box_get_model (cb);
- if (TRUE != gtk_combo_box_get_active_iter (cb, &iter))
+ if (! gtk_combo_box_get_active_iter (cb, &iter))
{
GNUNET_break (0);
return;
@@ -1249,7 +1249,6 @@
}
-
/* ************************ PTR records *********************** */
/**
@@ -1359,6 +1358,339 @@
}
+/* ************************ SOA records *********************** */
+
+/**
+ * Check validity of the value in the edit dialog for SOA-records.
+ * Then call the shared validity check if the result is OK.
+ *
+ * @param edc edit dialog context
+ */
+static void
+edit_dialog_soa_validity_check (struct EditDialogContext *edc)
+{
+ GtkEditable *entry;
+ const gchar *preedit;
+
+ entry = GTK_EDITABLE (gtk_builder_get_object (edc->builder,
+
"edit_dialog_soa_source_host_entry")),
+ preedit = gtk_editable_get_chars (entry, 0, -1);
+ if ( (NULL == preedit) ||
+ (GNUNET_OK != GNUNET_DNSPARSER_check_name (preedit)) )
+ {
+ edit_dialog_disable_save (edc);
+ return;
+ }
+ /* check for '@' in the e-mail --- required format uses "." instead! */
+ entry = GTK_EDITABLE (gtk_builder_get_object (edc->builder,
+
"edit_dialog_soa_contact_email_entry")),
+ preedit = gtk_editable_get_chars (entry, 0, -1);
+ if ( (NULL == preedit) ||
+ (NULL != strstr (preedit, "@")) ||
+ (GNUNET_OK != GNUNET_DNSPARSER_check_name (preedit)) )
+ {
+ /* E-mail is specified in the RFC also as a 'domain-name', hence
+ we check above that it follows those conventions as well; the '@'
+ is a common mistake, and while it should be illegal despite IDN,
+ it feels better to check explicitly. */
+ edit_dialog_disable_save (edc);
+ return;
+ }
+ edit_dialog_check_save (edc);
+}
+
+
+/**
+ * Editing dialog was closed, get the data and call the
+ * continuation.
+ *
+ * @param dialog editing dialog
+ * @param user_data the 'struct EditDialogContext'
+ */
+void
+GNS_edit_soa_dialog_response_cb (GtkDialog *dialog,
+ gint response_id,
+ gpointer user_data)
+{
+ struct EditDialogContext *edc = user_data;
+ GtkEntry *entry;
+ const gchar *source_host;
+ const gchar *contact_email;
+ unsigned int soa_serial;
+ unsigned int soa_refresh;
+ unsigned int soa_retry;
+ unsigned int soa_expire;
+ unsigned int soa_min;
+ char *result;
+
+ if (GTK_RESPONSE_OK == response_id)
+ {
+ edit_dialog_putes_common_elements (edc);
+ entry = GTK_ENTRY (gtk_builder_get_object (edc->builder,
+
"edit_dialog_soa_source_host_entry"));
+ source_host = gtk_entry_get_text (entry);
+ entry = GTK_ENTRY (gtk_builder_get_object (edc->builder,
+
"edit_dialog_soa_contact_email_entry"));
+ contact_email = gtk_entry_get_text (entry);
+ soa_serial = gtk_spin_button_get_value (GTK_SPIN_BUTTON
(gtk_builder_get_object (edc->builder,
+
"edit_dialog_soa_serial_number_spinbutton")));
+ soa_refresh = gtk_spin_button_get_value (GTK_SPIN_BUTTON
(gtk_builder_get_object (edc->builder,
+
"edit_dialog_soa_refresh_time_spinbutton")));
+ soa_retry = gtk_spin_button_get_value (GTK_SPIN_BUTTON
(gtk_builder_get_object (edc->builder,
+
"edit_dialog_soa_retry_time_spinbutton")));
+ soa_expire = gtk_spin_button_get_value (GTK_SPIN_BUTTON
(gtk_builder_get_object (edc->builder,
+
"edit_dialog_soa_expire_time_spinbutton")));
+ soa_min = gtk_spin_button_get_value (GTK_SPIN_BUTTON
(gtk_builder_get_object (edc->builder,
+
"edit_dialog_soa_minimum_ttl_spinbutton")));
+ GNUNET_asprintf (&result,
+ "rname=%s mname=%s %lu,%lu,%lu,%lu,%lu",
+ source_host, contact_email,
+ soa_serial,
+ soa_refresh,
+ soa_retry,
+ soa_expire,
+ soa_min);
+ edc->n_value = g_strdup (result);
+ GNUNET_free (result);
+ }
+ gtk_widget_destroy (GTK_WIDGET (edc->dialog));
+ g_object_unref (edc->builder);
+ edc->builder = NULL;
+ edc->cont (edc, response_id);
+}
+
+
+/**
+ * The user has edited the SOA record value. Enable/disable 'save'
+ * button depending on the validity of the value.
+ *
+ * @param entry editing widget
+ * @param preedit new value
+ * @param user_data the 'struct EditDialogContext' of the dialog
+ */
+void
+GNS_edit_dialog_soa_contact_email_entry_changed_cb (GtkEditable *entry,
+ gpointer user_data)
+{
+ struct EditDialogContext *edc = user_data;
+
+ edit_dialog_soa_validity_check (edc);
+}
+
+
+/**
+ * The user has edited the SOA record value. Enable/disable 'save'
+ * button depending on the validity of the value.
+ *
+ * @param entry editing widget
+ * @param preedit new value
+ * @param user_data the 'struct EditDialogContext' of the dialog
+ */
+void
+GNS_edit_dialog_soa_source_host_entry_changed_cb (GtkEditable *entry,
+ gpointer user_data)
+{
+ struct EditDialogContext *edc = user_data;
+
+ edit_dialog_soa_validity_check (edc);
+}
+
+
+/**
+ * Run an GNS Edit dialog for an 'SOA' Record.
+ *
+ * @param cont continuation to call when done
+ * @param edc editing context to use
+ */
+void
+GNS_edit_dialog_soa (struct EditDialogContext *edc)
+{
+ char soa_rname[253 + 1];
+ char soa_mname[253 + 1];
+ unsigned int soa_serial;
+ unsigned int soa_refresh;
+ unsigned int soa_retry;
+ unsigned int soa_expire;
+ unsigned int soa_min;
+
+ edc->builder = GNUNET_GTK_get_new_builder ("gnunet_setup_gns_edit_soa.glade",
+ edc);
+ if (NULL == edc->builder)
+ {
+ GNUNET_break (0);
+ edc->cont (edc, GTK_RESPONSE_CANCEL); /* treat as 'cancel' */
+ return;
+ }
+ if (GNUNET_YES ==
+ edc->old_record_in_namestore)
+ {
+ if (7 != SSCANF (edc->n_value,
+ "rname=%253s mname=%253s %u,%u,%u,%u,%u",
+ soa_rname, soa_mname,
+ &soa_serial, &soa_refresh, &soa_retry, &soa_expire,
&soa_min))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ _("Unable to parse SOA record `%s'\n"),
+ edc->n_value);
+ }
+ else
+ {
+ /* set SOA record */
+ gtk_entry_set_text (GTK_ENTRY (gtk_builder_get_object (edc->builder,
+
"edit_dialog_soa_source_host_entry")),
+ soa_rname);
+ gtk_entry_set_text (GTK_ENTRY (gtk_builder_get_object (edc->builder,
+
"edit_dialog_soa_contact_email_entry")),
+ soa_mname);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (gtk_builder_get_object
(edc->builder,
+
"edit_dialog_soa_serial_number_spinbutton")),
+ soa_serial);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (gtk_builder_get_object
(edc->builder,
+
"edit_dialog_soa_refresh_time_spinbutton")),
+ soa_refresh);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (gtk_builder_get_object
(edc->builder,
+
"edit_dialog_soa_retry_time_spinbutton")),
+ soa_retry);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (gtk_builder_get_object
(edc->builder,
+
"edit_dialog_soa_expire_time_spinbutton")),
+ soa_expire);
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (gtk_builder_get_object
(edc->builder,
+
"edit_dialog_soa_minimum_ttl_spinbutton")),
+ soa_min);
+ }
+ }
+ edc->validator = &edit_dialog_soa_validity_check;
+ edc->dialog = GTK_DIALOG (gtk_builder_get_object (edc->builder,
+ "edit_soa_dialog"));
+ run_edit_dialog (edc);
+}
+
+
+/* ************************ SRV records *********************** */
+/* *** Not implemented: namestore_common.c as well as here! *** */
+/* ************************ SRV records *********************** */
+
+/**
+ * Check validity of the value in the edit dialog for SRV-records.
+ * Then call the shared validity check if the result is OK.
+ *
+ * @param edc edit dialog context
+ */
+static void
+edit_dialog_srv_validity_check (struct EditDialogContext *edc)
+{
+ GtkEditable *entry;
+ const gchar *preedit;
+
+ entry = GTK_EDITABLE (gtk_builder_get_object (edc->builder,
+
"edit_dialog_srv_target_entry")),
+ preedit = gtk_editable_get_chars (entry, 0, -1);
+ if ( (NULL == preedit) ||
+ (GNUNET_OK != GNUNET_DNSPARSER_check_name (preedit)) )
+ {
+ edit_dialog_disable_save (edc);
+ return;
+ }
+ entry = GTK_EDITABLE (gtk_builder_get_object (edc->builder,
+ "edit_dialog_name_entry")),
+ preedit = gtk_editable_get_chars (entry, 0, -1);
+#if 0
+ /* FIXME: check service name format! */
+#endif
+ edit_dialog_check_save (edc);
+}
+
+
+/**
+ * Editing dialog was closed, get the data and call the
+ * continuation.
+ *
+ * @param dialog editing dialog
+ * @param user_data the 'struct EditDialogContext'
+ */
+void
+GNS_edit_srv_dialog_response_cb (GtkDialog *dialog,
+ gint response_id,
+ gpointer user_data)
+{
+ struct EditDialogContext *edc = user_data;
+
+ if (GTK_RESPONSE_OK == response_id)
+ {
+ edit_dialog_putes_common_elements (edc);
+#if 0
+ GtkEntry *entry;
+ const gchar *value;
+
+ entry = GTK_ENTRY (gtk_builder_get_object (edc->builder,
+ "edit_dialog_srv_target_entry"));
+ /* FIXME: build srv record */
+ value = gtk_entry_get_text (entry);
+ g_free (edc->n_value);
+ edc->n_value = g_strdup (value);
+#endif
+
+ }
+ gtk_widget_destroy (GTK_WIDGET (edc->dialog));
+ g_object_unref (edc->builder);
+ edc->builder = NULL;
+ edc->cont (edc, response_id);
+}
+
+
+/**
+ * The user has edited the SRV record value. Enable/disable 'save'
+ * button depending on the validity of the value.
+ *
+ * @param entry editing widget
+ * @param preedit new value
+ * @param user_data the 'struct EditDialogContext' of the dialog
+ */
+void
+GNS_edit_dialog_srv_target_entry_changed_cb (GtkEditable *entry,
+ gpointer user_data)
+{
+ struct EditDialogContext *edc = user_data;
+
+ edit_dialog_srv_validity_check (edc);
+}
+
+
+/**
+ * Run an GNS Edit dialog for an 'SRV' Record.
+ *
+ * @param cont continuation to call when done
+ * @param edc editing context to use
+ */
+void
+GNS_edit_dialog_srv (struct EditDialogContext *edc)
+{
+ edc->builder = GNUNET_GTK_get_new_builder ("gnunet_setup_gns_edit_srv.glade",
+ edc);
+ if (NULL == edc->builder)
+ {
+ GNUNET_break (0);
+ edc->cont (edc, GTK_RESPONSE_CANCEL); /* treat as 'cancel' */
+ return;
+ }
+ if (GNUNET_YES ==
+ edc->old_record_in_namestore)
+ {
+#if 0
+ /* FIXME */
+ /* set SRV record */
+ gtk_entry_set_text (GTK_ENTRY (gtk_builder_get_object (edc->builder,
+
"edit_dialog_srv_target_entry")),
+ edc->n_value);
+#endif
+ }
+ edc->validator = &edit_dialog_srv_validity_check;
+ edc->dialog = GTK_DIALOG (gtk_builder_get_object (edc->builder,
+ "edit_srv_dialog"));
+ run_edit_dialog (edc);
+}
+
+
/* ************************ TXT records *********************** */
/**
@@ -1456,7 +1788,152 @@
}
+/* ************************ VPN records *********************** */
+/**
+ * Check validity of the value in the edit dialog for VPN-records.
+ * Then call the shared validity check if the result is OK.
+ *
+ * @param edc edit dialog context
+ */
+static void
+edit_dialog_vpn_validity_check (struct EditDialogContext *edc)
+{
+ GtkEditable *entry;
+ const gchar *preedit;
+ struct GNUNET_HashCode hc;
+
+ entry = GTK_EDITABLE (gtk_builder_get_object (edc->builder,
+ "edit_dialog_vpn_peer_entry")),
+ preedit = gtk_editable_get_chars (entry, 0, -1);
+ if ( (NULL == preedit) ||
+ (GNUNET_OK !=
+ GNUNET_CRYPTO_hash_from_string (preedit, &hc)) )
+ {
+ edit_dialog_disable_save (edc);
+ return;
+ }
+ edit_dialog_check_save (edc);
+}
+/**
+ * Editing dialog was closed, get the data and call the
+ * continuation.
+ *
+ * @param dialog editing dialog
+ * @param user_data the 'struct EditDialogContext'
+ */
+void
+GNS_edit_vpn_dialog_response_cb (GtkDialog *dialog,
+ gint response_id,
+ gpointer user_data)
+{
+ struct EditDialogContext *edc = user_data;
+ GtkEntry *entry;
+ const gchar *identifier;
+ const gchar *peer;
+ unsigned int proto;
+ char *result;
+
+ if (GTK_RESPONSE_OK == response_id)
+ {
+ edit_dialog_putes_common_elements (edc);
+ entry = GTK_ENTRY (gtk_builder_get_object (edc->builder,
+
"edit_dialog_vpn_identifier_entry"));
+ identifier = gtk_entry_get_text (entry);
+ entry = GTK_ENTRY (gtk_builder_get_object (edc->builder,
+ "edit_dialog_vpn_peer_entry"));
+ peer = gtk_entry_get_text (entry);
+ proto = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
(gtk_builder_get_object (edc->builder,
+
"edit_dialog_vpn_protocol_tcp_radiobutton"))) ? IPPROTO_TCP : IPPROTO_UDP;
+ GNUNET_asprintf (&result,
+ "%u %s %s",
+ proto,
+ (const char *) peer,
+ (const char *) identifier);
+ g_free (edc->n_value);
+ edc->n_value = g_strdup (result);
+ GNUNET_free (result);
+ }
+ gtk_widget_destroy (GTK_WIDGET (edc->dialog));
+ g_object_unref (edc->builder);
+ edc->builder = NULL;
+ edc->cont (edc, response_id);
+}
+
+
+/**
+ * The user has edited the VPN record value. Enable/disable 'save'
+ * button depending on the validity of the value.
+ *
+ * @param entry editing widget
+ * @param preedit new value
+ * @param user_data the 'struct EditDialogContext' of the dialog
+ */
+void
+GNS_edit_dialog_vpn_peer_entry_changed_cb (GtkEditable *entry,
+ gpointer user_data)
+{
+ struct EditDialogContext *edc = user_data;
+
+ edit_dialog_vpn_validity_check (edc);
+}
+
+
+/**
+ * Run an GNS Edit dialog for an 'VPN' Record.
+ *
+ * @param cont continuation to call when done
+ * @param edc editing context to use
+ */
+void
+GNS_edit_dialog_vpn (struct EditDialogContext *edc)
+{
+ char s_peer[103 + 1];
+ char s_serv[253 + 1];
+ unsigned int proto;
+
+ edc->builder = GNUNET_GTK_get_new_builder ("gnunet_setup_gns_edit_vpn.glade",
+ edc);
+ if (NULL == edc->builder)
+ {
+ GNUNET_break (0);
+ edc->cont (edc, GTK_RESPONSE_CANCEL); /* treat as 'cancel' */
+ return;
+ }
+ if (GNUNET_YES ==
+ edc->old_record_in_namestore)
+ {
+ /* set VPN record */
+ if (3 != SSCANF (edc->n_value,"%u %103s %253s",
+ &proto, s_peer, s_serv))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ _("Unable to parse VPN record string `%s'\n"),
+ edc->n_value);
+ }
+ else
+ {
+ gtk_entry_set_text (GTK_ENTRY (gtk_builder_get_object (edc->builder,
+
"edit_dialog_vpn_identifier_entry")),
+ s_serv);
+ gtk_entry_set_text (GTK_ENTRY (gtk_builder_get_object (edc->builder,
+
"edit_dialog_vpn_peer_entry")),
+ s_peer);
+ if (IPPROTO_UDP == proto)
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object
(edc->builder,
+
"edit_dialog_vpn_protocol_udp_radiobutton")), TRUE);
+ else
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gtk_builder_get_object
(edc->builder,
+
"edit_dialog_vpn_protocol_tcp_radiobutton")), TRUE);
+ }
+ }
+ edc->validator = &edit_dialog_vpn_validity_check;
+ edc->dialog = GTK_DIALOG (gtk_builder_get_object (edc->builder,
+ "edit_vpn_dialog"));
+ run_edit_dialog (edc);
+}
+
+
/* end of gnunet-setup-gns-edit.c */
Modified: gnunet-gtk/src/setup/gnunet-setup-gns-edit.h
===================================================================
--- gnunet-gtk/src/setup/gnunet-setup-gns-edit.h 2012-12-04 15:42:52 UTC
(rev 25241)
+++ gnunet-gtk/src/setup/gnunet-setup-gns-edit.h 2012-12-04 15:47:22 UTC
(rev 25242)
@@ -245,6 +245,26 @@
/**
+ * Run an GNS Edit dialog for an 'SOA' Record.
+ *
+ * @param cont continuation to call when done
+ * @param edc editing context to use
+ */
+void
+GNS_edit_dialog_soa (struct EditDialogContext *edc);
+
+
+/**
+ * Run an GNS Edit dialog for an 'SRV' Record.
+ *
+ * @param cont continuation to call when done
+ * @param edc editing context to use
+ */
+void
+GNS_edit_dialog_srv (struct EditDialogContext *edc);
+
+
+/**
* Run an GNS Edit dialog for an 'TXT' Record.
*
* @param cont continuation to call when done
@@ -254,4 +274,14 @@
GNS_edit_dialog_txt (struct EditDialogContext *edc);
+/**
+ * Run an GNS Edit dialog for an 'VPN' Record.
+ *
+ * @param cont continuation to call when done
+ * @param edc editing context to use
+ */
+void
+GNS_edit_dialog_vpn (struct EditDialogContext *edc);
+
+
#endif
Modified: gnunet-gtk/src/setup/gnunet-setup-gns.c
===================================================================
--- gnunet-gtk/src/setup/gnunet-setup-gns.c 2012-12-04 15:42:52 UTC (rev
25241)
+++ gnunet-gtk/src/setup/gnunet-setup-gns.c 2012-12-04 15:47:22 UTC (rev
25242)
@@ -1423,36 +1423,42 @@
case GNUNET_DNSPARSER_TYPE_A:
GNS_edit_dialog_a (edc);
break;
- case GNUNET_DNSPARSER_TYPE_NS:
- GNS_edit_dialog_ns (edc);
+ case GNUNET_DNSPARSER_TYPE_AAAA:
+ GNS_edit_dialog_aaaa (edc);
break;
case GNUNET_DNSPARSER_TYPE_CNAME:
GNS_edit_dialog_cname (edc);
break;
+ case GNUNET_NAMESTORE_TYPE_LEHO:
+ GNS_edit_dialog_leho (edc);
+ break;
+ case GNUNET_NAMESTORE_TYPE_PKEY:
+ GNS_edit_dialog_pkey (edc);
+ break;
case GNUNET_DNSPARSER_TYPE_PTR:
GNS_edit_dialog_ptr (edc);
break;
case GNUNET_DNSPARSER_TYPE_MX:
GNS_edit_dialog_mx (edc);
break;
- case GNUNET_DNSPARSER_TYPE_TXT:
- GNS_edit_dialog_txt (edc);
+ case GNUNET_DNSPARSER_TYPE_NS:
+ GNS_edit_dialog_ns (edc);
break;
- case GNUNET_DNSPARSER_TYPE_AAAA:
- GNS_edit_dialog_aaaa (edc);
+ case GNUNET_DNSPARSER_TYPE_SOA:
+ GNS_edit_dialog_soa (edc);
break;
- case GNUNET_NAMESTORE_TYPE_LEHO:
- GNS_edit_dialog_leho (edc);
+ case GNUNET_DNSPARSER_TYPE_SRV:
+ GNS_edit_dialog_srv (edc);
break;
- case GNUNET_NAMESTORE_TYPE_PKEY:
- GNS_edit_dialog_pkey (edc);
+ case GNUNET_DNSPARSER_TYPE_TXT:
+ GNS_edit_dialog_txt (edc);
break;
- case GNUNET_DNSPARSER_TYPE_SOA:
- case GNUNET_DNSPARSER_TYPE_SRV:
case GNUNET_NAMESTORE_TYPE_VPN:
+ GNS_edit_dialog_vpn (edc);
+ break;
case GNUNET_DNSPARSER_TYPE_TLSA:
default:
- GNUNET_break (0); /* FIXME - implement (#2465) */
+ GNUNET_break (0);
edc->cont (edc, GTK_RESPONSE_CANCEL); /* treat as 'cancel' */
break;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r25242 - in gnunet-gtk: contrib src/setup,
gnunet <=