diff options
| author | Marcel Holtmann <marcel@holtmann.org> | 2008-12-01 19:50:15 +0100 | 
|---|---|---|
| committer | Marcel Holtmann <marcel@holtmann.org> | 2008-12-01 19:50:15 +0100 | 
| commit | 5112255d4578887d616560ece01474de1b5d0c12 (patch) | |
| tree | f6186e67515fd502cb92568a3af96db607580227 | |
| parent | a9aef73a05fe26cc930fa9f73116ce5ae97f5b98 (diff) | |
Remove deprecated methods and signals from network interface
| -rw-r--r-- | doc/network-api.txt | 10 | ||||
| -rw-r--r-- | network/connection.c | 34 | 
2 files changed, 1 insertions, 43 deletions
| diff --git a/doc/network-api.txt b/doc/network-api.txt index 88b1be1a..72711931 100644 --- a/doc/network-api.txt +++ b/doc/network-api.txt @@ -29,20 +29,12 @@ Methods		string Connect(string uuid)  			Possible errors: org.bluez.Error.Failed -		bool IsConnected() {deprecated} - -			Returns the connection status. -  		dict GetProperties()  			Returns all properties for the interface. See the  			properties section for available properties. -Signals		void Connected(string device, string uuid) {deprecated} - -		void Disconnected(string device) {deprecated} - -		PropertyChanged(string name, variant value) +Signals		PropertyChanged(string name, variant value)  			This signal indicates a changed value of the given  			property. diff --git a/network/connection.c b/network/connection.c index 8d4a2ed7..ea954ade 100644 --- a/network/connection.c +++ b/network/connection.c @@ -137,13 +137,8 @@ static gboolean bnep_watchdog_cb(GIOChannel *chan, GIOCondition cond,  	struct network_conn *nc = data;  	if (connection != NULL) { -		const char *device = nc->dev;  		gboolean connected = FALSE;  		const char *property = ""; -		g_dbus_emit_signal(connection, nc->peer->path, -				NETWORK_PEER_INTERFACE, "Disconnected", -				DBUS_TYPE_STRING, &device, -				DBUS_TYPE_INVALID);  		emit_property_changed(connection, nc->peer->path,  					NETWORK_PEER_INTERFACE, "Connected",  					DBUS_TYPE_BOOLEAN, &connected); @@ -247,11 +242,6 @@ static gboolean bnep_connect_cb(GIOChannel *chan, GIOCondition cond,  			DBUS_TYPE_INVALID);  	connected = TRUE; -	g_dbus_emit_signal(connection, nc->peer->path, -			NETWORK_PEER_INTERFACE, "Connected", -			DBUS_TYPE_STRING, &pdev, -			DBUS_TYPE_STRING, &uuid, -			DBUS_TYPE_INVALID);  	emit_property_changed(connection, nc->peer->path,  				NETWORK_PEER_INTERFACE, "Connected",  				DBUS_TYPE_BOOLEAN, &connected); @@ -438,26 +428,6 @@ static DBusMessage *connection_disconnect(DBusConnection *conn,  	return not_connected(msg);  } -static DBusMessage *is_connected(DBusConnection *conn, -				DBusMessage *msg, void *data) -{ -	struct network_peer *peer = data; -	GSList *l; -	dbus_bool_t up = FALSE; - -	for (l = peer->connections; l; l = l->next) { -		struct network_conn *nc = l->data; - -		if (nc->state != CONNECTED) -			continue; - -		up = TRUE; -	} - -	return g_dbus_create_reply(msg, DBUS_TYPE_BOOLEAN, &up, -						DBUS_TYPE_INVALID); -} -  static DBusMessage *connection_get_properties(DBusConnection *conn,  					DBusMessage *msg, void *data)  { @@ -543,15 +513,11 @@ static GDBusMethodTable connection_methods[] = {  	{ "Connect",		"s",	"s",	connection_connect,  						G_DBUS_METHOD_FLAG_ASYNC },  	{ "Disconnect",		"",	"",	connection_disconnect	}, -	{ "IsConnected",	"",	"b",	is_connected, -						G_DBUS_METHOD_FLAG_DEPRECATED },  	{ "GetProperties",	"",	"a{sv}",connection_get_properties },  	{ }  };  static GDBusSignalTable connection_signals[] = { -	{ "Connected",		"",	G_DBUS_SIGNAL_FLAG_DEPRECATED}, -	{ "Disconnected",	"",	G_DBUS_SIGNAL_FLAG_DEPRECATED},  	{ "PropertyChanged",	"sv"	},  	{ }  }; | 
