mirror of git://git.sysmocom.de/ofono
Make interface callback tables const
This commit is contained in:
parent
a181ec319b
commit
ab5dcea4fd
|
@ -91,9 +91,9 @@ typedef struct {
|
||||||
|
|
||||||
gboolean g_dbus_register_interface(DBusConnection *connection,
|
gboolean g_dbus_register_interface(DBusConnection *connection,
|
||||||
const char *path, const char *name,
|
const char *path, const char *name,
|
||||||
GDBusMethodTable *methods,
|
const GDBusMethodTable *methods,
|
||||||
GDBusSignalTable *signals,
|
const GDBusSignalTable *signals,
|
||||||
GDBusPropertyTable *properties,
|
const GDBusPropertyTable *properties,
|
||||||
void *user_data,
|
void *user_data,
|
||||||
GDBusDestroyFunction destroy);
|
GDBusDestroyFunction destroy);
|
||||||
gboolean g_dbus_unregister_interface(DBusConnection *connection,
|
gboolean g_dbus_unregister_interface(DBusConnection *connection,
|
||||||
|
|
|
@ -45,9 +45,9 @@ struct generic_data {
|
||||||
|
|
||||||
struct interface_data {
|
struct interface_data {
|
||||||
char *name;
|
char *name;
|
||||||
GDBusMethodTable *methods;
|
const GDBusMethodTable *methods;
|
||||||
GDBusSignalTable *signals;
|
const GDBusSignalTable *signals;
|
||||||
GDBusPropertyTable *properties;
|
const GDBusPropertyTable *properties;
|
||||||
void *user_data;
|
void *user_data;
|
||||||
GDBusDestroyFunction destroy;
|
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)
|
static void generate_interface_xml(GString *gstr, struct interface_data *iface)
|
||||||
{
|
{
|
||||||
GDBusMethodTable *method;
|
const GDBusMethodTable *method;
|
||||||
GDBusSignalTable *signal;
|
const GDBusSignalTable *signal;
|
||||||
|
|
||||||
for (method = iface->methods; method && method->name; method++) {
|
for (method = iface->methods; method && method->name; method++) {
|
||||||
if (!strlen(method->signature) && !strlen(method->reply))
|
if (!strlen(method->signature) && !strlen(method->reply))
|
||||||
|
@ -238,7 +238,7 @@ static DBusHandlerResult generic_message(DBusConnection *connection,
|
||||||
{
|
{
|
||||||
struct generic_data *data = user_data;
|
struct generic_data *data = user_data;
|
||||||
struct interface_data *iface;
|
struct interface_data *iface;
|
||||||
GDBusMethodTable *method;
|
const GDBusMethodTable *method;
|
||||||
const char *interface;
|
const char *interface;
|
||||||
|
|
||||||
interface = dbus_message_get_interface(message);
|
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,
|
static void add_interface(struct generic_data *data, const char *name,
|
||||||
GDBusMethodTable *methods,
|
const GDBusMethodTable *methods,
|
||||||
GDBusSignalTable *signals,
|
const GDBusSignalTable *signals,
|
||||||
GDBusPropertyTable *properties,
|
const GDBusPropertyTable *properties,
|
||||||
void *user_data,
|
void *user_data,
|
||||||
GDBusDestroyFunction destroy)
|
GDBusDestroyFunction destroy)
|
||||||
{
|
{
|
||||||
|
@ -428,7 +428,7 @@ static gboolean check_signal(DBusConnection *conn, const char *path,
|
||||||
{
|
{
|
||||||
struct generic_data *data = NULL;
|
struct generic_data *data = NULL;
|
||||||
struct interface_data *iface;
|
struct interface_data *iface;
|
||||||
GDBusSignalTable *signal;
|
const GDBusSignalTable *signal;
|
||||||
|
|
||||||
*args = NULL;
|
*args = NULL;
|
||||||
if (!dbus_connection_get_object_path_data(conn, path,
|
if (!dbus_connection_get_object_path_data(conn, path,
|
||||||
|
@ -502,9 +502,9 @@ fail:
|
||||||
|
|
||||||
gboolean g_dbus_register_interface(DBusConnection *connection,
|
gboolean g_dbus_register_interface(DBusConnection *connection,
|
||||||
const char *path, const char *name,
|
const char *path, const char *name,
|
||||||
GDBusMethodTable *methods,
|
const GDBusMethodTable *methods,
|
||||||
GDBusSignalTable *signals,
|
const GDBusSignalTable *signals,
|
||||||
GDBusPropertyTable *properties,
|
const GDBusPropertyTable *properties,
|
||||||
void *user_data,
|
void *user_data,
|
||||||
GDBusDestroyFunction destroy)
|
GDBusDestroyFunction destroy)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue