diff options
author | Robert Tari <robert@tari.in> | 2021-11-01 01:29:37 +0100 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2021-11-01 01:29:37 +0100 |
commit | 75fe9ada8fc68023abf7ba6563e0ead4d5e46b45 (patch) | |
tree | e7cba1631f8798e810547bd4f24273a8d7739e17 | |
parent | c589574a6c982febb768cc4830e8a63057e9b9f9 (diff) | |
download | ayatana-indicator-sound-75fe9ada8fc68023abf7ba6563e0ead4d5e46b45.tar.gz ayatana-indicator-sound-75fe9ada8fc68023abf7ba6563e0ead4d5e46b45.tar.bz2 ayatana-indicator-sound-75fe9ada8fc68023abf7ba6563e0ead4d5e46b45.zip |
Whitespace fix
-rw-r--r-- | src/accounts-service-system-sound-settings.vala | 4 | ||||
-rw-r--r-- | tests/accounts-service-mock.h | 168 |
2 files changed, 86 insertions, 86 deletions
diff --git a/src/accounts-service-system-sound-settings.vala b/src/accounts-service-system-sound-settings.vala index 9eb91c4..84320c5 100644 --- a/src/accounts-service-system-sound-settings.vala +++ b/src/accounts-service-system-sound-settings.vala @@ -19,6 +19,6 @@ [DBus (name = "com.ubuntu.touch.AccountsService.Sound")] public interface AccountsServiceSystemSoundSettings : Object { - // properties - public abstract bool silent_mode {owned get; set;} + // properties + public abstract bool silent_mode {owned get; set;} } diff --git a/tests/accounts-service-mock.h b/tests/accounts-service-mock.h index 5617593..95fdf62 100644 --- a/tests/accounts-service-mock.h +++ b/tests/accounts-service-mock.h @@ -22,101 +22,101 @@ class AccountsServiceMock { - DbusTestDbusMock * mock = nullptr; - DbusTestDbusMockObject * soundobj = nullptr; - DbusTestDbusMockObject * userobj = nullptr; - DbusTestDbusMockObject * syssoundobj = nullptr; + DbusTestDbusMock * mock = nullptr; + DbusTestDbusMockObject * soundobj = nullptr; + DbusTestDbusMockObject * userobj = nullptr; + DbusTestDbusMockObject * syssoundobj = nullptr; - public: - AccountsServiceMock () { - mock = dbus_test_dbus_mock_new("org.freedesktop.Accounts"); + public: + AccountsServiceMock () { + mock = dbus_test_dbus_mock_new("org.freedesktop.Accounts"); - dbus_test_task_set_bus(DBUS_TEST_TASK(mock), DBUS_TEST_SERVICE_BUS_SYSTEM); + dbus_test_task_set_bus(DBUS_TEST_TASK(mock), DBUS_TEST_SERVICE_BUS_SYSTEM); - DbusTestDbusMockObject * baseobj = dbus_test_dbus_mock_get_object(mock, "/org/freedesktop/Accounts", "org.freedesktop.Accounts", NULL); + DbusTestDbusMockObject * baseobj = dbus_test_dbus_mock_get_object(mock, "/org/freedesktop/Accounts", "org.freedesktop.Accounts", NULL); - dbus_test_dbus_mock_object_add_method(mock, baseobj, - "CacheUser", G_VARIANT_TYPE_STRING, G_VARIANT_TYPE_OBJECT_PATH, - "ret = dbus.ObjectPath('/user')\n", NULL); - dbus_test_dbus_mock_object_add_method(mock, baseobj, - "FindUserById", G_VARIANT_TYPE_INT64, G_VARIANT_TYPE_OBJECT_PATH, - "ret = dbus.ObjectPath('/user')\n", NULL); - dbus_test_dbus_mock_object_add_method(mock, baseobj, - "FindUserByName", G_VARIANT_TYPE_STRING, G_VARIANT_TYPE_OBJECT_PATH, - "ret = dbus.ObjectPath('/user')\n", NULL); - dbus_test_dbus_mock_object_add_method(mock, baseobj, - "ListCachedUsers", NULL, G_VARIANT_TYPE_OBJECT_PATH_ARRAY, - "ret = [ dbus.ObjectPath('/user') ]\n", NULL); - dbus_test_dbus_mock_object_add_method(mock, baseobj, - "UncacheUser", G_VARIANT_TYPE_STRING, NULL, - "", NULL); + dbus_test_dbus_mock_object_add_method(mock, baseobj, + "CacheUser", G_VARIANT_TYPE_STRING, G_VARIANT_TYPE_OBJECT_PATH, + "ret = dbus.ObjectPath('/user')\n", NULL); + dbus_test_dbus_mock_object_add_method(mock, baseobj, + "FindUserById", G_VARIANT_TYPE_INT64, G_VARIANT_TYPE_OBJECT_PATH, + "ret = dbus.ObjectPath('/user')\n", NULL); + dbus_test_dbus_mock_object_add_method(mock, baseobj, + "FindUserByName", G_VARIANT_TYPE_STRING, G_VARIANT_TYPE_OBJECT_PATH, + "ret = dbus.ObjectPath('/user')\n", NULL); + dbus_test_dbus_mock_object_add_method(mock, baseobj, + "ListCachedUsers", NULL, G_VARIANT_TYPE_OBJECT_PATH_ARRAY, + "ret = [ dbus.ObjectPath('/user') ]\n", NULL); + dbus_test_dbus_mock_object_add_method(mock, baseobj, + "UncacheUser", G_VARIANT_TYPE_STRING, NULL, + "", NULL); - userobj = dbus_test_dbus_mock_get_object(mock, "/user", "org.freedesktop.Accounts.User", NULL); - dbus_test_dbus_mock_object_add_property(mock, userobj, - "UserName", G_VARIANT_TYPE_STRING, - g_variant_new_string(g_get_user_name()), NULL); + userobj = dbus_test_dbus_mock_get_object(mock, "/user", "org.freedesktop.Accounts.User", NULL); + dbus_test_dbus_mock_object_add_property(mock, userobj, + "UserName", G_VARIANT_TYPE_STRING, + g_variant_new_string(g_get_user_name()), NULL); - soundobj = dbus_test_dbus_mock_get_object(mock, "/user", "org.ayatana.indicator.sound.AccountsService", NULL); - dbus_test_dbus_mock_object_add_property(mock, soundobj, - "Timestamp", G_VARIANT_TYPE_UINT64, - g_variant_new_uint64(0), NULL); - dbus_test_dbus_mock_object_add_property(mock, soundobj, - "PlayerName", G_VARIANT_TYPE_STRING, - g_variant_new_string(""), NULL); - dbus_test_dbus_mock_object_add_property(mock, soundobj, - "PlayerIcon", G_VARIANT_TYPE_VARIANT, - g_variant_new_variant(g_variant_new_string("")), NULL); - dbus_test_dbus_mock_object_add_property(mock, soundobj, - "Running", G_VARIANT_TYPE_BOOLEAN, - g_variant_new_boolean(FALSE), NULL); - dbus_test_dbus_mock_object_add_property(mock, soundobj, - "State", G_VARIANT_TYPE_STRING, - g_variant_new_string(""), NULL); - dbus_test_dbus_mock_object_add_property(mock, soundobj, - "Title", G_VARIANT_TYPE_STRING, - g_variant_new_string(""), NULL); - dbus_test_dbus_mock_object_add_property(mock, soundobj, - "Artist", G_VARIANT_TYPE_STRING, - g_variant_new_string(""), NULL); - dbus_test_dbus_mock_object_add_property(mock, soundobj, - "Album", G_VARIANT_TYPE_STRING, - g_variant_new_string(""), NULL); - dbus_test_dbus_mock_object_add_property(mock, soundobj, - "ArtUrl", G_VARIANT_TYPE_STRING, - g_variant_new_string(""), NULL); + soundobj = dbus_test_dbus_mock_get_object(mock, "/user", "org.ayatana.indicator.sound.AccountsService", NULL); + dbus_test_dbus_mock_object_add_property(mock, soundobj, + "Timestamp", G_VARIANT_TYPE_UINT64, + g_variant_new_uint64(0), NULL); + dbus_test_dbus_mock_object_add_property(mock, soundobj, + "PlayerName", G_VARIANT_TYPE_STRING, + g_variant_new_string(""), NULL); + dbus_test_dbus_mock_object_add_property(mock, soundobj, + "PlayerIcon", G_VARIANT_TYPE_VARIANT, + g_variant_new_variant(g_variant_new_string("")), NULL); + dbus_test_dbus_mock_object_add_property(mock, soundobj, + "Running", G_VARIANT_TYPE_BOOLEAN, + g_variant_new_boolean(FALSE), NULL); + dbus_test_dbus_mock_object_add_property(mock, soundobj, + "State", G_VARIANT_TYPE_STRING, + g_variant_new_string(""), NULL); + dbus_test_dbus_mock_object_add_property(mock, soundobj, + "Title", G_VARIANT_TYPE_STRING, + g_variant_new_string(""), NULL); + dbus_test_dbus_mock_object_add_property(mock, soundobj, + "Artist", G_VARIANT_TYPE_STRING, + g_variant_new_string(""), NULL); + dbus_test_dbus_mock_object_add_property(mock, soundobj, + "Album", G_VARIANT_TYPE_STRING, + g_variant_new_string(""), NULL); + dbus_test_dbus_mock_object_add_property(mock, soundobj, + "ArtUrl", G_VARIANT_TYPE_STRING, + g_variant_new_string(""), NULL); - syssoundobj = dbus_test_dbus_mock_get_object(mock, "/user", "com.ubuntu.touch.AccountsService.Sound", NULL); - dbus_test_dbus_mock_object_add_property(mock, syssoundobj, - "SilentMode", G_VARIANT_TYPE_BOOLEAN, - g_variant_new_boolean(FALSE), NULL); - } + syssoundobj = dbus_test_dbus_mock_get_object(mock, "/user", "com.ubuntu.touch.AccountsService.Sound", NULL); + dbus_test_dbus_mock_object_add_property(mock, syssoundobj, + "SilentMode", G_VARIANT_TYPE_BOOLEAN, + g_variant_new_boolean(FALSE), NULL); + } - ~AccountsServiceMock () { - g_debug("Destroying the Accounts Service Mock"); - g_clear_object(&mock); - } + ~AccountsServiceMock () { + g_debug("Destroying the Accounts Service Mock"); + g_clear_object(&mock); + } - void setSilentMode (bool modeValue) { - dbus_test_dbus_mock_object_update_property(mock, syssoundobj, - "SilentMode", g_variant_new_boolean(modeValue ? TRUE : FALSE), - NULL); - } + void setSilentMode (bool modeValue) { + dbus_test_dbus_mock_object_update_property(mock, syssoundobj, + "SilentMode", g_variant_new_boolean(modeValue ? TRUE : FALSE), + NULL); + } - operator std::shared_ptr<DbusTestTask> () { - return std::shared_ptr<DbusTestTask>( - DBUS_TEST_TASK(g_object_ref(mock)), - [](DbusTestTask * task) { g_clear_object(&task); }); - } + operator std::shared_ptr<DbusTestTask> () { + return std::shared_ptr<DbusTestTask>( + DBUS_TEST_TASK(g_object_ref(mock)), + [](DbusTestTask * task) { g_clear_object(&task); }); + } - operator DbusTestTask* () { - return DBUS_TEST_TASK(mock); - } + operator DbusTestTask* () { + return DBUS_TEST_TASK(mock); + } - operator DbusTestDbusMock* () { - return mock; - } + operator DbusTestDbusMock* () { + return mock; + } - DbusTestDbusMockObject * get_sound () { - return soundobj; - } + DbusTestDbusMockObject * get_sound () { + return soundobj; + } }; |