aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2012-05-18 16:59:48 -0300
committerMarcel Holtmann <marcel@holtmann.org>2012-05-18 15:04:59 -0700
commit6f17cb45e4c56255f3cb2edccfeb746795aa53c4 (patch)
tree8a235b51d66d35100f45006255577ee2561e8de3
parent75d8091043799f65fcb761c8e1e0e12b5900a6a0 (diff)
downloadmmsd-6f17cb45e4c56255f3cb2edccfeb746795aa53c4.tar.gz
Constify GDBus tables
Constify method tables with the following commands: find . -name '*.[ch]' -exec sed -i \ 's/\(c\)\(GDBusSignalTable .* =\)/\1 const \2/g' {} \; find . -name '*.[ch]' -exec sed -i \ 's/\(c\)\(GDBusMethodTable .* =\)/\1 const \2/g' {} \;
-rw-r--r--plugins/ofono.c2
-rw-r--r--src/service.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/plugins/ofono.c b/plugins/ofono.c
index f598c5e..29e8f06 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -114,7 +114,7 @@ static DBusMessage *agent_release(DBusConnection *conn,
return NULL;
}
-static GDBusMethodTable agent_methods[] = {
+static const GDBusMethodTable agent_methods[] = {
{ "ReceiveNotification", "aya{sv}", "", agent_receive },
{ "Release", "", "", agent_release,
G_DBUS_METHOD_FLAG_NOREPLY },
diff --git a/src/service.c b/src/service.c
index 6bcdede..a269556 100644
--- a/src/service.c
+++ b/src/service.c
@@ -222,13 +222,13 @@ static DBusMessage *msg_mark_read(DBusConnection *conn,
return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
}
-static GDBusMethodTable message_methods[] = {
+static const GDBusMethodTable message_methods[] = {
{ "MarkRead", "", "", msg_mark_read },
{ "Delete", "", "", msg_delete },
{ }
};
-static GDBusSignalTable message_signals[] = {
+static const GDBusSignalTable message_signals[] = {
{ "PropertyChanged", "sv" },
{ }
};
@@ -979,14 +979,14 @@ release_msg:
return __mms_error_trans_failure(dbus_msg);
}
-static GDBusMethodTable service_methods[] = {
+static const GDBusMethodTable service_methods[] = {
{ "SendMessage", "assa(sss)", "o", send_message },
{ "GetMessages", "", "a(oa{sv})", get_messages },
{ "GetConversation", "su", "a(oa{sv})", get_conversation },
{ }
};
-static GDBusSignalTable service_signals[] = {
+static const GDBusSignalTable service_signals[] = {
{ "MessageAdded", "oa{sv}" },
{ "MessageRemoved", "o" },
{ }
@@ -2342,12 +2342,12 @@ static DBusMessage *get_services(DBusConnection *conn,
return reply;
}
-static GDBusMethodTable manager_methods[] = {
+static const GDBusMethodTable manager_methods[] = {
{ "GetServices", "", "a(oa{sv})", get_services },
{ }
};
-static GDBusSignalTable manager_signals[] = {
+static const GDBusSignalTable manager_signals[] = {
{ "ServiceAdded", "oa{sv}" },
{ "ServiceRemoved", "o" },
{ }