summaryrefslogtreecommitdiff
path: root/gtk/smartcard-manager.c
AgeCommit message (Collapse)AuthorFilesLines
2014-07-23Don't use _GET_PRIVATE all the timeFabiano Fidêncio1-2/+2
Let's make use of the priv members in the structs, which are much much faster. Also, to keep the type-safety, the SPICE_IS_* macros were added in the public methods affected by this patch. Patch based on an old patch from Alexander Larsson (alexl@redhat.com).
2013-07-11smartcard: Only init manager onceChristophe Fergeau1-17/+29
The SpiceSmartcardManager is a singleton, so it does not make a lot of sense to try to init it multiple times. This commit adds a GOnce to ensure the manager is only init'ed once.
2013-07-11smartcard: Handle VCARD_EMUL_INIT_ALREADY_INITEDChristophe Fergeau1-1/+4
When initializing a software smartcard, vcard_emul_init() can report success, error, or indicate that initialization has already been done. In this last case, we would assume that an error occurred instead of behaving as if the initialization succeeded. vcard_emul_init() can end up being called multiple time if the smartcard channel gets destroyed and recreated during the lifetime of the application Fixes rhbz#815639
2013-06-26doc: add missing symbols and versionsMarc-André Lureau1-0/+6
2013-06-24smartcard: Move down spice_smartcard_reader_is_software bodyChristophe Fergeau1-15/+15
It's more consistent to have it close to spice_smartcard_reader_insert_card() et al.
2013-06-24Add spice_smartcard_manager_get_readers()Christophe Fergeau1-0/+44
This returns the list of smartcard readers known to a given SpiceSmartcardManager. This is useful to check whether a software smartcard reader is available or not.
2013-06-24smartcard: Add methods to act on software readersChristophe Fergeau1-10/+63
Currently, the methods to insert/remove smartcards from a software smartcard reader are global to the SpiceSmartcardManager singleton rather than acting on a SpiceSmartcardreader object. This commit adds insert/remove methods acting on such objects.
2013-06-24smartcard: Report failure when software reader is missingChristophe Fergeau1-2/+4
As there is no easy way to know if the SpiceSmartcardManager has an associated software reader or not, it's better to report failure instead of g_return_if_fail on attempts to use spice_smartcard_manager_insert/remove_card with no software reader available.
2013-02-26smartcard: do not register monitor before smartcard initMarc-André Lureau1-6/+14
Never call vevent_get_next_vevent() before calling vcard_emul_init() Some mutexes are initialized in vevent_queue_init(), during emul_init()
2013-02-26smartcard: trivial cleanupMarc-André Lureau1-7/+7
2013-01-28Fix a bunch of gtkdoc/giscan warningsMarc-André Lureau1-4/+4
2011-12-09build: fix build issue because of double declarationMarc-André Lureau1-2/+0
Patch based on Mageia, provided by Olav Vitters. https://bugzilla.freedesktop.org/show_bug.cgi?id=43457
2011-11-26Fix get_type() with --disable-smartcardMarc-André Lureau1-1/+2
It's quite a bad hack, but I can't think of anything really better Without this patch, g-ir-scanner introspection hangs with: GLib-GObject-CRITICAL **: g_boxed_type_register_static: assertion `boxed_copy != NULL' failed GLib-CRITICAL **: g_once_init_leave: assertion `result != 0' failed GLib-GObject-WARNING **: gsignal.c:1585: parameter 1 of type `<invalid>' for sig nal "SpiceSmartcardManager::reader_added" is not a value type
2011-11-23Fix a few g-ir-scanner warningsMarc-André Lureau1-1/+1
2011-09-23build: move G_DEFINE_BOXED in glib-compat.h and fix build with old glibMarc-André Lureau1-0/+2
2011-09-01Drop VOID:BOXED user marshallerHans de Goede1-4/+4
We were generating a user marshaller for VOID:BOXED, but there is a standard marshaller for that, use that instead. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-08-31doc: various improvementsMarc-André Lureau1-2/+2
2011-08-30Rename my_foo private datatypes to MyFooPrivateHans de Goede1-5/+5
We were using the gobject standard notation of MyFooPrivate everywhere except for 3 places, this brings these 3 into sync, with what we do elsewhere. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2011-07-13gtk/doc: improve the generated gtk-doc a bitMarc-André Lureau1-1/+1
2011-07-13smartcard: add smartcard API docChristophe Fergeau1-5/+48
2011-07-07gtk/smartcard: make smartcard init asyncMarc-André Lureau1-8/+90
2011-07-05gtk/smartcard-manager: remove useless trailing ;Marc-André Lureau1-3/+3
2011-07-05gtk: s/SmartCard/Smartcard/gMarc-André Lureau1-45/+45
2011-07-01prepend smartcard cmdline options with --smartcardChristophe Fergeau1-2/+2
This is consistent with what spicec does, and is also less confusing since other certificates can be passed on the command line (for client/server host authentication).
2011-06-28gtk/smartcard: make cacard dependency optional without breaking APIMarc-André Lureau1-5/+47
2011-06-26gtk/smartcard: remove g_assertMarc-André Lureau1-1/+1
2011-06-23gtk/smartcard: add a couple of debugMarc-André Lureau1-0/+5
2011-06-23gtk/smartcard: simplify a little spice_smartcard_manager_init_libcacardMarc-André Lureau1-10/+15
2011-06-23add software smartcard reader supportChristophe Fergeau1-1/+50
2011-06-23use user-provided certificates when init'ing libcacardChristophe Fergeau1-1/+39
2011-06-23initialize libcacardChristophe Fergeau1-0/+7
2011-06-22emit signals in reaction to libcacard eventsChristophe Fergeau1-1/+30
2011-06-22add signals for smartcard eventsChristophe Fergeau1-1/+84
Add signals which will be emitted when a reader appears/disappears, or when a smartcard is inserted/removed.
2011-06-22add boxed type for VReaderChristophe Fergeau1-0/+1
VReader is a type defined in libcacard which contains all the information we need ot handle card readers. Since it's refcounted, we can make it a boxed type for use in signals.
2011-06-22add smartcard monitor GSourceChristophe Fergeau1-1/+117
This source gets events from libcacard and inserts them into a regular glib mainloop. The smartcard manager will then emit signals in reaction to the events it got from libcacard.
2011-06-22add smartcard channel and smartcard manager skeletonsChristophe Fergeau1-0/+108