summaryrefslogtreecommitdiffstats
path: root/scd/scdaemon.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2019-06-21 10:47:45 +0200
committerWerner Koch <wk@gnupg.org>2019-06-21 11:42:59 +0200
commit91e2931caac9b914efa0a4524effaaa5948ebd00 (patch)
tree87f0209484396fcbb26d1c1f65fff620b79be7d5 /scd/scdaemon.h
parentscd: Simplify inclusion of app-common.h. (diff)
downloadgnupg2-91e2931caac9b914efa0a4524effaaa5948ebd00.tar.xz
gnupg2-91e2931caac9b914efa0a4524effaaa5948ebd00.zip
scd: Track the currently selected app.
* scd/scdaemon.h (struct server_control_s): Add 'current_apptype'. * scd/command.c (scd_clear_current_app): New. * scd/app.c (app_new_register): Set it. (deallocate_card): Clear it. -- Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'scd/scdaemon.h')
-rw-r--r--scd/scdaemon.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/scd/scdaemon.h b/scd/scdaemon.h
index d9c476d52..7ebf6b58d 100644
--- a/scd/scdaemon.h
+++ b/scd/scdaemon.h
@@ -106,6 +106,11 @@ struct server_control_s
application context. */
struct card_ctx_s *card_ctx;
+ /* The currently active application for this context. We need to
+ * knw this for cards which are abale to swicth on the fly between
+ * apps. */
+ apptype_t current_apptype;
+
/* Helper to store the value we are going to sign */
struct
{
@@ -122,6 +127,7 @@ const char *scd_get_socket_name (void);
/*-- command.c --*/
gpg_error_t initialize_module_command (void);
int scd_command_handler (ctrl_t, int);
+void scd_clear_current_app (card_t card);
void send_status_info (ctrl_t ctrl, const char *keyword, ...)
GPGRT_ATTR_SENTINEL(1);
void send_status_direct (ctrl_t ctrl, const char *keyword, const char *args);