summaryrefslogtreecommitdiff
path: root/src/anastasis/anastasis-gtk_action.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-04-05 17:16:11 +0200
committerChristian Grothoff <christian@grothoff.org>2022-04-05 17:16:11 +0200
commit47b7418ded6f139d22404aeea72aa8f48fdcade8 (patch)
tree1bff723951d64fff0cb8786bc456e9defe3a68a3 /src/anastasis/anastasis-gtk_action.c
parent5a65479bd5edc3b7898e57106c39fd28cf0fd9e9 (diff)
downloadanastasis-gtk-47b7418ded6f139d22404aeea72aa8f48fdcade8.tar.gz
anastasis-gtk-47b7418ded6f139d22404aeea72aa8f48fdcade8.tar.bz2
anastasis-gtk-47b7418ded6f139d22404aeea72aa8f48fdcade8.zip
adapt to latest GNUnet API: GNUNET_JSON_spec_mark_optional() changed
Diffstat (limited to 'src/anastasis/anastasis-gtk_action.c')
-rw-r--r--src/anastasis/anastasis-gtk_action.c110
1 files changed, 71 insertions, 39 deletions
diff --git a/src/anastasis/anastasis-gtk_action.c b/src/anastasis/anastasis-gtk_action.c
index 7beabbf..efca017 100644
--- a/src/anastasis/anastasis-gtk_action.c
+++ b/src/anastasis/anastasis-gtk_action.c
@@ -71,11 +71,12 @@ lookup_provider_name (const char *provider_url)
{
json_t *providers;
json_t *provider;
- const char *name;
+ const char *name = NULL;
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("business_name",
- &name)),
+ &name),
+ NULL),
GNUNET_JSON_spec_end ()
};
@@ -519,13 +520,16 @@ action_user_attributes_collecting (void)
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("widget",
- &widget_name)),
+ &widget_name),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_bool ("optional",
- &optional)),
+ &optional),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("tooltip",
- &attr_tooltip)),
+ &attr_tooltip),
+ NULL),
GNUNET_JSON_spec_string ("type",
&attr_type),
GNUNET_JSON_spec_string ("uuid",
@@ -534,7 +538,8 @@ action_user_attributes_collecting (void)
&attr_name),
GNUNET_JSON_spec_mark_optional (
TALER_JSON_spec_i18n_str ("label",
- &attr_label)),
+ &attr_label),
+ NULL),
GNUNET_JSON_spec_end ()
};
struct GNUNET_HashCode uh;
@@ -720,16 +725,20 @@ action_authentications_editing (void)
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_uint32 ("error_code",
- &ec)),
+ &ec),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_json ("methods",
- &methods)),
+ &methods),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_uint32 ("http_status",
- &hc)),
+ &hc),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_bool ("disabled",
- &disabled)),
+ &disabled),
+ NULL),
GNUNET_JSON_spec_end ()
};
@@ -1260,10 +1269,12 @@ action_secret_editing (void)
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_json ("core_secret",
- &jsecret)),
+ &jsecret),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("secret_name",
- &name)),
+ &name),
+ NULL),
GNUNET_JSON_spec_end ()
};
@@ -1289,13 +1300,16 @@ action_secret_editing (void)
struct GNUNET_JSON_Specification sspec[] = {
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("text",
- &text)),
+ &text),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("mime",
- &mime)),
+ &mime),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("filename",
- &filename)),
+ &filename),
+ NULL),
GNUNET_JSON_spec_end ()
};
@@ -1696,19 +1710,22 @@ show_challenge_feedback (const char *uuid,
const char *state;
const char *hint = NULL;
const char *taler_pay_uri = NULL;
- uint32_t ec = 0;
+ uint32_t ec = TALER_EC_NONE;
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_string ("state",
&state),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("taler_pay_uri",
- &taler_pay_uri)),
+ &taler_pay_uri),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("display_hint",
- &hint)),
+ &hint),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_uint32 ("error_code",
- &ec)),
+ &ec),
+ NULL),
GNUNET_JSON_spec_end ()
};
@@ -2256,10 +2273,12 @@ add_challenge (GtkBox *challenge_box,
&iuuid),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_bool ("async",
- &async)),
+ &async),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_bool ("solved",
- &solved)),
+ &solved),
+ NULL),
GNUNET_JSON_spec_end ()
};
bool ok = true;
@@ -2565,7 +2584,8 @@ action_challenge_selecting (void)
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_bool ("async",
- &async)),
+ &async),
+ NULL),
GNUNET_JSON_spec_end ()
};
const json_t *ks;
@@ -2640,13 +2660,14 @@ action_challenge_paying (void)
&state),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("taler_pay_uri",
- &payto)),
+ &payto),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("provider",
- &provider)),
- GNUNET_JSON_spec_mark_optional (
- GNUNET_JSON_spec_string ("payment_secret",
- &ps)),
+ &provider),
+ NULL),
+ GNUNET_JSON_spec_string ("payment_secret",
+ &ps),
GNUNET_JSON_spec_end ()
};
GdkPixbuf *pb;
@@ -2752,7 +2773,7 @@ render_feedback (GtkBuilder *builder,
const char *hint = NULL;
json_t *details = NULL;
const char *taler_pay_uri = NULL;
- uint32_t ec = 0;
+ uint32_t ec = TALER_EC_NONE;
uint32_t http_status = 0;
bool hide = false;
struct GNUNET_JSON_Specification spec[] = {
@@ -2760,22 +2781,28 @@ render_feedback (GtkBuilder *builder,
&state),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("taler_pay_uri",
- &taler_pay_uri)),
+ &taler_pay_uri),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_json ("details",
- &details)),
+ &details),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("redirect_url",
- &redirect_url)),
+ &redirect_url),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("hint",
- &hint)),
+ &hint),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_uint32 ("http_status",
- &http_status)),
+ &http_status),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_uint32 ("error_code",
- &ec)),
+ &ec),
+ NULL),
GNUNET_JSON_spec_end ()
};
GtkLabel *elabel;
@@ -2828,10 +2855,12 @@ render_feedback (GtkBuilder *builder,
&code),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("hint",
- &hint)),
+ &hint),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("detail",
- &detail)),
+ &detail),
+ NULL),
GNUNET_JSON_spec_end ()
};
@@ -3299,14 +3328,17 @@ action_recovery_finished (void)
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("mime",
- &mime)),
+ &mime),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("text",
- &text)),
+ &text),
+ NULL),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_varsize ("value",
&data,
- &data_size)),
+ &data_size),
+ NULL),
GNUNET_JSON_spec_end ()
};
GdkPixbuf *pb;