diff options
Diffstat (limited to 'src/cups-pk-helper-mechanism.c')
-rw-r--r-- | src/cups-pk-helper-mechanism.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/cups-pk-helper-mechanism.c b/src/cups-pk-helper-mechanism.c index 0857524..d4b6a38 100644 --- a/src/cups-pk-helper-mechanism.c +++ b/src/cups-pk-helper-mechanism.c @@ -1166,3 +1166,27 @@ cph_mechanism_job_set_hold_until (CphMechanism *mechanism, return TRUE; } + +gboolean +cph_mechanism_devices_get (CphMechanism *mechanism, + int timeout, + const char *include_schemes, + const char *exclude_schemes, + DBusGMethodInvocation *context) +{ + GHashTable *devices; + + reset_killtimer (mechanism); + + if (!_check_polkit_for_action (mechanism, context, "devices-get")) + return FALSE; + + devices = cph_cups_devices_get (mechanism->priv->cups, + timeout, + include_schemes, + exclude_schemes); + _cph_mechanism_return_error_and_value (mechanism, context, + devices == NULL, devices); + + return TRUE; +} |