From 62039d815eef5a699cb7d78a36a0a5e9eb5910c8 Mon Sep 17 00:00:00 2001 From: Moritz Schulte Date: Thu, 16 Aug 2007 12:44:17 +0000 Subject: Implemented the STATUSFD mechanism. 2007-08-16 Moritz Schulte * command.c: Include "statusfd.h". (cmd_statusfd): New function. (register_commands): New entry for STATUSFD command. (update_reader_status_file): Call statusfd_event_card_inserted and statusfd_event_card_removed on events. (scd_command_handler): Pass flags=3 to assuan_init_socket_server_ext (enabling fd passing). * statusfd.c, statusfd.h: New files. * Makefile.am (scdaemon_SOURCES): Added statusfd.c, statusfd.h. * NOTES-STATUSFD: New file. --- scd/statusfd.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 scd/statusfd.h (limited to 'scd/statusfd.h') diff --git a/scd/statusfd.h b/scd/statusfd.h new file mode 100644 index 000000000..93edd6ff4 --- /dev/null +++ b/scd/statusfd.h @@ -0,0 +1,28 @@ +/* statusfd.h - SCdaemon status fd handling + * Copyright (C) 2007 Free Software Foundation, Inc. + * + * This file is part of GnuPG. + * + * GnuPG is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * GnuPG is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + + +#ifndef GNUPG_SCD_STATUSFD_H +#define GNUPG_SCD_STATUSFD_H + +int statusfd_register (int fd); +void statusfd_event_card_inserted (int slot); +void statusfd_event_card_removed (int slot); + +#endif -- cgit v1.2.3