Coverage Report

Created: 2026-04-12 07:04

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/fwupd/libfwupdplugin/fu-hid-report.c
Line
Count
Source
1
/*
2
 * Copyright 2023 Richard Hughes <richard@hughsie.com>
3
 *
4
 * SPDX-License-Identifier: LGPL-2.1-or-later
5
 */
6
7
#define G_LOG_DOMAIN "FuHidDevice"
8
9
#include "config.h"
10
11
#include "fu-hid-report-item.h"
12
#include "fu-hid-report.h"
13
14
/**
15
 * FuHidReport:
16
 *
17
 * See also: [class@FuHidDescriptor]
18
 */
19
20
struct _FuHidReport {
21
  FuFirmware parent_instance;
22
};
23
24
5.18k
G_DEFINE_TYPE(FuHidReport, fu_hid_report, FU_TYPE_FIRMWARE)
25
5.18k
26
5.18k
static void
27
5.18k
fu_hid_report_init(FuHidReport *self)
28
5.18k
{
29
3.76k
  fu_firmware_add_flag(FU_FIRMWARE(self), FU_FIRMWARE_FLAG_DEDUPE_IDX);
30
3.76k
  fu_firmware_add_flag(FU_FIRMWARE(self), FU_FIRMWARE_FLAG_NO_AUTO_DETECTION);
31
3.76k
  fu_firmware_add_image_gtype(FU_FIRMWARE(self), FU_TYPE_HID_REPORT_ITEM);
32
3.76k
  fu_firmware_set_images_max(FU_FIRMWARE(self), G_MAXUINT8);
33
3.76k
}
34
35
static void
36
fu_hid_report_class_init(FuHidReportClass *klass)
37
1
{
38
1
}
39
40
/**
41
 * fu_hid_report_new:
42
 *
43
 * Creates a new HID report item
44
 *
45
 * Returns: (transfer full): a #FuHidReport
46
 *
47
 * Since: 1.9.4
48
 **/
49
FuHidReport *
50
fu_hid_report_new(void)
51
3.76k
{
52
3.76k
  return g_object_new(FU_TYPE_HID_REPORT, NULL);
53
3.76k
}