GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 2 / 0 / 2
Functions: 100.0% 1 / 0 / 1
Branches: 50.0% 7 / 0 / 14

libfprint/fp-context.h
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
7/14
None:
✓ Branch 5 → 6 taken 1 time.
✗ Branch 5 → 7 not taken.
✓ Branch 8 → 9 taken 1 time.
✗ Branch 8 → 10 not taken.
✓ Branch 11 → 12 taken 1 time.
✗ Branch 11 → 13 not taken.
✓ Branch 19 → 20 taken 1 time.
✗ Branch 19 → 21 not taken.
FP_IS_CONTEXT:
✓ Branch 3 → 4 taken 321 times.
✗ Branch 3 → 7 not taken.
✓ Branch 4 → 5 taken 321 times.
✗ Branch 4 → 6 not taken.
✗ Branch 5 → 6 not taken.
✓ Branch 5 → 7 taken 321 times.
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