Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/domain.c | 2 +-
src/domain.h | 2 ++
src/events.c | 8 ++++----
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/domain.c b/src/domain.c
index ebcd142..850ea4a 100644
--- a/src/domain.c
+++ b/src/domain.c
@@ -573,7 +573,7 @@ virtDBusDomainRegister(virtDBusConnect *connect,
return sd_bus_add_fallback_vtable(bus,
NULL,
connect->domainPath,
- "org.libvirt.Domain",
+ VIRT_DBUS_DOMAIN_INTERFACE,
virt_domain_vtable,
virtDBusDomainLookup,
connect);
diff --git a/src/domain.h b/src/domain.h
index adadc6a..5ce592c 100644
--- a/src/domain.h
+++ b/src/domain.h
@@ -5,6 +5,8 @@
#include <libvirt/libvirt.h>
#include <systemd/sd-bus.h>
+#define VIRT_DBUS_DOMAIN_INTERFACE "org.libvirt.Domain"
+
int
virtDBusDomainRegister(virtDBusConnect *connect,
sd_bus *bus);
diff --git a/src/events.c b/src/events.c
index eee068c..681441d 100644
--- a/src/events.c
+++ b/src/events.c
@@ -85,7 +85,7 @@ virtDBusEventsDomainDeviceAdded(virConnectPtr connection
VIRT_ATTR_UNUSED,
r = sd_bus_message_new_signal(connect->bus,
&message,
path,
- "org.libvirt.Domain",
+ VIRT_DBUS_DOMAIN_INTERFACE,
"DeviceAdded");
if (r < 0)
return r;
@@ -113,7 +113,7 @@ virtDBusEventsDomainDeviceRemoved(virConnectPtr connection
VIRT_ATTR_UNUSED,
r = sd_bus_message_new_signal(connect->bus,
&message,
path,
- "org.libvirt.Domain",
+ VIRT_DBUS_DOMAIN_INTERFACE,
"DeviceRemoved");
if (r < 0)
return r;
@@ -143,7 +143,7 @@ virtDBusEventsDomainDiskChange(virConnectPtr connection
VIRT_ATTR_UNUSED,
r = sd_bus_message_new_signal(connect->bus,
&message,
path,
- "org.libvirt.Domain",
+ VIRT_DBUS_DOMAIN_INTERFACE,
"TrayChange");
if (r < 0)
return r;
@@ -187,7 +187,7 @@ virtDBusEventsDomainTrayChange(virConnectPtr connection
VIRT_ATTR_UNUSED,
r = sd_bus_message_new_signal(connect->bus,
&message,
path,
- "org.libvirt.Domain",
+ VIRT_DBUS_DOMAIN_INTERFACE,
"DiskChange");
if (r < 0)
return r;
--
2.14.3