From fc009dd49ee7dd1b6d34519825161a9c1956dad9 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 17 May 2012 20:34:07 -0700 Subject: [PATCH] obexd: Constify GDBus method tables Constify method tables with the following command: find . -name '*.[ch]' -exec \ sed -i 's/\(GDBusMethodTable .* =\)/const \1/g' {} \; --- obexd/client/ftp.c | 2 +- obexd/client/manager.c | 2 +- obexd/client/map.c | 2 +- obexd/client/pbap.c | 2 +- obexd/client/session.c | 2 +- obexd/client/sync.c | 2 +- obexd/client/transfer.c | 2 +- obexd/src/manager.c | 6 +++--- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/obexd/client/ftp.c b/obexd/client/ftp.c index bb180bada..40c85b29a 100644 --- a/obexd/client/ftp.c +++ b/obexd/client/ftp.c @@ -435,7 +435,7 @@ static DBusMessage *delete(DBusConnection *connection, return NULL; } -static GDBusMethodTable ftp_methods[] = { +static const GDBusMethodTable ftp_methods[] = { { "ChangeFolder", "s", "", change_folder, G_DBUS_METHOD_FLAG_ASYNC }, { "CreateFolder", "s", "", create_folder, diff --git a/obexd/client/manager.c b/obexd/client/manager.c index 4099e6f70..9f26cb00e 100644 --- a/obexd/client/manager.c +++ b/obexd/client/manager.c @@ -581,7 +581,7 @@ static DBusMessage *get_capabilities(DBusConnection *connection, return g_dbus_create_error(message, "org.openobex.Error.Failed", NULL); } -static GDBusMethodTable client_methods[] = { +static const GDBusMethodTable client_methods[] = { { "SendFiles", "a{sv}aso", "", send_files, G_DBUS_METHOD_FLAG_ASYNC }, { "PullBusinessCard", "a{sv}s", "", pull_business_card, diff --git a/obexd/client/map.c b/obexd/client/map.c index fe6b46094..c4afe0ec7 100644 --- a/obexd/client/map.c +++ b/obexd/client/map.c @@ -189,7 +189,7 @@ fail: return reply; } -static GDBusMethodTable map_methods[] = { +static const GDBusMethodTable map_methods[] = { { "SetFolder", "s", "", map_setpath, G_DBUS_METHOD_FLAG_ASYNC }, { "GetFolderListing", "a{ss}", "s", map_get_folder_listing, diff --git a/obexd/client/pbap.c b/obexd/client/pbap.c index 76db61e33..add9057f3 100644 --- a/obexd/client/pbap.c +++ b/obexd/client/pbap.c @@ -980,7 +980,7 @@ static DBusMessage *pbap_list_filter_fields(DBusConnection *connection, return reply; } -static GDBusMethodTable pbap_methods[] = { +static const GDBusMethodTable pbap_methods[] = { { "Select", "ss", "", pbap_select, G_DBUS_METHOD_FLAG_ASYNC }, { "PullAll", "", "s", pbap_pull_all, diff --git a/obexd/client/session.c b/obexd/client/session.c index 2c1827f07..5e49f235c 100644 --- a/obexd/client/session.c +++ b/obexd/client/session.c @@ -648,7 +648,7 @@ static DBusMessage *session_get_properties(DBusConnection *connection, return reply; } -static GDBusMethodTable session_methods[] = { +static const GDBusMethodTable session_methods[] = { { "GetProperties", "", "a{sv}", session_get_properties }, { "AssignAgent", "o", "", assign_agent }, { "ReleaseAgent", "o", "", release_agent }, diff --git a/obexd/client/sync.c b/obexd/client/sync.c index 843e17a33..1d71667ac 100644 --- a/obexd/client/sync.c +++ b/obexd/client/sync.c @@ -192,7 +192,7 @@ fail: return reply; } -static GDBusMethodTable sync_methods[] = { +static const GDBusMethodTable sync_methods[] = { { "SetLocation", "s", "", sync_setlocation }, { "GetPhonebook", "", "s", sync_getphonebook, G_DBUS_METHOD_FLAG_ASYNC }, diff --git a/obexd/client/transfer.c b/obexd/client/transfer.c index 541fd2d6b..932010c79 100644 --- a/obexd/client/transfer.c +++ b/obexd/client/transfer.c @@ -205,7 +205,7 @@ static DBusMessage *obc_transfer_cancel(DBusConnection *connection, return NULL; } -static GDBusMethodTable obc_transfer_methods[] = { +static const GDBusMethodTable obc_transfer_methods[] = { { "GetProperties", "", "a{sv}", obc_transfer_get_properties }, { "Cancel", "", "", obc_transfer_cancel, G_DBUS_METHOD_FLAG_ASYNC }, { } diff --git a/obexd/src/manager.c b/obexd/src/manager.c index b9786adad..390da363b 100644 --- a/obexd/src/manager.c +++ b/obexd/src/manager.c @@ -310,7 +310,7 @@ static DBusMessage *transfer_cancel(DBusConnection *connection, return dbus_message_new_method_return(msg); } -static GDBusMethodTable manager_methods[] = { +static const GDBusMethodTable manager_methods[] = { { "RegisterAgent", "o", "", register_agent }, { "UnregisterAgent", "o", "", unregister_agent }, { } @@ -324,7 +324,7 @@ static GDBusSignalTable manager_signals[] = { { } }; -static GDBusMethodTable transfer_methods[] = { +static const GDBusMethodTable transfer_methods[] = { { "Cancel", "", "", transfer_cancel }, { } }; @@ -334,7 +334,7 @@ static GDBusSignalTable transfer_signals[] = { { } }; -static GDBusMethodTable session_methods[] = { +static const GDBusMethodTable session_methods[] = { { "GetProperties", "", "{sv}", get_properties }, { } }; -- 2.47.3