From b29b8bc202979eed83846f55c6de34f7461ed15d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 29 Mar 2013 23:20:32 +0100 Subject: [PATCH] bus: add C++ wrappers to public header files --- src/libsystemd-bus/sd-bus-protocol.h | 8 ++++++++ src/libsystemd-bus/sd-bus.h | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/libsystemd-bus/sd-bus-protocol.h b/src/libsystemd-bus/sd-bus-protocol.h index ac4d0b1dc..7922f6b70 100644 --- a/src/libsystemd-bus/sd-bus-protocol.h +++ b/src/libsystemd-bus/sd-bus-protocol.h @@ -24,6 +24,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + /* Types of message */ enum { @@ -142,4 +146,8 @@ enum { " \n" \ "\n" +#ifdef __cplusplus +} +#endif + #endif diff --git a/src/libsystemd-bus/sd-bus.h b/src/libsystemd-bus/sd-bus.h index 08c5e5423..148a99c86 100644 --- a/src/libsystemd-bus/sd-bus.h +++ b/src/libsystemd-bus/sd-bus.h @@ -28,16 +28,20 @@ #include #include "sd-bus-protocol.h" +#ifdef __cplusplus +extern "C" { +#endif + /* TODO: * - server side * - allow installing match callbacks * - anonymous auth - * - default policy * * Later: * - add page donation logic * - api for appending/reading fixed arrays * - merge busctl into systemctl or so? + * - default policy (allow uid == 0 and our own uid) */ typedef struct sd_bus sd_bus; @@ -165,4 +169,8 @@ int sd_bus_error_copy(sd_bus_error *dest, const sd_bus_error *e); int sd_bus_error_is_set(const sd_bus_error *e); int sd_bus_error_has_name(const sd_bus_error *e, const char *name); +#ifdef __cplusplus +} +#endif + #endif -- 2.30.2