aboutsummaryrefslogtreecommitdiff
path: root/tests/service-mocks
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
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')
-rw-r--r--tests/service-mocks/accounts-mock/AccountsDefs.h4
-rw-r--r--tests/service-mocks/accounts-mock/CMakeLists.txt4
-rw-r--r--tests/service-mocks/media-player-mpris-mock/CMakeLists.txt4
-rw-r--r--tests/service-mocks/media-player-mpris-mock/MediaPlayerMprisDefs.h4
4 files changed, 16 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")
diff --git a/tests/service-mocks/media-player-mpris-mock/CMakeLists.txt b/tests/service-mocks/media-player-mpris-mock/CMakeLists.txt
index b5f5861..f0c06e6 100644
--- a/tests/service-mocks/media-player-mpris-mock/CMakeLists.txt
+++ b/tests/service-mocks/media-player-mpris-mock/CMakeLists.txt
@@ -8,6 +8,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_mediaplayermpris_xml "org.mpris.MediaPlayer2.Player.xml")
diff --git a/tests/service-mocks/media-player-mpris-mock/MediaPlayerMprisDefs.h b/tests/service-mocks/media-player-mpris-mock/MediaPlayerMprisDefs.h
index a000c4e..6a53962 100644
--- a/tests/service-mocks/media-player-mpris-mock/MediaPlayerMprisDefs.h
+++ b/tests/service-mocks/media-player-mpris-mock/MediaPlayerMprisDefs.h
@@ -28,7 +28,11 @@ namespace testing
constexpr const char MEDIA_PLAYER_MPRIS_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