summaryrefslogtreecommitdiff
path: root/gdbus
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-03-07 22:32:48 (GMT)
committerMarcel Holtmann <marcel@holtmann.org>2010-03-07 22:33:24 (GMT)
commit9da2f8434a60312d1b18cf3fb306cf368ab3b18c (patch)
tree44ea7f13b5691ae6464e9786f3287c7e78532038 /gdbus
parenta40f41a4374f0af01a83f209c46cd64ce62c9e43 (diff)
downloadconnman-9da2f8434a60312d1b18cf3fb306cf368ab3b18c.zip
connman-9da2f8434a60312d1b18cf3fb306cf368ab3b18c.tar.gz
connman-9da2f8434a60312d1b18cf3fb306cf368ab3b18c.tar.bz2
Make interface callback tables const
Diffstat (limited to 'gdbus')
-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 77b8aee..47e18cf 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 9dc3835..8da2dab 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)
{