Line |
Branch |
Exec |
Source |
1 |
|
|
/* |
2 |
|
|
* Copyright © 2017 Red Hat, Inc |
3 |
|
|
* |
4 |
|
|
* This program is free software; you can redistribute it and/or |
5 |
|
|
* modify it under the terms of the GNU Lesser General Public |
6 |
|
|
* License as published by the Free Software Foundation; either |
7 |
|
|
* version 2.1 of the License, or (at your option) any later version. |
8 |
|
|
* |
9 |
|
|
* This library is distributed in the hope that it will be useful, |
10 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 |
|
|
* Lesser General Public License for more details. |
13 |
|
|
* |
14 |
|
|
* You should have received a copy of the GNU Lesser General Public |
15 |
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>. |
16 |
|
|
* |
17 |
|
|
* Authors: |
18 |
|
|
* Christian J. Kellner <christian@kellner.me> |
19 |
|
|
*/ |
20 |
|
|
|
21 |
|
|
#pragma once |
22 |
|
|
|
23 |
|
|
#include "bolt-enums.h" |
24 |
|
|
#include "bolt-proxy.h" |
25 |
|
|
|
26 |
|
|
G_BEGIN_DECLS |
27 |
|
|
|
28 |
|
|
#define BOLT_TYPE_DEVICE bolt_device_get_type () |
29 |
|
✗ |
G_DECLARE_FINAL_TYPE (BoltDevice, bolt_device, BOLT, DEVICE, BoltProxy); |
30 |
|
|
|
31 |
|
|
BoltDevice * bolt_device_new_for_object_path (GDBusConnection *bus, |
32 |
|
|
const char *path, |
33 |
|
|
GCancellable *cancellable, |
34 |
|
|
GError **error); |
35 |
|
|
|
36 |
|
|
gboolean bolt_device_authorize (BoltDevice *dev, |
37 |
|
|
BoltAuthCtrl flags, |
38 |
|
|
GCancellable *cancellable, |
39 |
|
|
GError **error); |
40 |
|
|
|
41 |
|
|
void bolt_device_authorize_async (BoltDevice *dev, |
42 |
|
|
BoltAuthCtrl flags, |
43 |
|
|
GCancellable *cancellable, |
44 |
|
|
GAsyncReadyCallback callback, |
45 |
|
|
gpointer user_data); |
46 |
|
|
|
47 |
|
|
gboolean bolt_device_authorize_finish (BoltDevice *dev, |
48 |
|
|
GAsyncResult *res, |
49 |
|
|
GError **error); |
50 |
|
|
|
51 |
|
|
/* getter */ |
52 |
|
|
const char * bolt_device_get_uid (BoltDevice *dev); |
53 |
|
|
|
54 |
|
|
const char * bolt_device_get_name (BoltDevice *dev); |
55 |
|
|
|
56 |
|
|
const char * bolt_device_get_vendor (BoltDevice *dev); |
57 |
|
|
|
58 |
|
|
BoltDeviceType bolt_device_get_device_type (BoltDevice *dev); |
59 |
|
|
|
60 |
|
|
BoltStatus bolt_device_get_status (BoltDevice *dev); |
61 |
|
|
|
62 |
|
|
BoltAuthFlags bolt_device_get_authflags (BoltDevice *dev); |
63 |
|
|
|
64 |
|
|
const char * bolt_device_get_parent (BoltDevice *dev); |
65 |
|
|
|
66 |
|
|
const char * bolt_device_get_syspath (BoltDevice *dev); |
67 |
|
|
|
68 |
|
|
guint64 bolt_device_get_conntime (BoltDevice *dev); |
69 |
|
|
|
70 |
|
|
guint64 bolt_device_get_authtime (BoltDevice *dev); |
71 |
|
|
|
72 |
|
|
gboolean bolt_device_is_stored (BoltDevice *dev); |
73 |
|
|
|
74 |
|
|
BoltPolicy bolt_device_get_policy (BoltDevice *dev); |
75 |
|
|
|
76 |
|
|
BoltKeyState bolt_device_get_keystate (BoltDevice *dev); |
77 |
|
|
|
78 |
|
|
guint64 bolt_device_get_storetime (BoltDevice *dev); |
79 |
|
|
|
80 |
|
|
const char * bolt_device_get_label (BoltDevice *dev); |
81 |
|
|
|
82 |
|
|
/* derived getter */ |
83 |
|
|
char * bolt_device_get_display_name (BoltDevice *dev); |
84 |
|
|
|
85 |
|
|
guint64 bolt_device_get_timestamp (BoltDevice *dev); |
86 |
|
|
|
87 |
|
|
G_END_DECLS |
88 |
|
|
|