summaryrefslogtreecommitdiff
path: root/src/element.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-08-11 08:20:47 +0200
committerMarcel Holtmann <marcel@holtmann.org>2008-08-11 08:20:47 +0200
commitbfff79aeb857855ef025efa294028e34f91d91f0 (patch)
tree0a55178dab634c81512830fb3a278570a90eec26 /src/element.c
parent9b4c51a543c5dd205bf5134f02f446077c1168f0 (diff)
downloadconnman-bfff79aeb857855ef025efa294028e34f91d91f0.tar.gz
connman-bfff79aeb857855ef025efa294028e34f91d91f0.tar.bz2
connman-bfff79aeb857855ef025efa294028e34f91d91f0.zip
Rename connect/disconnect to enable/disable for better semantics
Diffstat (limited to 'src/element.c')
-rw-r--r--src/element.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/element.c b/src/element.c
index d954b634..72290d92 100644
--- a/src/element.c
+++ b/src/element.c
@@ -232,7 +232,7 @@ static DBusMessage *do_update(DBusConnection *conn,
return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
}
-static DBusMessage *do_connect(DBusConnection *conn,
+static DBusMessage *do_enable(DBusConnection *conn,
DBusMessage *msg, void *data)
{
struct connman_element *element = data;
@@ -242,15 +242,15 @@ static DBusMessage *do_connect(DBusConnection *conn,
if (element->driver == NULL)
return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
- if (element->driver->connect) {
- DBG("Calling connect callback");
- element->driver->connect(element);
+ if (element->driver->enable) {
+ DBG("Calling enable callback");
+ element->driver->enable(element);
}
return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
}
-static DBusMessage *do_disconnect(DBusConnection *conn,
+static DBusMessage *do_disable(DBusConnection *conn,
DBusMessage *msg, void *data)
{
struct connman_element *element = data;
@@ -260,9 +260,9 @@ static DBusMessage *do_disconnect(DBusConnection *conn,
if (element->driver == NULL)
return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
- if (element->driver->disconnect) {
- DBG("Calling disconnect callback");
- element->driver->disconnect(element);
+ if (element->driver->disable) {
+ DBG("Calling disable callback");
+ element->driver->disable(element);
}
return g_dbus_create_reply(msg, DBUS_TYPE_INVALID);
@@ -272,8 +272,8 @@ static GDBusMethodTable element_methods[] = {
{ "GetProperties", "", "a{sv}", get_properties },
{ "SetProperty", "sv", "", set_property },
{ "Update", "", "", do_update },
- { "Connect", "", "", do_connect },
- { "Disconnect", "", "", do_disconnect },
+ { "Enable", "", "", do_enable },
+ { "Disable", "", "", do_disable },
{ },
};