[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis-gtk] branch master updated: add application ID support
From: |
gnunet |
Subject: |
[taler-anastasis-gtk] branch master updated: add application ID support (-a command-line option) |
Date: |
Sun, 27 Feb 2022 11:59:16 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository anastasis-gtk.
The following commit(s) were added to refs/heads/master by this push:
new 94f31a2 add application ID support (-a command-line option)
94f31a2 is described below
commit 94f31a28be7041c4127df143f19f5fbdafc1d558
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Feb 27 11:59:13 2022 +0100
add application ID support (-a command-line option)
---
src/anastasis/anastasis-gtk.c | 12 ++++++++++++
src/anastasis/anastasis-gtk.h | 7 ++++++-
src/anastasis/anastasis-gtk_attributes.c | 4 ++++
3 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/src/anastasis/anastasis-gtk.c b/src/anastasis/anastasis-gtk.c
index 1ffc51a..182462f 100644
--- a/src/anastasis/anastasis-gtk.c
+++ b/src/anastasis/anastasis-gtk.c
@@ -45,6 +45,11 @@ struct ANASTASIS_PolicyDiscovery *AG_pd;
*/
const struct GNUNET_CONFIGURATION_Handle *AG_cfg;
+/**
+ * Application ID to include in the user attributes.
+ */
+char *AG_application_id;
+
/**
* Closure for #GNUNET_CURL_gnunet_scheduler_reschedule().
*/
@@ -253,10 +258,16 @@ main (int argc,
char *const *argv)
{
struct GNUNET_GETOPT_CommandLineOption options[] = {
+ GNUNET_GETOPT_option_string ('a',
+ "application",
+ "ID",
+ "set the application ID",
+ &AG_application_id),
GNUNET_GETOPT_OPTION_END
};
int ret;
+ AG_application_id = GNUNET_strdup ("anastasis-gtk");
if (GNUNET_OK !=
GNUNET_GTK_main_loop_start ("anastasis-gtk",
"GTK GUI for Anastasis",
@@ -268,6 +279,7 @@ main (int argc,
ret = 1;
else
ret = 0;
+ GNUNET_free (AG_application_id);
return ret;
}
diff --git a/src/anastasis/anastasis-gtk.h b/src/anastasis/anastasis-gtk.h
index 7c2bd78..b7a6b43 100644
--- a/src/anastasis/anastasis-gtk.h
+++ b/src/anastasis/anastasis-gtk.h
@@ -1,6 +1,6 @@
/*
This file is part of anastasis-gtk.
- Copyright (C) 2020 Anastasis SARL
+ Copyright (C) 2020-2022 Anastasis SARL
Anastasis is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
@@ -41,6 +41,11 @@ extern struct GNUNET_GTK_MainLoop *AG_ml;
*/
extern struct ANASTASIS_PolicyDiscovery *AG_pd;
+/**
+ * Application ID to include in the user attributes.
+ */
+extern char *AG_application_id;
+
/**
* Our configuration.
*/
diff --git a/src/anastasis/anastasis-gtk_attributes.c
b/src/anastasis/anastasis-gtk_attributes.c
index 1c1139f..14e790b 100644
--- a/src/anastasis/anastasis-gtk_attributes.c
+++ b/src/anastasis/anastasis-gtk_attributes.c
@@ -154,6 +154,10 @@ AG_collect_attributes (bool partial)
attr_name,
val));
}
+ GNUNET_assert (0 ==
+ json_object_set_new (result,
+ "application-id",
+ json_string (AG_application_id)));
return GNUNET_JSON_PACK (
GNUNET_JSON_pack_object_steal ("identity_attributes",
result));
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-anastasis-gtk] branch master updated: add application ID support (-a command-line option),
gnunet <=