summaryrefslogtreecommitdiff
path: root/src/sdpd-database.c
diff options
context:
space:
mode:
authorFrancisco Alecrim <francisco.alecrim@openbossa.org>2010-04-07 12:25:49 -0400
committerJohan Hedberg <johan.hedberg@nokia.com>2010-04-07 20:31:03 +0300
commit9266dfeac26b7c572f35f698f4f608229f821905 (patch)
tree7f32f2e6e9ff41c0dcc77eb0035f1638d755852b /src/sdpd-database.c
parentb5eb420ebfde4c777c076dda0831f00204bb9d3b (diff)
downloadbluez-9266dfeac26b7c572f35f698f4f608229f821905.tar.gz
Report local services(UUIDs) through D-Bus
* Include UUIDs field to method GetProperties(org.bluez.Adapter). Applications can get local services(UUIDs) available through D-Bus. * UUIDs per-adapter stored at btd_adapter to prevent some searches not necessary regarding it requires information from access_db and service_db. * Emit Adapter.PropertyChanged signal when UUIDs change.
Diffstat (limited to 'src/sdpd-database.c')
-rw-r--r--src/sdpd-database.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sdpd-database.c b/src/sdpd-database.c
index 07a0bc397..224a4e74a 100644
--- a/src/sdpd-database.c
+++ b/src/sdpd-database.c
@@ -40,6 +40,7 @@
#include "sdpd.h"
#include "logging.h"
+#include "adapter.h"
static sdp_list_t *service_db;
static sdp_list_t *access_db;
@@ -183,6 +184,8 @@ void sdp_record_add(const bdaddr_t *device, sdp_record_t *rec)
dev->handle = rec->handle;
access_db = sdp_list_insert_sorted(access_db, dev, access_sort);
+
+ adapter_service_insert(device, rec);
}
static sdp_list_t *record_locate(uint32_t handle)
@@ -252,6 +255,7 @@ int sdp_record_remove(uint32_t handle)
if (p) {
a = (sdp_access_t *) p->data;
if (a) {
+ adapter_service_remove(&a->device, r);
access_db = sdp_list_remove(access_db, a);
access_free(a);
}