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.
This commit is contained in:
Bastien Nocera
2008-05-14 01:03:14 +01:00
committed by Daniel Drake
parent 3ad569b66a
commit 017f770480
3 changed files with 53 additions and 41 deletions

View File

@ -237,6 +237,12 @@ int main(int argc, char **argv)
/* create the one instance of the Manager object to be shared between
* all fprintd users */
manager = fprint_manager_new();
error = fprint_manager_get_error (manager);
if (error != NULL) {
g_error("Couldn't create manager object: %s", error->message);
g_error_free (error);
return 1;
}
driver_proxy = dbus_g_proxy_new_for_name(fprintd_dbus_conn,
DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS);