summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArron Wang <arron.wang@intel.com>2013-05-13 09:58:57 +0800
committerArron Wang <arron.wang@intel.com>2013-07-09 08:26:33 +0800
commit2b9f59d4652df3de56d19aa6ef3974f3b6fdc0f0 (patch)
tree0088bfe8030b9b04318bcdd228a586e865bcef8d
parente05a07fed0ec39d718f7f6e800fa03faccf5b631 (diff)
downloadneard-2b9f59d4652df3de56d19aa6ef3974f3b6fdc0f0.tar.gz
neard-2b9f59d4652df3de56d19aa6ef3974f3b6fdc0f0.tar.bz2
neard-2b9f59d4652df3de56d19aa6ef3974f3b6fdc0f0.zip
Add adapter powered signal
Change-Id: I7bf650500d907d3cdfbb2df1d8aa5fa5ae77bb26
-rw-r--r--src/adapter.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/adapter.c b/src/adapter.c
index e303b3a..0ee15da 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -144,6 +144,15 @@ static void polling_changed(struct near_adapter *adapter)
DBUS_TYPE_BOOLEAN, &adapter->polling);
}
+static void powered_changed(struct near_adapter *adapter)
+{
+
+ near_dbus_property_changed_basic(adapter->path,
+ NFC_ADAPTER_INTERFACE, "Powered",
+ DBUS_TYPE_BOOLEAN, &adapter->powered);
+}
+
+
static void rf_mode_changed(struct near_adapter *adapter)
{
const char *rf_mode = rf_mode_to_string(adapter);
@@ -419,6 +428,7 @@ static DBusMessage *set_property(DBusConnection *conn,
}
adapter->powered = powered;
+ powered_changed(adapter);
} else {
return __near_error_invalid_property(msg);
}