Line | Branch | Exec | Source |
---|---|---|---|
1 | /* | ||
2 | * FpContext - A FPrint context | ||
3 | * Copyright (C) 2019 Benjamin Berg <bberg@redhat.com> | ||
4 | * | ||
5 | * This library is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU Lesser General Public | ||
7 | * License as published by the Free Software Foundation; either | ||
8 | * version 2.1 of the License, or (at your option) any later version. | ||
9 | * | ||
10 | * This library 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 GNU | ||
13 | * Lesser General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU Lesser General Public | ||
16 | * License along with this library; if not, write to the Free Software | ||
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
18 | */ | ||
19 | |||
20 | #pragma once | ||
21 | |||
22 | #include "fp-device.h" | ||
23 | |||
24 | G_BEGIN_DECLS | ||
25 | |||
26 | #define FP_TYPE_CONTEXT (fp_context_get_type ()) | ||
27 |
5/10✓ Branch 0 taken 1 times.
✓ Branch 1 taken 321 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 322 times.
✗ Branch 4 not taken.
✗ Branch 5 not taken.
✓ Branch 6 taken 322 times.
✗ Branch 7 not taken.
✓ Branch 9 taken 1 times.
✗ Branch 10 not taken.
|
325 | G_DECLARE_DERIVABLE_TYPE (FpContext, fp_context, FP, CONTEXT, GObject) |
28 | |||
29 | /** | ||
30 | * FpContextClass: | ||
31 | * @device_added: Called when a new device is added | ||
32 | * @device_removed: Called when a device is removed | ||
33 | * | ||
34 | * Class structure for #FpContext instances. | ||
35 | */ | ||
36 | struct _FpContextClass | ||
37 | { | ||
38 | GObjectClass parent_class; | ||
39 | |||
40 | void (*device_added) (FpContext *context, | ||
41 | FpDevice *device); | ||
42 | void (*device_removed) (FpContext *context, | ||
43 | FpDevice *device); | ||
44 | }; | ||
45 | |||
46 | FpContext *fp_context_new (void); | ||
47 | |||
48 | void fp_context_enumerate (FpContext *context); | ||
49 | |||
50 | GPtrArray *fp_context_get_devices (FpContext *context); | ||
51 | |||
52 | G_END_DECLS | ||
53 |