aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/service-mocks/accounts-mock/CMakeLists.txt8
-rw-r--r--tests/service-mocks/accounts-mock/com.ubuntu.AccountsService.Sound.Mock.xml8
2 files changed, 13 insertions, 3 deletions
diff --git a/tests/service-mocks/accounts-mock/CMakeLists.txt b/tests/service-mocks/accounts-mock/CMakeLists.txt
index ee06146..18f5084 100644
--- a/tests/service-mocks/accounts-mock/CMakeLists.txt
+++ b/tests/service-mocks/accounts-mock/CMakeLists.txt
@@ -5,13 +5,15 @@ find_package(Qt5DBus REQUIRED)
include_directories(${Qt5DBus_INCLUDE_DIRS}
"${CMAKE_SOURCE_DIR}/tests/service-mocks")
+add_definitions(-DQT_NO_KEYWORDS=1)
+
if(EXISTS "/usr/share/accountsservice/interfaces/com.ubuntu.AccountsService.SecurityPrivacy.xml")
add_definitions(-DHAS_UT_ACCTSERVICE_SOUND_SETTINGS)
+ set(dbusinterface_sound_xml "com.ubuntu.AccountsService.Sound.Mock.xml")
+else()
+ set(dbusinterface_sound_xml "org.ayatana.AccountsService.Sound.Mock.xml")
endif()
-add_definitions(-DQT_NO_KEYWORDS=1)
-
-set(dbusinterface_sound_xml "org.ayatana.AccountsService.Sound.Mock.xml")
set_source_files_properties(${dbusinterface_sound_xml} PROPERTIES
CLASSNAME AccountsServiceSoundMockInterface)
diff --git a/tests/service-mocks/accounts-mock/com.ubuntu.AccountsService.Sound.Mock.xml b/tests/service-mocks/accounts-mock/com.ubuntu.AccountsService.Sound.Mock.xml
new file mode 100644
index 0000000..da9e8aa
--- /dev/null
+++ b/tests/service-mocks/accounts-mock/com.ubuntu.AccountsService.Sound.Mock.xml
@@ -0,0 +1,8 @@
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
+<node>
+ <interface name="com.ubuntu.AccountsService.Sound">
+ <property name="Volume" type="d" access="readwrite"/>
+ <property name="LastRunningPlayer" type="s" access="readwrite"/>
+ </interface>
+</node>
+