Commit graph

327 commits

Author SHA1 Message Date
Bastien Nocera
5e194488e7 The user that claims the device is the one we work on
When the user claims the device, get its uid and username,
and use this data to read/save from storage.
2008-05-22 17:55:16 +01:00
Bastien Nocera
8529a43b0d Save using storage
Save the fingerprint using the storage functions so we
can verify the data we enroll.
2008-05-22 17:55:16 +01:00
Bastien Nocera
b1b5e2b495 Kill ListEnrolledFingersFromStorage
Last FromStorage variant killed, we need to make sure all
the functions now use the storage functions internally,
otherwise we won't be able to load from the place we save.
2008-05-22 17:55:16 +01:00
Bastien Nocera
148b6fc676 Constify username
Fixes a few warnings on compilation
2008-05-22 17:55:16 +01:00
Bastien Nocera
5d4e23ab32 Kill LoadPrintDataFromStorage
First FromStorage variant to go
2008-05-22 17:55:15 +01:00
Bastien Nocera
7587105647 Add TODO items
Some thoughts on storage handling
2008-05-22 17:55:15 +01:00
Bastien Nocera
54583f4750 Don't hardcode username
We use the current user's username instead.
2008-05-22 17:55:15 +01:00
Bastien Nocera
7f592dd2e4 Fix return values for async methods
Async methods should return "out" variables using dbus_g_method_return(),
not through function parameters. Fixes crashing using those functions.
2008-05-22 17:55:15 +01:00
Bastien Nocera
c63f624a26 Async methods return void
Thanks to Richard Hughes for spotting this. Shouldn't
make any operational differences, as the return values
of those methods weren't used anyway.
2008-05-22 17:55:15 +01:00
Bastien Nocera
1748e5f484 Add user tracking when claiming a device
Mark all the methods on the device as async, so we
can get access to the associated DBusGMethodInvocation.

When claiming the device, remember the sender, and for every
API entry point, check that the sender is the same as the one
that made the original claim.

Trying to enroll a user whilst the device is already claimed
from another program will fail with:
** ERROR **: failed to claim device: Device was already claimed

This is the first step towards PolicyKit and multi-user support
2008-05-18 12:41:05 +01:00
Bastien Nocera
039c988f4b Fix warning on startup
When there are no errors on startup, we'd get a warning
as we were copying a NULL GError
2008-05-16 18:21:20 +01:00
Bastien Nocera
5d60894e69 Add support for --g-fatal-warnings
This makes debugging warnings from fprintd easier, uses
GOption as available since glib 2.6
2008-05-16 18:21:13 +01:00
Bastien Nocera
3a0152e124 Fix _get_error() in the manager
Fix wrong assumption of semantics when fp_discover_devs()
returns NULL.
2008-05-16 12:17:48 +01:00
Bastien Nocera
5dafd66eb8 Fix compilation after i18n support addition
Simply missing a po/Makefile.in in the config output, oopsie
2008-05-16 12:17:43 +01:00
Bastien Nocera
1919ca75f2 Use GObject-provided boilerplate
Clean up the device object by using G_DEFINE_TYPE
2008-05-14 16:07:32 +01:00
Bastien Nocera
017f770480 Clean up object creation code
Make all of FPrintManager's struct members private,
warn of errors using a _get_error() function, as object
creation can never fail.

The only error possible shouldn't really be an error though,
as it only means that no devices will be enumerated, but it
could tell us about newly plugged devices instead.
2008-05-14 16:07:25 +01:00
Bastien Nocera
3ad569b66a Add i18n support
This will be needed to get better error messages to
users of the D-Bus API. We use glib's builtin gettext
support. No strings marked as translatable yet, we'll
need to mark those user-visible strings carefully and
review them.
2008-05-14 16:07:20 +01:00
Bastien Nocera
6cbb079619 Make the daemon a system daemon
With this patch, and the D-Bus activation patches posted earlier the
fprintd daemon is started automatically when needed.

We should have a way to exit it nicely when there are no users
anymore as well...
2008-05-13 23:10:04 +01:00
Daniel Drake
822a2e5438 Require libfprint-0.1
To stop people trying to compile it with 0.0 :)
2008-05-13 18:20:42 +01:00
Bastien Nocera
aff2f2aacc D-Bus activation
Provide .conf and .service files for D-Bus to use, allowing fprintd to be
autostarted
2008-05-13 18:18:35 +01:00
Vasily Khoruzhick
1f54a0c363 Initial storage implementation
[dsd: changed from /etc/fprint to /var/lib/fprint]
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
2008-04-06 23:49:28 +01:00
Daniel Drake
2a1aa4e0c0 Rename examples to tests
Real clients won't have the xml available, so calling these "examples"
is not appropriate.
2008-03-09 10:51:48 +00:00
Daniel Drake
fc6b0c194c Add enrollment functionality 2008-03-06 16:37:19 +00:00
Daniel Drake
3e68c40e4e Present verify results with a signal 2008-03-06 13:12:34 +00:00
Daniel Drake
080e427651 Move to object oriented model
There is now a single Manager class shared between all apps.
Apps then share a collection of Device objects.
2008-03-05 23:52:33 +00:00
Daniel Drake
98c936dbdd Make claim and release asynchronous 2008-03-04 14:55:37 +00:00
Daniel Drake
b69cb4a705 Initial commit 2008-03-04 12:39:02 +00:00