/* securitytokenmonitor.h - monitor for security token insertion and * removal events * * Copyright (C) 2006 Ray Strode * * This program 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 2, or (at your option) * any later version. * * This program 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. */ #ifndef GDM_SECURITY_TOKEN_MONITOR_H #define GDM_SECURITY_TOKEN_MONITOR_H #include #include G_BEGIN_DECLS #define GDM_TYPE_SECURITY_TOKEN_MONITOR (gdm_security_token_monitor_get_type ()) #define GDM_SECURITY_TOKEN_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDM_TYPE_SECURITY_TOKEN_MONITOR, GdmSecurityTokenMonitor)) #define GDM_SECURITY_TOKEN_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDM_TYPE_SECURITY_TOKEN_MONITOR, GdmSecurityTokenMonitorClass)) #define GDM_IS_SECURITY_TOKEN_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDM_TYPE_SECURITY_TOKEN_MONITOR)) #define GDM_IS_SECURITY_TOKEN_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDM_TYPE_SECURITY_TOKEN_MONITOR)) #define GDM_SECURITY_TOKEN_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GDM_TYPE_SECURITY_TOKEN_MONITOR, GdmSecurityTokenMonitorClass)) #define GDM_SECURITY_TOKEN_MONITOR_ERROR (gdm_security_token_monitor_error_quark ()) typedef struct _GdmSecurityTokenMonitor GdmSecurityTokenMonitor; typedef struct _GdmSecurityTokenMonitorClass GdmSecurityTokenMonitorClass; typedef struct _GdmSecurityTokenMonitorPrivate GdmSecurityTokenMonitorPrivate; typedef enum _GdmSecurityTokenMonitorError GdmSecurityTokenMonitorError; typedef struct _GdmSecurityToken GdmSecurityToken; struct _GdmSecurityTokenMonitor { GObject parent; /*< private >*/ GdmSecurityTokenMonitorPrivate *priv; }; struct _GdmSecurityTokenMonitorClass { GObjectClass parent_class; /* Signals */ void (* security_token_inserted) (GdmSecurityTokenMonitor *monitor, GdmSecurityToken *token); void (* security_token_removed) (GdmSecurityTokenMonitor *monitor, GdmSecurityToken *token); void (* error) (GdmSecurityTokenMonitor *monitor, GError *error); }; enum _GdmSecurityTokenMonitorError { GDM_SECURITY_TOKEN_MONITOR_ERROR_GENERIC = 0, GDM_SECURITY_TOKEN_MONITOR_ERROR_WITH_NSS, GDM_SECURITY_TOKEN_MONITOR_ERROR_LOADING_DRIVER, }; GType gdm_security_token_monitor_get_type (void) G_GNUC_CONST; GQuark gdm_security_token_monitor_error_quark (void) G_GNUC_CONST; GdmSecurityTokenMonitor *gdm_security_token_monitor_new (void); gboolean gdm_security_token_monitor_start (GdmSecurityTokenMonitor *monitor, GError **error); void gdm_security_token_monitor_stop (GdmSecurityTokenMonitor *monitor); G_END_DECLS #endif /* GDM_SECURITY_TOKEN_MONITOR_H */