diff options
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 |