• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

eclipse-bluechi / bluechi / 15045181532

15 May 2025 12:39PM UTC coverage: 37.505% (-44.9%) from 82.405%
15045181532

Pull #1072

github

web-flow
Merge 1d8b9dfa8 into 04834083b
Pull Request #1072: Prevent tmt from pruning coverage files

1888 of 5034 relevant lines covered (37.5%)

23.81 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/controller/proxy_monitor.h
1
/*
2
 * Copyright Contributors to the Eclipse BlueChi project
3
 *
4
 * SPDX-License-Identifier: LGPL-2.1-or-later
5
 */
6
#pragma once
7

8
#include "libbluechi/common/common.h"
9

10
#include "types.h"
11

12
struct ProxyMonitor {
13
        int ref_count;
14

15
        Node *node; /* weak ref */
16
        Subscription *subscription;
17

18
        bool added_dep;
19

20
        char *unit_name;
21
        Node *target_node;
22

23
        char *proxy_object_path;
24

25
        LIST_FIELDS(ProxyMonitor, monitors);
26
};
27

28
Subscription *create_proxy_monitor_subscription(ProxyMonitor *monitor, const char *node);
29

30
ProxyMonitor *proxy_monitor_new(
31
                Node *node, const char *target_node_name, const char *unit_name, const char *proxy_object_path);
32
ProxyMonitor *proxy_monitor_ref(ProxyMonitor *monitor);
33
void proxy_monitor_unref(ProxyMonitor *monitor);
34

35
int proxy_monitor_set_target_node(ProxyMonitor *monitor, Node *target_node);
36

37
void proxy_monitor_close(ProxyMonitor *monitor);
38

39
int proxy_monitor_on_unit_new(void *userdata, const char *node, const char *unit, const char *reason);
40
int proxy_monitor_on_unit_state_changed(
41
                void *userdata,
42
                const char *node,
43
                const char *unit,
44
                const char *active_state,
45
                const char *substate,
46
                const char *reason);
47
int proxy_monitor_on_unit_removed(void *userdata, const char *node, const char *unit, const char *reason);
48
int proxy_monitor_on_unit_property_changed(
49
                void *userdata, const char *node, const char *unit, const char *interface, sd_bus_message *m);
50

51
DEFINE_CLEANUP_FUNC(ProxyMonitor, proxy_monitor_unref)
×
52
#define _cleanup_proxy_monitor_ _cleanup_(proxy_monitor_unrefp)
53

54
void proxy_monitor_send_error(ProxyMonitor *monitor, const char *message);
55
int proxy_monitor_send_new(ProxyMonitor *monitor, const char *reason);
56
int proxy_monitor_send_removed(ProxyMonitor *monitor, const char *reason);
57
int proxy_monitor_send_state_changed(
58
                ProxyMonitor *monitor, const char *active_state, const char *substate, const char *reason);
59
int proxy_monitor_start_dep_unit(ProxyMonitor *monitor);
60
int proxy_monitor_stop_dep_unit(ProxyMonitor *monitor);
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc