diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2005-03-09 17:01:54 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2005-03-09 17:01:54 +0000 |
commit | 210da6834b4b6f219b0331cddacdd6e915dbb8fe (patch) | |
tree | 82162b9aa7ffa308af5dda3b5b00794810d3dfda /tools/sdptool.c | |
parent | 64386bf323447b173ed9e6cb444d26af4b7f8db6 (diff) |
Add language attributes
Diffstat (limited to 'tools/sdptool.c')
-rw-r--r-- | tools/sdptool.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tools/sdptool.c b/tools/sdptool.c index bed5e90e..5c93dd69 100644 --- a/tools/sdptool.c +++ b/tools/sdptool.c @@ -920,6 +920,20 @@ typedef struct { unsigned int channel; } svc_info_t; +static void add_lang_attr(sdp_record_t *r) +{ + sdp_lang_attr_t base_lang; + sdp_list_t *langs = 0; + + /* UTF-8 MIBenum (http://www.iana.org/assignments/character-sets) */ + base_lang.code_ISO639 = (0x65 << 8) | 0x6e; + base_lang.encoding = 106; + base_lang.base_offset = SDP_PRIMARY_LANG_BASE; + langs = sdp_list_append(0, &base_lang); + sdp_set_lang_attr(r, langs); + sdp_list_free(langs, 0); +} + static int add_sp(sdp_session_t *session, svc_info_t *si) { sdp_list_t *svclass_id, *apseq, *proto[2], *profiles, *root, *aproto; @@ -961,7 +975,9 @@ static int add_sp(sdp_session_t *session, svc_info_t *si) aproto = sdp_list_append(0, apseq); sdp_set_access_protos(&record, aproto); - sdp_set_info_attr(&record, "Serial Port", 0, 0); + add_lang_attr(&record); + + sdp_set_info_attr(&record, "Serial Port", 0, "COM Port"); if (sdp_record_register(session, &record, SDP_RECORD_PERSIST) < 0) { printf("Service Record registration failed\n"); |