Commit 25a8aa5d authored by Matthias Clasen's avatar Matthias Clasen

Cosmetic fixes

Use P_() for properties, fix up indentation, etc.
parent 0cf467c2
......@@ -175,8 +175,8 @@ _g_dbus_auth_class_init (GDBusAuthClass *klass)
g_object_class_install_property (gobject_class,
PROP_STREAM,
g_param_spec_object ("stream",
_("IO Stream"),
_("The underlying GIOStream used for I/O"),
P_("IO Stream"),
P_("The underlying GIOStream used for I/O"),
G_TYPE_IO_STREAM,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
......
......@@ -60,8 +60,7 @@ _g_dbus_auth_mechanism_finalize (GObject *object)
if (mechanism->priv->credentials != NULL)
g_object_unref (mechanism->priv->credentials);
if (G_OBJECT_CLASS (_g_dbus_auth_mechanism_parent_class)->finalize != NULL)
G_OBJECT_CLASS (_g_dbus_auth_mechanism_parent_class)->finalize (object);
G_OBJECT_CLASS (_g_dbus_auth_mechanism_parent_class)->finalize (object);
}
static void
......@@ -127,8 +126,8 @@ _g_dbus_auth_mechanism_class_init (GDBusAuthMechanismClass *klass)
g_object_class_install_property (gobject_class,
PROP_STREAM,
g_param_spec_object ("stream",
_("IO Stream"),
_("The underlying GIOStream used for I/O"),
P_("IO Stream"),
P_("The underlying GIOStream used for I/O"),
G_TYPE_IO_STREAM,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
......@@ -149,8 +148,8 @@ _g_dbus_auth_mechanism_class_init (GDBusAuthMechanismClass *klass)
g_object_class_install_property (gobject_class,
PROP_CREDENTIALS,
g_param_spec_object ("credentials",
_("Credentials"),
_("The credentials of the remote peer"),
P_("Credentials"),
P_("The credentials of the remote peer"),
G_TYPE_CREDENTIALS,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
......@@ -193,7 +192,7 @@ _g_dbus_auth_mechanism_get_name (GType mechanism_type)
const gchar *name;
GDBusAuthMechanismClass *klass;
g_return_val_if_fail (g_type_is_a (mechanism_type, G_TYPE_DBUS_AUTH_MECHANISM), NULL);
g_return_val_if_fail (g_type_is_a (mechanism_type, G_TYPE_DBUS_AUTH_MECHANISM), NULL);
klass = g_type_class_ref (mechanism_type);
g_assert (klass != NULL);
......@@ -209,7 +208,7 @@ _g_dbus_auth_mechanism_get_priority (GType mechanism_type)
gint priority;
GDBusAuthMechanismClass *klass;
g_return_val_if_fail (g_type_is_a (mechanism_type, G_TYPE_DBUS_AUTH_MECHANISM), 0);
g_return_val_if_fail (g_type_is_a (mechanism_type, G_TYPE_DBUS_AUTH_MECHANISM), 0);
klass = g_type_class_ref (mechanism_type);
g_assert (klass != NULL);
......@@ -229,10 +228,10 @@ _g_dbus_auth_mechanism_is_supported (GDBusAuthMechanism *mechanism)
}
gchar *
_g_dbus_auth_mechanism_encode_data (GDBusAuthMechanism *mechanism,
const gchar *data,
gsize data_len,
gsize *out_data_len)
_g_dbus_auth_mechanism_encode_data (GDBusAuthMechanism *mechanism,
const gchar *data,
gsize data_len,
gsize *out_data_len)
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), NULL);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->encode_data (mechanism, data, data_len, out_data_len);
......@@ -240,10 +239,10 @@ _g_dbus_auth_mechanism_encode_data (GDBusAuthMechanism *mechanism,
gchar *
_g_dbus_auth_mechanism_decode_data (GDBusAuthMechanism *mechanism,
const gchar *data,
gsize data_len,
gsize *out_data_len)
_g_dbus_auth_mechanism_decode_data (GDBusAuthMechanism *mechanism,
const gchar *data,
gsize data_len,
gsize *out_data_len)
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), NULL);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->decode_data (mechanism, data, data_len, out_data_len);
......@@ -252,47 +251,47 @@ _g_dbus_auth_mechanism_decode_data (GDBusAuthMechanism *mechanism,
/* ---------------------------------------------------------------------------------------------------- */
GDBusAuthMechanismState
_g_dbus_auth_mechanism_server_get_state (GDBusAuthMechanism *mechanism)
_g_dbus_auth_mechanism_server_get_state (GDBusAuthMechanism *mechanism)
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), G_DBUS_AUTH_MECHANISM_STATE_INVALID);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->server_get_state (mechanism);
}
void
_g_dbus_auth_mechanism_server_initiate (GDBusAuthMechanism *mechanism,
const gchar *initial_response,
gsize initial_response_len)
_g_dbus_auth_mechanism_server_initiate (GDBusAuthMechanism *mechanism,
const gchar *initial_response,
gsize initial_response_len)
{
g_return_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism));
G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->server_initiate (mechanism, initial_response, initial_response_len);
}
void
_g_dbus_auth_mechanism_server_data_receive (GDBusAuthMechanism *mechanism,
const gchar *data,
gsize data_len)
_g_dbus_auth_mechanism_server_data_receive (GDBusAuthMechanism *mechanism,
const gchar *data,
gsize data_len)
{
g_return_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism));
G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->server_data_receive (mechanism, data, data_len);
}
gchar *
_g_dbus_auth_mechanism_server_data_send (GDBusAuthMechanism *mechanism,
gsize *out_data_len)
_g_dbus_auth_mechanism_server_data_send (GDBusAuthMechanism *mechanism,
gsize *out_data_len)
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), NULL);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->server_data_send (mechanism, out_data_len);
}
gchar *
_g_dbus_auth_mechanism_server_get_reject_reason (GDBusAuthMechanism *mechanism)
_g_dbus_auth_mechanism_server_get_reject_reason (GDBusAuthMechanism *mechanism)
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), NULL);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->server_get_reject_reason (mechanism);
}
void
_g_dbus_auth_mechanism_server_shutdown (GDBusAuthMechanism *mechanism)
_g_dbus_auth_mechanism_server_shutdown (GDBusAuthMechanism *mechanism)
{
g_return_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism));
G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->server_shutdown (mechanism);
......@@ -301,15 +300,15 @@ _g_dbus_auth_mechanism_server_shutdown (GDBusAuthMechanism *mechanism)
/* ---------------------------------------------------------------------------------------------------- */
GDBusAuthMechanismState
_g_dbus_auth_mechanism_client_get_state (GDBusAuthMechanism *mechanism)
_g_dbus_auth_mechanism_client_get_state (GDBusAuthMechanism *mechanism)
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), G_DBUS_AUTH_MECHANISM_STATE_INVALID);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->client_get_state (mechanism);
}
gchar *
_g_dbus_auth_mechanism_client_initiate (GDBusAuthMechanism *mechanism,
gsize *out_initial_response_len)
_g_dbus_auth_mechanism_client_initiate (GDBusAuthMechanism *mechanism,
gsize *out_initial_response_len)
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), NULL);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->client_initiate (mechanism,
......@@ -317,24 +316,24 @@ _g_dbus_auth_mechanism_client_initiate (GDBusAuthMechanism *mechanism,
}
void
_g_dbus_auth_mechanism_client_data_receive (GDBusAuthMechanism *mechanism,
const gchar *data,
gsize data_len)
_g_dbus_auth_mechanism_client_data_receive (GDBusAuthMechanism *mechanism,
const gchar *data,
gsize data_len)
{
g_return_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism));
G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->client_data_receive (mechanism, data, data_len);
}
gchar *
_g_dbus_auth_mechanism_client_data_send (GDBusAuthMechanism *mechanism,
gsize *out_data_len)
_g_dbus_auth_mechanism_client_data_send (GDBusAuthMechanism *mechanism,
gsize *out_data_len)
{
g_return_val_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism), NULL);
return G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->client_data_send (mechanism, out_data_len);
}
void
_g_dbus_auth_mechanism_client_shutdown (GDBusAuthMechanism *mechanism)
_g_dbus_auth_mechanism_client_shutdown (GDBusAuthMechanism *mechanism)
{
g_return_if_fail (G_IS_DBUS_AUTH_MECHANISM (mechanism));
G_DBUS_AUTH_MECHANISM_GET_CLASS (mechanism)->client_shutdown (mechanism);
......
This diff is collapsed.
......@@ -92,8 +92,7 @@ g_dbus_method_invocation_finalize (GObject *object)
g_object_unref (invocation->priv->message);
g_variant_unref (invocation->priv->parameters);
if (G_OBJECT_CLASS (g_dbus_method_invocation_parent_class)->finalize != NULL)
G_OBJECT_CLASS (g_dbus_method_invocation_parent_class)->finalize (object);
G_OBJECT_CLASS (g_dbus_method_invocation_parent_class)->finalize (object);
}
static void
......@@ -220,8 +219,8 @@ g_dbus_method_invocation_class_init (GDBusMethodInvocationClass *klass)
g_object_class_install_property (gobject_class,
PROP_SENDER,
g_param_spec_string ("sender",
_("Sender"),
_("The bus name that invoked the method."),
P_("Sender"),
P_("The bus name that invoked the method."),
NULL,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
......@@ -240,8 +239,8 @@ g_dbus_method_invocation_class_init (GDBusMethodInvocationClass *klass)
g_object_class_install_property (gobject_class,
PROP_OBJECT_PATH,
g_param_spec_string ("object-path",
_("Object Path"),
_("The object path the method was invoked on."),
P_("Object Path"),
P_("The object path the method was invoked on."),
NULL,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
......@@ -260,8 +259,8 @@ g_dbus_method_invocation_class_init (GDBusMethodInvocationClass *klass)
g_object_class_install_property (gobject_class,
PROP_INTERFACE_NAME,
g_param_spec_string ("interface-name",
_("Interface Name"),
_("The name of the D-Bus interface the method was invoked on."),
P_("Interface Name"),
P_("The name of the D-Bus interface the method was invoked on."),
NULL,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
......@@ -280,8 +279,8 @@ g_dbus_method_invocation_class_init (GDBusMethodInvocationClass *klass)
g_object_class_install_property (gobject_class,
PROP_METHOD_NAME,
g_param_spec_string ("method-name",
_("Method Name"),
_("The name of the method that was invoked."),
P_("Method Name"),
P_("The name of the method that was invoked."),
NULL,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
......@@ -300,8 +299,8 @@ g_dbus_method_invocation_class_init (GDBusMethodInvocationClass *klass)
g_object_class_install_property (gobject_class,
PROP_METHOD_INFO,
g_param_spec_boxed ("method-info",
_("Method Info"),
_("Information about the method that was invoked, if any."),
P_("Method Info"),
P_("Information about the method that was invoked, if any."),
G_TYPE_DBUS_METHOD_INFO,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
......@@ -320,8 +319,8 @@ g_dbus_method_invocation_class_init (GDBusMethodInvocationClass *klass)
g_object_class_install_property (gobject_class,
PROP_CONNECTION,
g_param_spec_object ("connection",
_("Connection"),
_("The #GDBusConnection the method was invoked on."),
P_("Connection"),
P_("The #GDBusConnection the method was invoked on."),
G_TYPE_DBUS_CONNECTION,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
......@@ -340,8 +339,8 @@ g_dbus_method_invocation_class_init (GDBusMethodInvocationClass *klass)
g_object_class_install_property (gobject_class,
PROP_MESSAGE,
g_param_spec_object ("message",
_("Message"),
_("The D-Bus Message."),
P_("Message"),
P_("The D-Bus Message."),
G_TYPE_DBUS_MESSAGE,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
......@@ -360,8 +359,8 @@ g_dbus_method_invocation_class_init (GDBusMethodInvocationClass *klass)
g_object_class_install_property (gobject_class,
PROP_PARAMETERS,
g_param_spec_boxed ("parameters",
_("Parameters"),
_("The parameters as a #GVariant tuple."),
P_("Parameters"),
P_("The parameters as a #GVariant tuple."),
G_TYPE_VARIANT,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
......@@ -380,14 +379,14 @@ g_dbus_method_invocation_class_init (GDBusMethodInvocationClass *klass)
g_object_class_install_property (gobject_class,
PROP_USER_DATA,
g_param_spec_pointer ("user-data",
_("User Data"),
_("The gpointer passed to g_dbus_connection_register_object()."),
G_PARAM_READABLE |
G_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_NAME |
G_PARAM_STATIC_BLURB |
G_PARAM_STATIC_NICK));
P_("User Data"),
P_("The gpointer passed to g_dbus_connection_register_object()."),
G_PARAM_READABLE |
G_PARAM_WRITABLE |
G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_NAME |
G_PARAM_STATIC_BLURB |
G_PARAM_STATIC_NICK));
g_type_class_add_private (klass, sizeof (GDBusMethodInvocationPrivate));
}
......@@ -579,15 +578,15 @@ g_dbus_method_invocation_get_user_data (GDBusMethodInvocation *invocation)
* Since: 2.26
*/
GDBusMethodInvocation *
g_dbus_method_invocation_new (const gchar *sender,
const gchar *object_path,
const gchar *interface_name,
const gchar *method_name,
const GDBusMethodInfo *method_info,
GDBusConnection *connection,
GDBusMessage *message,
GVariant *parameters,
gpointer user_data)
g_dbus_method_invocation_new (const gchar *sender,
const gchar *object_path,
const gchar *interface_name,
const gchar *method_name,
const GDBusMethodInfo *method_info,
GDBusConnection *connection,
GDBusMessage *message,
GVariant *parameters,
gpointer user_data)
{
g_return_val_if_fail (sender == NULL || g_dbus_is_name (sender), NULL);
g_return_val_if_fail (g_variant_is_object_path (object_path), NULL);
......
......@@ -110,16 +110,12 @@ g_dbus_proxy_finalize (GObject *object)
GDBusProxy *proxy = G_DBUS_PROXY (object);
if (proxy->priv->properties_changed_subscriber_id > 0)
{
g_dbus_connection_signal_unsubscribe (proxy->priv->connection,
proxy->priv->properties_changed_subscriber_id);
}
g_dbus_connection_signal_unsubscribe (proxy->priv->connection,
proxy->priv->properties_changed_subscriber_id);
if (proxy->priv->signals_subscriber_id > 0)
{
g_dbus_connection_signal_unsubscribe (proxy->priv->connection,
proxy->priv->signals_subscriber_id);
}
g_dbus_connection_signal_unsubscribe (proxy->priv->connection,
proxy->priv->signals_subscriber_id);
g_object_unref (proxy->priv->connection);
g_free (proxy->priv->unique_bus_name);
......@@ -131,8 +127,7 @@ g_dbus_proxy_finalize (GObject *object)
if (proxy->priv->expected_interface != NULL)
g_dbus_interface_info_unref (proxy->priv->expected_interface);
if (G_OBJECT_CLASS (g_dbus_proxy_parent_class)->finalize != NULL)
G_OBJECT_CLASS (g_dbus_proxy_parent_class)->finalize (object);
G_OBJECT_CLASS (g_dbus_proxy_parent_class)->finalize (object);
}
static void
......@@ -250,8 +245,8 @@ g_dbus_proxy_class_init (GDBusProxyClass *klass)
g_object_class_install_property (gobject_class,
PROP_G_INTERFACE_INFO,
g_param_spec_boxed ("g-interface-info",
_("Interface Information"),
_("Interface Information"),
P_("Interface Information"),
P_("Interface Information"),
G_TYPE_DBUS_INTERFACE_INFO,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
......@@ -269,8 +264,8 @@ g_dbus_proxy_class_init (GDBusProxyClass *klass)
g_object_class_install_property (gobject_class,
PROP_G_CONNECTION,
g_param_spec_object ("g-connection",
_("g-connection"),
_("The connection the proxy is for"),
P_("g-connection"),
P_("The connection the proxy is for"),
G_TYPE_DBUS_CONNECTION,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
......@@ -289,8 +284,8 @@ g_dbus_proxy_class_init (GDBusProxyClass *klass)
g_object_class_install_property (gobject_class,
PROP_G_FLAGS,
g_param_spec_flags ("g-flags",
_("g-flags"),
_("Flags for the proxy"),
P_("g-flags"),
P_("Flags for the proxy"),
G_TYPE_DBUS_PROXY_FLAGS,
G_DBUS_PROXY_FLAGS_NONE,
G_PARAM_READABLE |
......@@ -310,8 +305,8 @@ g_dbus_proxy_class_init (GDBusProxyClass *klass)
g_object_class_install_property (gobject_class,
PROP_G_UNIQUE_BUS_NAME,
g_param_spec_string ("g-unique-bus-name",
_("g-unique-bus-name"),
_("The unique bus name the proxy is for"),
P_("g-unique-bus-name"),
P_("The unique bus name the proxy is for"),
NULL,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
......@@ -330,8 +325,8 @@ g_dbus_proxy_class_init (GDBusProxyClass *klass)
g_object_class_install_property (gobject_class,
PROP_G_OBJECT_PATH,
g_param_spec_string ("g-object-path",
_("g-object-path"),
_("The object path the proxy is for"),
P_("g-object-path"),
P_("The object path the proxy is for"),
NULL,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
......@@ -350,8 +345,8 @@ g_dbus_proxy_class_init (GDBusProxyClass *klass)
g_object_class_install_property (gobject_class,
PROP_G_INTERFACE_NAME,
g_param_spec_string ("g-interface-name",
_("g-interface-name"),
_("The D-Bus interface name the proxy is for"),
P_("g-interface-name"),
P_("The D-Bus interface name the proxy is for"),
NULL,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
......@@ -377,8 +372,8 @@ g_dbus_proxy_class_init (GDBusProxyClass *klass)
g_object_class_install_property (gobject_class,
PROP_G_DEFAULT_TIMEOUT,
g_param_spec_int ("g-default-timeout",
_("Default Timeout"),
_("Timeout for remote method invocation"),
P_("Default Timeout"),
P_("Timeout for remote method invocation"),
-1,
G_MAXINT,
-1,
......@@ -459,8 +454,8 @@ g_dbus_proxy_init (GDBusProxy *proxy)
* Since: 2.26
*/
gchar **
g_dbus_proxy_get_cached_property_names (GDBusProxy *proxy,
GError **error)
g_dbus_proxy_get_cached_property_names (GDBusProxy *proxy,
GError **error)
{
gchar **names;
GPtrArray *p;
......@@ -485,9 +480,7 @@ g_dbus_proxy_get_cached_property_names (GDBusProxy *proxy,
g_hash_table_iter_init (&iter, proxy->priv->properties);
while (g_hash_table_iter_next (&iter, (gpointer) &key, NULL))
{
g_ptr_array_add (p, g_strdup (key));
}
g_ptr_array_add (p, g_strdup (key));
g_ptr_array_sort (p, (GCompareFunc) g_strcmp0);
g_ptr_array_add (p, NULL);
......@@ -519,9 +512,9 @@ g_dbus_proxy_get_cached_property_names (GDBusProxy *proxy,
* Since: 2.26
*/
GVariant *
g_dbus_proxy_get_cached_property (GDBusProxy *proxy,
const gchar *property_name,
GError **error)
g_dbus_proxy_get_cached_property (GDBusProxy *proxy,
const gchar *property_name,
GError **error)
{
GVariant *value;
......@@ -560,13 +553,13 @@ g_dbus_proxy_get_cached_property (GDBusProxy *proxy,
/* ---------------------------------------------------------------------------------------------------- */
static void
on_signal_received (GDBusConnection *connection,
const gchar *sender_name,
const gchar *object_path,
const gchar *interface_name,
const gchar *signal_name,
GVariant *parameters,
gpointer user_data)
on_signal_received (GDBusConnection *connection,
const gchar *sender_name,
const gchar *object_path,
const gchar *interface_name,
const gchar *signal_name,
GVariant *parameters,
gpointer user_data)
{
GDBusProxy *proxy = G_DBUS_PROXY (user_data);
......@@ -581,13 +574,13 @@ on_signal_received (GDBusConnection *connection,
/* ---------------------------------------------------------------------------------------------------- */
static void
on_properties_changed (GDBusConnection *connection,
const gchar *sender_name,
const gchar *object_path,
const gchar *interface_name,
const gchar *signal_name,
GVariant *parameters,
gpointer user_data)
on_properties_changed (GDBusConnection *connection,
const gchar *sender_name,
const gchar *object_path,
const gchar *interface_name,
const gchar *signal_name,
GVariant *parameters,
gpointer user_data)
{
GDBusProxy *proxy = G_DBUS_PROXY (user_data);
GError *error;
......@@ -746,9 +739,9 @@ process_get_all_reply (GDBusProxy *proxy,
}
static gboolean
initable_init (GInitable *initable,
GCancellable *cancellable,
GError **error)
initable_init (GInitable *initable,
GCancellable *cancellable,
GError **error)
{
GDBusProxy *proxy = G_DBUS_PROXY (initable);
GVariant *result;
......@@ -823,11 +816,11 @@ get_all_cb (GDBusConnection *connection,
}
static void
async_initable_init_async (GAsyncInitable *initable,
gint io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
async_initable_init_async (GAsyncInitable *initable,
gint io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
GDBusProxy *proxy = G_DBUS_PROXY (initable);
GSimpleAsyncResult *simple;
......@@ -1248,9 +1241,9 @@ g_dbus_proxy_set_interface_info (GDBusProxy *proxy,
/* ---------------------------------------------------------------------------------------------------- */
static gboolean
maybe_split_method_name (const gchar *method_name,
gchar **out_interface_name,
const gchar **out_method_name)
maybe_split_method_name (const gchar *method_name,
gchar **out_interface_name,
const gchar **out_method_name)
{
gboolean was_split;
......@@ -1310,8 +1303,8 @@ reply_cb (GDBusConnection *connection,
}
static const GDBusMethodInfo *
lookup_method_info_or_warn (GDBusProxy *proxy,
const char *method_name)
lookup_method_info_or_warn (GDBusProxy *proxy,
const gchar *method_name)
{
const GDBusMethodInfo *info;
......@@ -1400,14 +1393,14 @@ validate_method_return (const char *method_name,
* Since: 2.26
*/
void
g_dbus_proxy_invoke_method (GDBusProxy *proxy,
const gchar *method_name,
GVariant *parameters,
GDBusInvokeMethodFlags flags,
gint timeout_msec,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
g_dbus_proxy_invoke_method (GDBusProxy *proxy,
const gchar *method_name,
GVariant *parameters,
GDBusInvokeMethodFlags flags,
gint timeout_msec,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
GSimpleAsyncResult *simple;
gboolean was_split;
......@@ -1536,21 +1529,21 @@ g_dbus_proxy_invoke_method_finish (GDBusProxy *proxy,
* Since: 2.26
*/
GVariant *
g_dbus_proxy_invoke_method_sync (GDBusProxy *proxy,
const gchar *method_name,
GVariant *parameters,
GDBusInvokeMethodFlags flags,
gint timeout_msec,
GCancellable *cancellable,
GError **error)
g_dbus_proxy_invoke_method_sync (GDBusProxy *proxy,
const gchar *method_name,
GVariant *parameters,
GDBusInvokeMethodFlags flags,
gint timeout_msec,
GCancellable *cancellable,
GError **error)
{
GVariant *ret;
gboolean was_split;
gchar *split_interface_name;
const gchar *split_method_name;
const GDBusMethodInfo *expected_method_info;
const char *target_method_name;
const char *target_interface_name;
const gchar *target_method_name;
const gchar *target_interface_name;
g_return_val_if_fail (G_IS_DBUS_PROXY (proxy), NULL);
g_return_val_if_fail (g_dbus_is_member_name (method_name) || g_dbus_is_interface_name (method_name), NULL);
......
......@@ -134,8 +134,7 @@ g_dbus_server_finalize (GObject *object)
if (server->priv->main_context_at_construction != NULL)
g_main_context_unref (server->priv->main_context_at_construction);
if (G_OBJECT_CLASS (g_dbus_server_parent_class)->finalize != NULL)
G_OBJECT_CLASS (g_dbus_server_parent_class)->finalize (object);
G_OBJECT_CLASS (g_dbus_server_parent_class)->finalize (object);
}
static void
......@@ -229,8 +228,8 @@ g_dbus_server_class_init (GDBusServerClass *klass)
g_object_class_install_property (gobject_class,
PROP_FLAGS,
g_param_spec_flags ("flags",
_("Flags"),
_("Flags for the server"),
P_("Flags"),
P_("Flags for the server"),
G_TYPE_DBUS_SERVER_FLAGS,
G_DBUS_SERVER_FLAGS_NONE,
G_PARAM_READABLE |
......@@ -250,8 +249,8 @@ g_dbus_server_class_init (GDBusServerClass *klass)
g_object_class_install_property (gobject_class,
PROP_GUID,
g_param_spec_string ("guid",
_("GUID"),
_("The guid of the server"),
P_("GUID"),
P_("The guid of the server"),
NULL,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
......@@ -270,8 +269,8 @@ g_dbus_server_class_init (GDBusServerClass *klass)
g_object_class_install_property (gobject_class,
PROP_ADDRESS,
g_param_spec_string ("address",
_("Address"),
_("The address to listen on"),
P_("Address"),
P_("The address to listen on"),
NULL,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
......@@ -290,8 +289,8 @@ g_dbus_server_class_init (GDBusServerClass *klass)
g_object_class_install_property (gobject_class,
PROP_CLIENT_ADDRESS,
g_param_spec_string ("client-address",
_("Client Address"),
_("The address clients can use"),
P_("Client Address"),
P_("The address clients can use"),
NULL,
G_PARAM_READABLE |
G_PARAM_STATIC_NAME |
......@@ -308,8 +307,8 @@ g_dbus_server_class_init (GDBusServerClass *klass)
g_object_class_install_property (gobject_class,
PROP_ACTIVE,
g_param_spec_string ("active",
_("Active"),
_("Whether the server is currently active"),
P_("Active"),
P_("Whether the server is currently active"),
NULL,
G_PARAM_READABLE |
G_PARAM_STATIC_NAME |
......@@ -326,8 +325,8 @@ g_dbus_server_class_init (GDBusServerClass *klass)
g_object_class_install_property (gobject_class,
PROP_AUTHENTICATION_OBSERVER,
g_param_spec_object ("authentication-observer",
_("Authentication Observer"),
_("Object used to assist in the authentication process"),
P_("Authentication Observer"),
P_("Object used to assist in the authentication process"),
G_TYPE_DBUS_AUTH_OBSERVER,
G_PARAM_READABLE |
G_PARAM_WRITABLE |
......@@ -422,12 +421,12 @@ on_run (GSocketService *service,
* Since: 2.26
*/
GDBusServer *
g_dbus_server_new_sync (const gchar *address,
GDBusServerFlags flags,
const gchar *guid,
GDBusAuthObserver *observer,
GCancellable *cancellable,
GError **error)
g_dbus_server_new_sync (const gchar *address,
GDBusServerFlags flags,
const gchar *guid,
GDBusAuthObserver *observer,
GCancellable *cancellable,
GError **error)
{
GDBusServer *server;
......@@ -764,9 +763,8 @@ try_tcp (GDBusServer *server,
NULL,
error);
if (resolved_addresses == NULL)
{
goto out;
}
goto out;
/* TODO: handle family */
for (l = resolved_addresses; l != NULL; l = l->next)
{
......@@ -787,10 +785,9 @@ try_tcp (GDBusServer *server,
goto out;
}
if (port_num == 0)
{
/* make sure we allocate the same port number for other listeners */
port_num = g_inet_socket_address_get_port (G_INET_SOCKET_ADDRESS (effective_address));
}
/* make sure we allocate the same port number for other listeners */
port_num = g_inet_socket_address_get_port (G_INET_SOCKET_ADDRESS (effective_address));
g_object_unref (effective_address);
g_object_unref (socket_address);
}
......@@ -961,9 +958,9 @@ on_run (GSocketService *service,
}
static gboolean
initable_init (GInitable *initable,