Line |
Branch |
Exec |
Source |
1 |
|
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- |
2 |
|
|
* |
3 |
|
|
* Copyright (C) 2020 Canonical Ltd. |
4 |
|
|
* |
5 |
|
|
* This program is free software; you can redistribute it and/or modify |
6 |
|
|
* it under the terms of the GNU General Public License as published by |
7 |
|
|
* the Free Software Foundation; either version 2 of the License, or |
8 |
|
|
* (at your option) any later version. |
9 |
|
|
* |
10 |
|
|
* This program is distributed in the hope that it will be useful, |
11 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
|
|
* GNU General Public License for more details. |
14 |
|
|
* |
15 |
|
|
* You should have received a copy of the GNU General Public License |
16 |
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>. |
17 |
|
|
* |
18 |
|
|
* SPDX-License-Identifier: GPL-3.0-or-later |
19 |
|
|
* |
20 |
|
|
* Authors: Marco Trevisan <marco.trevisan@canonical.com> |
21 |
|
|
*/ |
22 |
|
|
|
23 |
|
|
#pragma once |
24 |
|
|
|
25 |
|
|
#include <glib-object.h> |
26 |
|
|
#include <act/act.h> |
27 |
|
|
|
28 |
|
|
G_BEGIN_DECLS |
29 |
|
|
|
30 |
|
|
#define CC_TYPE_FINGERPRINT_MANAGER (cc_fingerprint_manager_get_type ()) |
31 |
|
|
|
32 |
|
✗ |
G_DECLARE_FINAL_TYPE (CcFingerprintManager, cc_fingerprint_manager, CC, FINGERPRINT_MANAGER, GObject) |
33 |
|
|
|
34 |
|
|
/** |
35 |
|
|
* CcFingerprintManager: |
36 |
|
|
* @CC_FINGERPRINT_STATE_NONE: Fingerprint recognition is not available |
37 |
|
|
* @CC_FINGERPRINT_STATE_UPDATING: Fingerprint recognition is being fetched |
38 |
|
|
* @CC_FINGERPRINT_STATE_ENABLED: Fingerprint recognition is enabled |
39 |
|
|
* @CC_FINGERPRINT_STATE_DISABLED: Fingerprint recognition is disabled |
40 |
|
|
* |
41 |
|
|
* The status of the fingerprint support. |
42 |
|
|
*/ |
43 |
|
|
typedef enum { |
44 |
|
|
CC_FINGERPRINT_STATE_NONE, |
45 |
|
|
CC_FINGERPRINT_STATE_UPDATING, |
46 |
|
|
CC_FINGERPRINT_STATE_ENABLED, |
47 |
|
|
CC_FINGERPRINT_STATE_DISABLED, |
48 |
|
|
} CcFingerprintState; |
49 |
|
|
|
50 |
|
|
typedef void (*CcFingerprintStateUpdated) (CcFingerprintManager *fp_manager, |
51 |
|
|
CcFingerprintState state, |
52 |
|
|
gpointer user_data, |
53 |
|
|
GError *error); |
54 |
|
|
|
55 |
|
|
CcFingerprintManager * cc_fingerprint_manager_new (ActUser *user); |
56 |
|
|
|
57 |
|
|
CcFingerprintState cc_fingerprint_manager_get_state (CcFingerprintManager *fp_manager); |
58 |
|
|
|
59 |
|
|
ActUser * cc_fingerprint_manager_get_user (CcFingerprintManager *fp_manager); |
60 |
|
|
|
61 |
|
|
void cc_fingerprint_manager_update_state (CcFingerprintManager *fp_manager, |
62 |
|
|
CcFingerprintStateUpdated callback, |
63 |
|
|
gpointer user_data); |
64 |
|
|
|
65 |
|
|
void cc_fingerprint_manager_get_devices (CcFingerprintManager *fp_manager, |
66 |
|
|
GCancellable *cancellable, |
67 |
|
|
GAsyncReadyCallback res, |
68 |
|
|
gpointer user_data); |
69 |
|
|
|
70 |
|
|
GList *cc_fingerprint_manager_get_devices_finish (CcFingerprintManager *fp_manager, |
71 |
|
|
GAsyncResult *res, |
72 |
|
|
GError **error); |
73 |
|
|
|
74 |
|
|
G_END_DECLS |
75 |
|
|
|