Coverage Report

Created: 2025-11-24 06:59

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/work/fu-common-struct.c
Line
Count
Source
1
/* auto-generated, do not modify */
2
#include "config.h"
3
4
#include <glib.h>
5
6
#include "fu-common-struct.h"
7
8
#ifdef G_LOG_DOMAIN
9
  #undef G_LOG_DOMAIN
10
#endif
11
#define G_LOG_DOMAIN "FuStruct"
12
13
14
const gchar *
15
fu_power_state_to_string(FuPowerState val)
16
0
{
17
0
    if (val == FU_POWER_STATE_UNKNOWN)
18
0
        return "unknown";
19
0
    if (val == FU_POWER_STATE_AC)
20
0
        return "ac";
21
0
    if (val == FU_POWER_STATE_BATTERY)
22
0
        return "battery";
23
0
    return NULL;
24
0
}
25
26
const gchar *
27
fu_lid_state_to_string(FuLidState val)
28
0
{
29
0
    if (val == FU_LID_STATE_UNKNOWN)
30
0
        return "unknown";
31
0
    if (val == FU_LID_STATE_OPEN)
32
0
        return "open";
33
0
    if (val == FU_LID_STATE_CLOSED)
34
0
        return "closed";
35
0
    return NULL;
36
0
}
37
38
const gchar *
39
fu_display_state_to_string(FuDisplayState val)
40
0
{
41
0
    if (val == FU_DISPLAY_STATE_UNKNOWN)
42
0
        return "unknown";
43
0
    if (val == FU_DISPLAY_STATE_CONNECTED)
44
0
        return "connected";
45
0
    if (val == FU_DISPLAY_STATE_DISCONNECTED)
46
0
        return "disconnected";
47
0
    return NULL;
48
0
}
49
FuDisplayState
50
fu_display_state_from_string(const gchar *val)
51
0
{
52
0
    if (g_strcmp0(val, "unknown") == 0)
53
0
        return FU_DISPLAY_STATE_UNKNOWN;
54
0
    if (g_strcmp0(val, "connected") == 0)
55
0
        return FU_DISPLAY_STATE_CONNECTED;
56
0
    if (g_strcmp0(val, "disconnected") == 0)
57
0
        return FU_DISPLAY_STATE_DISCONNECTED;
58
0
    return FU_DISPLAY_STATE_UNKNOWN;
59
0
}