diff options
author | Tomas Bzatek <tbzatek@redhat.com> | 2012-07-24 15:41:24 +0200 |
---|---|---|
committer | Tomas Bzatek <tbzatek@redhat.com> | 2012-07-31 11:59:38 +0200 |
commit | fc26e52e4f7ddbd1a24ec9d02d76bd4c70d0b1f7 (patch) | |
tree | 3122f40a612b4a031f4f11c5d6c9c4da7b8d8b71 | |
parent | 6b5b2b4c1f28bdd61e8a2dc24b66191436378910 (diff) | |
download | gvfs-fc26e52e4f7ddbd1a24ec9d02d76bd4c70d0b1f7.tar.gz |
gdbus: Use casting macros where possible
-rw-r--r-- | client/gdaemonfileenumerator.c | 6 | ||||
-rw-r--r-- | client/gdaemonfilemonitor.c | 2 | ||||
-rw-r--r-- | client/gvfsdaemondbus.c | 4 | ||||
-rw-r--r-- | common/gmountoperationdbus.c | 8 | ||||
-rw-r--r-- | common/gmounttracker.c | 4 | ||||
-rw-r--r-- | daemon/gvfsdaemon.c | 18 | ||||
-rw-r--r-- | daemon/mount.c | 2 |
7 files changed, 22 insertions, 22 deletions
diff --git a/client/gdaemonfileenumerator.c b/client/gdaemonfileenumerator.c index e7d48b0f..1e2b7de7 100644 --- a/client/gdaemonfileenumerator.c +++ b/client/gdaemonfileenumerator.c @@ -169,7 +169,7 @@ handle_done (GVfsDBusEnumerator *object, GDBusMethodInvocation *invocation, gpointer user_data) { - GDaemonFileEnumerator *enumerator = user_data; + GDaemonFileEnumerator *enumerator = G_DAEMON_FILE_ENUMERATOR (user_data); g_print ("handle_done: daemon = %p, async_requested_files = %d\n", enumerator, enumerator->async_requested_files); @@ -191,7 +191,7 @@ handle_got_info (GVfsDBusEnumerator *object, GVariant *arg_infos, gpointer user_data) { - GDaemonFileEnumerator *enumerator = user_data; + GDaemonFileEnumerator *enumerator = G_DAEMON_FILE_ENUMERATOR (user_data); GList *infos; GFileInfo *info; GVariantIter iter; @@ -314,7 +314,7 @@ enumerate_keys_callback (const char *key, gpointer value, gpointer user_data) { - GFileInfo *info = user_data; + GFileInfo *info = G_FILE_INFO (user_data); char *attr; attr = g_strconcat ("metadata::", key, NULL); diff --git a/client/gdaemonfilemonitor.c b/client/gdaemonfilemonitor.c index 71de50e5..6b5a7fe3 100644 --- a/client/gdaemonfilemonitor.c +++ b/client/gdaemonfilemonitor.c @@ -91,7 +91,7 @@ handle_changed (GVfsDBusMonitorClient *object, const gchar *arg_other_file_path, gpointer user_data) { - GDaemonFileMonitor* monitor = user_data; + GDaemonFileMonitor *monitor = G_DAEMON_FILE_MONITOR (user_data); GMountSpec *spec1, *spec2; GFile *file1, *file2; diff --git a/client/gvfsdaemondbus.c b/client/gvfsdaemondbus.c index c2cdb24f..034eef9f 100644 --- a/client/gvfsdaemondbus.c +++ b/client/gvfsdaemondbus.c @@ -245,7 +245,7 @@ get_connection_for_async (const char *dbus_id) static void close_and_unref_connection (void *data) { - GDBusConnection *connection = data; + GDBusConnection *connection = G_DBUS_CONNECTION (data); g_print ("close_and_unref_connection: closing connection\n"); @@ -527,7 +527,7 @@ _g_dbus_async_subscribe_cancellable (GDBusConnection *connection, GCancellable * cancel_data->serial = g_dbus_connection_get_last_serial (connection); cancelled_tag = g_signal_connect_data (cancellable, "cancelled", - (GCallback)async_call_cancelled_cb, + G_CALLBACK (async_call_cancelled_cb), cancel_data, (GClosureNotify)async_call_cancel_data_free, 0); diff --git a/common/gmountoperationdbus.c b/common/gmountoperationdbus.c index 9bfa619a..4c323467 100644 --- a/common/gmountoperationdbus.c +++ b/common/gmountoperationdbus.c @@ -107,8 +107,8 @@ handle_ask_password (GVfsDBusMountOperation *object, op_dbus->object = object; op_dbus->invocation = invocation; - g_signal_connect (op_dbus->op, "reply", - (GCallback)ask_password_reply, + g_signal_connect (op_dbus->op, "reply", + G_CALLBACK (ask_password_reply), op_dbus); g_signal_emit_by_name (op_dbus->op, "ask_password", @@ -159,7 +159,7 @@ handle_ask_question (GVfsDBusMountOperation *object, op_dbus->invocation = invocation; g_signal_connect (op_dbus->op, "reply", - (GCallback)ask_question_reply, + G_CALLBACK (ask_question_reply), op_dbus); g_signal_emit_by_name (op_dbus->op, "ask_question", @@ -217,7 +217,7 @@ handle_show_processes (GVfsDBusMountOperation *object, op_dbus->invocation = invocation; g_signal_connect (op_dbus->op, "reply", - (GCallback)show_processes_reply, + G_CALLBACK (show_processes_reply), op_dbus); g_signal_emit_by_name (op_dbus->op, "show_processes", diff --git a/common/gmounttracker.c b/common/gmounttracker.c index 0f710941..bbca23e5 100644 --- a/common/gmounttracker.c +++ b/common/gmounttracker.c @@ -426,7 +426,7 @@ mounted_cb (GVfsDBusMountTracker *object, GVariant *arg_mount, gpointer user_data) { - GMountTracker *tracker = user_data; + GMountTracker *tracker = G_MOUNT_TRACKER (user_data); GMountInfo *info; info = g_mount_info_from_dbus (arg_mount); @@ -442,7 +442,7 @@ unmounted_cb (GVfsDBusMountTracker *object, GVariant *arg_mount, gpointer user_data) { - GMountTracker *tracker = user_data; + GMountTracker *tracker = G_MOUNT_TRACKER (user_data); GMountInfo *info; info = g_mount_info_from_dbus (arg_mount); diff --git a/daemon/gvfsdaemon.c b/daemon/gvfsdaemon.c index bbf3e662..b6e19f8b 100644 --- a/daemon/gvfsdaemon.c +++ b/daemon/gvfsdaemon.c @@ -190,7 +190,7 @@ name_appeared_handler (GDBusConnection *connection, const gchar *name_owner, gpointer user_data) { - GVfsDaemon *daemon = user_data; + GVfsDaemon *daemon = G_VFS_DAEMON (user_data); g_print ("gvfsdaemon: name_appeared_handler()\n"); @@ -208,7 +208,7 @@ name_vanished_handler (GDBusConnection *connection, const gchar *name, gpointer user_data) { - GVfsDaemon *daemon = user_data; + GVfsDaemon *daemon = G_VFS_DAEMON (user_data); g_print ("gvfsdaemon: name_vanished_handler()\n"); @@ -430,7 +430,7 @@ g_vfs_daemon_re_register_job_sources (GVfsDaemon *daemon) { if (G_VFS_IS_BACKEND (l->data)) { - GVfsBackend *backend = l->data; + GVfsBackend *backend = G_VFS_BACKEND (l->data); /* Only re-register if we registered before, not e.g if we're currently mounting. */ @@ -617,7 +617,7 @@ peer_connection_closed (GDBusConnection *connection, GError *error, gpointer user_data) { - GVfsDaemon *daemon = user_data; + GVfsDaemon *daemon = G_VFS_DAEMON (user_data); GList *l; GVfsDBusDaemon *daemon_skeleton; @@ -626,7 +626,7 @@ peer_connection_closed (GDBusConnection *connection, g_mutex_lock (&daemon->lock); for (l = daemon->jobs; l != NULL; l = l->next) { - GVfsJob *job = l->data; + GVfsJob *job = G_VFS_JOB (l->data); if (G_VFS_IS_JOB_DBUS (job) && G_VFS_JOB_DBUS (job)->invocation && @@ -839,7 +839,7 @@ handle_get_connection (GVfsDBusDaemon *object, GDBusMethodInvocation *invocation, gpointer user_data) { - GVfsDaemon *daemon = user_data; + GVfsDaemon *daemon = G_VFS_DAEMON (user_data); GDBusServer *server; GError *error; gchar *address1; @@ -906,7 +906,7 @@ handle_cancel (GVfsDBusDaemon *object, guint arg_serial, gpointer user_data) { - GVfsDaemon *daemon = user_data; + GVfsDaemon *daemon = G_VFS_DAEMON (user_data); GList *l; GVfsJob *job_to_cancel = NULL; @@ -915,7 +915,7 @@ handle_cancel (GVfsDBusDaemon *object, g_mutex_lock (&daemon->lock); for (l = daemon->jobs; l != NULL; l = l->next) { - GVfsJob *job = l->data; + GVfsJob *job = G_VFS_JOB (l->data); if (G_VFS_IS_JOB_DBUS (job) && g_vfs_job_dbus_is_serial (G_VFS_JOB_DBUS (job), @@ -947,7 +947,7 @@ daemon_handle_mount (GVfsDBusMountable *object, GVariant *arg_mount_source, gpointer user_data) { - GVfsDaemon *daemon = user_data; + GVfsDaemon *daemon = G_VFS_DAEMON (user_data); GMountSpec *mount_spec; GMountSource *mount_source; diff --git a/daemon/mount.c b/daemon/mount.c index a96d7f74..f16a897f 100644 --- a/daemon/mount.c +++ b/daemon/mount.c @@ -832,7 +832,7 @@ mount_location_done (VfsMountable *mountable, GError *error, gpointer user_data) { - GDBusMethodInvocation *invocation = user_data; + GDBusMethodInvocation *invocation = G_DBUS_METHOD_INVOCATION (user_data); if (error) g_dbus_method_invocation_return_gerror (invocation, error); |