accounts-service: Rename D-Bus properties to CamelCase

That’s what’s more conventional for D-Bus properties, and we really
should have used CamelCase from the beginning.

See the advice on
https://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties:
> Strictly speaking, D-Bus property names are not required to follow
> the same naming restrictions as member names, but D-Bus property
> names that would not be valid member names (in particular,
> GObject-style dash-separated property names) can cause
> interoperability problems and should be avoided.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall 2018-12-12 13:43:39 +00:00
parent 233048a0df
commit b932f443d5
2 changed files with 18 additions and 18 deletions

View File

@ -16,7 +16,7 @@
value="com.endlessm.ParentalControls.AppFilter.ReadAny"/>
<!--
app-filter:
AppFilter:
A filter for which applications and binaries the user can run. This is
intended to be set by administrators and read by users, rather than being
@ -27,13 +27,13 @@
slash). The boolean value indicates whether this is a whitelist (true) or
blacklist (false).
-->
<property name="app-filter" type="(bas)" access="readwrite">
<property name="AppFilter" type="(bas)" access="readwrite">
<annotation name="org.freedesktop.Accounts.DefaultValue"
value="(false, [])"/>
</property>
<!--
oars-filter:
OarsFilter:
A filter for which applications the user can see in app lists and install.
This is intended to be set by administrators and read by users, rather
@ -55,38 +55,38 @@
in AppStream data:
https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-content_rating.
-->
<property name="oars-filter" type="(sa{ss})" access="readwrite">
<property name="OarsFilter" type="(sa{ss})" access="readwrite">
<annotation name="org.freedesktop.Accounts.DefaultValue"
value="('oars-1.1', @a{ss} {})"/>
</property>
<!--
allow-user-installation:
AllowUserInstallation:
Whether this user is allowed to install to their flatpak user repository.
If this is true, and if the polkit check for allowing app installation
succeeds, and if the oars-filter does not restrict this app, app
succeeds, and if the OarsFilter does not restrict this app, app
installation can proceed.
If this is false, the user is not allowed to install any apps or runtimes
to their flatpak user repository.
-->
<property name="allow-user-installation" type="b" access="readwrite">
<property name="AllowUserInstallation" type="b" access="readwrite">
<annotation name="org.freedesktop.Accounts.DefaultValue" value="true"/>
</property>
<!--
allow-system-installation:
AllowSystemInstallation:
Whether this user is allowed to install to the flatpak system repository.
If this is true, and if the polkit check for allowing app installation
succeeds, and if the oars-filter does not restrict this app, app
succeeds, and if the OarsFilter does not restrict this app, app
installation can proceed.
If this is false, the user is not allowed to install any apps or runtimes
to the flatpak system repository.
-->
<property name="allow-system-installation" type="b" access="readwrite">
<property name="AllowSystemInstallation" type="b" access="readwrite">
<annotation name="org.freedesktop.Accounts.DefaultValue" value="false"/>
</property>
</interface>

View File

@ -633,7 +633,7 @@ epc_get_app_filter (GDBusConnection *connection,
/* Extract the properties we care about. They may be silently omitted from the
* results if we dont have permission to access them. */
properties = g_variant_get_child_value (result_variant, 0);
if (!g_variant_lookup (properties, "app-filter", "(b^as)",
if (!g_variant_lookup (properties, "AppFilter", "(b^as)",
&is_whitelist, &app_list))
{
g_set_error (error, EPC_APP_FILTER_ERROR,
@ -643,7 +643,7 @@ epc_get_app_filter (GDBusConnection *connection,
return NULL;
}
if (!g_variant_lookup (properties, "oars-filter", "(&s@a{ss})",
if (!g_variant_lookup (properties, "OarsFilter", "(&s@a{ss})",
&content_rating_kind, &oars_variant))
{
/* Default value. */
@ -663,14 +663,14 @@ epc_get_app_filter (GDBusConnection *connection,
return NULL;
}
if (!g_variant_lookup (properties, "allow-user-installation", "b",
if (!g_variant_lookup (properties, "AllowUserInstallation", "b",
&allow_user_installation))
{
/* Default value. */
allow_user_installation = TRUE;
}
if (!g_variant_lookup (properties, "allow-system-installation", "b",
if (!g_variant_lookup (properties, "AllowSystemInstallation", "b",
&allow_system_installation))
{
/* Default value. */
@ -870,7 +870,7 @@ epc_set_app_filter (GDBusConnection *connection,
"Set",
g_variant_new ("(ssv)",
"com.endlessm.ParentalControls.AppFilter",
"app-filter",
"AppFilter",
g_steal_pointer (&app_filter_variant)),
G_VARIANT_TYPE ("()"),
allow_interactive_authorization
@ -893,7 +893,7 @@ epc_set_app_filter (GDBusConnection *connection,
"Set",
g_variant_new ("(ssv)",
"com.endlessm.ParentalControls.AppFilter",
"oars-filter",
"OarsFilter",
g_steal_pointer (&oars_filter_variant)),
G_VARIANT_TYPE ("()"),
allow_interactive_authorization
@ -916,7 +916,7 @@ epc_set_app_filter (GDBusConnection *connection,
"Set",
g_variant_new ("(ssv)",
"com.endlessm.ParentalControls.AppFilter",
"allow-user-installation",
"AllowUserInstallation",
g_steal_pointer (&allow_user_installation_variant)),
G_VARIANT_TYPE ("()"),
allow_interactive_authorization
@ -939,7 +939,7 @@ epc_set_app_filter (GDBusConnection *connection,
"Set",
g_variant_new ("(ssv)",
"com.endlessm.ParentalControls.AppFilter",
"allow-system-installation",
"AllowSystemInstallation",
g_steal_pointer (&allow_system_installation_variant)),
G_VARIANT_TYPE ("()"),
allow_interactive_authorization