summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2008-06-30 14:05:38 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2008-06-30 14:05:38 +0000
commit3005856580174bb25cd0510115bed9499b1f1bdc (patch)
treec9c407b129b8d9e5ca0163d9a509cce67ad1e296 /hcid
parenta22a088109b664efdee397affed55b039cb0999b (diff)
Accept friendly names for discover services
Diffstat (limited to 'hcid')
-rw-r--r--hcid/dbus-sdp.c32
-rw-r--r--hcid/dbus-sdp.h2
-rw-r--r--hcid/device.c3
3 files changed, 1 insertions, 36 deletions
diff --git a/hcid/dbus-sdp.c b/hcid/dbus-sdp.c
index 441e8233..12de5edd 100644
--- a/hcid/dbus-sdp.c
+++ b/hcid/dbus-sdp.c
@@ -281,38 +281,6 @@ void append_and_grow_string(void *data, const char *str)
buff->data_size += len;
}
-/* FIXME: move to a common file */
-sdp_service_t sdp_service[] = {
- { "vcp", VIDEO_CONF_SVCLASS_ID, "Video Conference" },
- { "map", 0, NULL },
- { "pbap", PBAP_SVCLASS_ID, "Phone Book Access" },
- { "sap", SAP_SVCLASS_ID, "SIM Access" },
- { "ftp", OBEX_FILETRANS_SVCLASS_ID, "OBEX File Transfer" },
- { "bpp", BASIC_PRINTING_SVCLASS_ID, "Printing" },
- { "bip", IMAGING_SVCLASS_ID, "Imaging" },
- { "synch", IRMC_SYNC_SVCLASS_ID, "Synchronization" },
- { "dun", DIALUP_NET_SVCLASS_ID, "Dial-Up Networking" },
- { "opp", OBEX_OBJPUSH_SVCLASS_ID, "OBEX Object Push" },
- { "fax", FAX_SVCLASS_ID, "Fax" },
- { "spp", SERIAL_PORT_SVCLASS_ID, "Serial Port" },
- { "hsp", HEADSET_SVCLASS_ID, "Headset" },
- { "hfp", HANDSFREE_SVCLASS_ID, "Handsfree" },
- { NULL }
-};
-
-/* FIXME: move to a common file */
-uint16_t sdp_str2svclass(const char *str)
-{
- sdp_service_t *s;
-
- for (s = sdp_service; s->name; s++) {
- if (strcasecmp(s->name, str) == 0)
- return s->class;
- }
-
- return 0;
-}
-
/* list of remote and local service records */
static GSList *pending_connects = NULL;
diff --git a/hcid/dbus-sdp.h b/hcid/dbus-sdp.h
index dd7bd1c8..06484bbc 100644
--- a/hcid/dbus-sdp.h
+++ b/hcid/dbus-sdp.h
@@ -39,6 +39,4 @@ DBusMessage *get_remote_svc_rec(DBusConnection *conn, DBusMessage *msg,
DBusMessage *finish_remote_svc_transact(DBusConnection *conn,
DBusMessage *msg, void *data);
-uint16_t sdp_str2svclass(const char *str);
-
void append_and_grow_string(void *data, const char *str);
diff --git a/hcid/device.c b/hcid/device.c
index 43ccd4e8..706dcc1d 100644
--- a/hcid/device.c
+++ b/hcid/device.c
@@ -1062,8 +1062,7 @@ static DBusMessage *discover_services(DBusConnection *conn,
if (err < 0)
goto fail;
} else {
-
- search = sdp_str2svclass(pattern);
+ search = bt_string2class(pattern);
if (!search)
return invalid_args(msg);