summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-03-07 14:32:48 -0800
committerMarcel Holtmann <marcel@holtmann.org>2010-03-07 14:33:24 -0800
commit9da2f8434a60312d1b18cf3fb306cf368ab3b18c (patch)
tree44ea7f13b5691ae6464e9786f3287c7e78532038
parenta40f41a4374f0af01a83f209c46cd64ce62c9e43 (diff)
downloadconnman-9da2f8434a60312d1b18cf3fb306cf368ab3b18c.tar.gz
connman-9da2f8434a60312d1b18cf3fb306cf368ab3b18c.tar.bz2
connman-9da2f8434a60312d1b18cf3fb306cf368ab3b18c.zip
Make interface callback tables const
-rw-r--r--gdbus/gdbus.h6
-rw-r--r--gdbus/object.c26
2 files changed, 16 insertions, 16 deletions
diff --git a/gdbus/gdbus.h b/gdbus/gdbus.h
index 77b8aee1..47e18cfb 100644
--- a/gdbus/gdbus.h
+++ b/gdbus/gdbus.h
@@ -91,9 +91,9 @@ typedef struct {
gboolean g_dbus_register_interface(DBusConnection *connection,
const char *path, const char *name,
- GDBusMethodTable *methods,
- GDBusSignalTable *signals,
- GDBusPropertyTable *properties,
+ const GDBusMethodTable *methods,
+ const GDBusSignalTable *signals,
+ const GDBusPropertyTable *properties,
void *user_data,
GDBusDestroyFunction destroy);
gboolean g_dbus_unregister_interface(DBusConnection *connection,
diff --git a/gdbus/object.c b/gdbus/object.c
index 9dc3835b..8da2dabf 100644
--- a/gdbus/object.c
+++ b/gdbus/object.c
@@ -45,9 +45,9 @@ struct generic_data {
struct interface_data {
char *name;
- GDBusMethodTable *methods;
- GDBusSignalTable *signals;
- GDBusPropertyTable *properties;
+ const GDBusMethodTable *methods;
+ const GDBusSignalTable *signals;
+ const GDBusPropertyTable *properties;
void *user_data;
GDBusDestroyFunction destroy;
};
@@ -114,8 +114,8 @@ static void print_arguments(GString *gstr, const char *sig,
static void generate_interface_xml(GString *gstr, struct interface_data *iface)
{
- GDBusMethodTable *method;
- GDBusSignalTable *signal;
+ const GDBusMethodTable *method;
+ const GDBusSignalTable *signal;
for (method = iface->methods; method && method->name; method++) {
if (!strlen(method->signature) && !strlen(method->reply))
@@ -238,7 +238,7 @@ static DBusHandlerResult generic_message(DBusConnection *connection,
{
struct generic_data *data = user_data;
struct interface_data *iface;
- GDBusMethodTable *method;
+ const GDBusMethodTable *method;
const char *interface;
interface = dbus_message_get_interface(message);
@@ -327,9 +327,9 @@ static GDBusMethodTable introspect_methods[] = {
};
static void add_interface(struct generic_data *data, const char *name,
- GDBusMethodTable *methods,
- GDBusSignalTable *signals,
- GDBusPropertyTable *properties,
+ const GDBusMethodTable *methods,
+ const GDBusSignalTable *signals,
+ const GDBusPropertyTable *properties,
void *user_data,
GDBusDestroyFunction destroy)
{
@@ -428,7 +428,7 @@ static gboolean check_signal(DBusConnection *conn, const char *path,
{
struct generic_data *data = NULL;
struct interface_data *iface;
- GDBusSignalTable *signal;
+ const GDBusSignalTable *signal;
*args = NULL;
if (!dbus_connection_get_object_path_data(conn, path,
@@ -502,9 +502,9 @@ fail:
gboolean g_dbus_register_interface(DBusConnection *connection,
const char *path, const char *name,
- GDBusMethodTable *methods,
- GDBusSignalTable *signals,
- GDBusPropertyTable *properties,
+ const GDBusMethodTable *methods,
+ const GDBusSignalTable *signals,
+ const GDBusPropertyTable *properties,
void *user_data,
GDBusDestroyFunction destroy)
{