aboutsummaryrefslogtreecommitdiff
path: root/tests/service-mocks/accounts-mock
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-01-13 01:50:05 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-01-13 01:50:05 +0100
commit06517ee7ab924755e19962da1eb3ed2882036a97 (patch)
tree914e1bc4e6752995eff40a100601eb55b8379c96 /tests/service-mocks/accounts-mock
parent828239e919f980ef2f1129d780208c987dada27a (diff)
downloadayatana-indicator-sound-06517ee7ab924755e19962da1eb3ed2882036a97.tar.gz
ayatana-indicator-sound-06517ee7ab924755e19962da1eb3ed2882036a97.tar.bz2
ayatana-indicator-sound-06517ee7ab924755e19962da1eb3ed2882036a97.zip
tests/service-mocks/: Set ACCOUNTS_SOUND_INTERFACE depending on if we run on Ubuntu or other distro.
Diffstat (limited to 'tests/service-mocks/accounts-mock')
-rw-r--r--tests/service-mocks/accounts-mock/AccountsDefs.h4
-rw-r--r--tests/service-mocks/accounts-mock/CMakeLists.txt4
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/service-mocks/accounts-mock/AccountsDefs.h b/tests/service-mocks/accounts-mock/AccountsDefs.h
index 9933af0..ca71f9d 100644
--- a/tests/service-mocks/accounts-mock/AccountsDefs.h
+++ b/tests/service-mocks/accounts-mock/AccountsDefs.h
@@ -28,7 +28,11 @@ namespace testing
constexpr const char ACCOUNTS_SERVICE[] = "org.freedesktop.Accounts";
constexpr const char USER_PATH[] = "/org/freedesktop/Accounts/UserTest";
constexpr const char ACCOUNTS_PATH[] = "/org/freedesktop/Accounts";
+#ifdef HAS_UT_ACCTSERVICE_SOUND_SETTINGS
+ constexpr const char ACCOUNTS_SOUND_INTERFACE[] = "com.canonical.AccountsService.Sound";
+#else
constexpr const char ACCOUNTS_SOUND_INTERFACE[] = "org.ayatana.AccountsService.Sound";
+#endif
} // namespace testing
} // namespace indicators
diff --git a/tests/service-mocks/accounts-mock/CMakeLists.txt b/tests/service-mocks/accounts-mock/CMakeLists.txt
index 6eb9fb5..ee06146 100644
--- a/tests/service-mocks/accounts-mock/CMakeLists.txt
+++ b/tests/service-mocks/accounts-mock/CMakeLists.txt
@@ -5,6 +5,10 @@ find_package(Qt5DBus REQUIRED)
include_directories(${Qt5DBus_INCLUDE_DIRS}
"${CMAKE_SOURCE_DIR}/tests/service-mocks")
+if(EXISTS "/usr/share/accountsservice/interfaces/com.ubuntu.AccountsService.SecurityPrivacy.xml")
+ add_definitions(-DHAS_UT_ACCTSERVICE_SOUND_SETTINGS)
+endif()
+
add_definitions(-DQT_NO_KEYWORDS=1)
set(dbusinterface_sound_xml "org.ayatana.AccountsService.Sound.Mock.xml")