Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/sdpquery add SupportedRepositories attribute for Pho...



details:   https://anonhg.NetBSD.org/src/rev/ccbf51fb7cf8
branches:  trunk
changeset: 746804:ccbf51fb7cf8
user:      plunky <plunky%NetBSD.org@localhost>
date:      Thu Aug 20 11:07:42 2009 +0000

description:
add SupportedRepositories attribute for Phonebook Access profile
providing PhonebookAccessServer service

diffstat:

 usr.bin/sdpquery/print.c |  29 +++++++++++++++++++++++++----
 1 files changed, 25 insertions(+), 4 deletions(-)

diffs (71 lines):

diff -r 9b10c44af5aa -r ccbf51fb7cf8 usr.bin/sdpquery/print.c
--- a/usr.bin/sdpquery/print.c  Thu Aug 20 10:19:36 2009 +0000
+++ b/usr.bin/sdpquery/print.c  Thu Aug 20 11:07:42 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: print.c,v 1.3 2009/07/25 17:32:47 plunky Exp $ */
+/*     $NetBSD: print.c,v 1.4 2009/08/20 11:07:42 plunky Exp $ */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: print.c,v 1.3 2009/07/25 17:32:47 plunky Exp $");
+__RCSID("$NetBSD: print.c,v 1.4 2009/08/20 11:07:42 plunky Exp $");
 
 #include <ctype.h>
 #include <iconv.h>
@@ -110,6 +110,7 @@
 static void print_net_access_type(sdp_data_t *);
 static void print_pnp_source(sdp_data_t *);
 static void print_mas_types(sdp_data_t *);
+static void print_supported_repositories(sdp_data_t *);
 
 static void print_rfcomm(sdp_data_t *);
 static void print_bnep(sdp_data_t *);
@@ -278,6 +279,10 @@
        { 0x0316, "SupportedMessageTypes",              print_mas_types },
 };
 
+attr_t pse_attrs[] = { /* Phonebook Access Server */
+       { 0x0314, "SupportedRepositories",              print_supported_repositories },
+};
+
 #define A(a)   a, __arraycount(a)
 service_t service_list[] = {
        { 0x1000, "Service Discovery Server",           A(sds_attrs) },
@@ -328,8 +333,8 @@
        { 0x112b, "UDI TA",                             NULL, 0 },
        { 0x112c, "Audio/Video",                        NULL, 0 },
        { 0x112d, "SIM Access",                         NULL, 0 },
-       { 0x112e, "Phonebook Access PCE",               NULL, 0 },
-       { 0x112f, "Phonebook Access PSE",               NULL, 0 },
+       { 0x112e, "Phonebook Access Client",            NULL, 0 },
+       { 0x112f, "Phonebook Access Server",            A(pse_attrs) },
        { 0x1130, "Phonebook Access",                   NULL, 0 },
        { 0x1131, "Headset HS",                         NULL, 0 },
        { 0x1132, "Message Access Server",              A(mas_attrs) },
@@ -1325,6 +1330,22 @@
 }
 
 static void
+print_supported_repositories(sdp_data_t *data)
+{
+       uint8_t v;
+
+       if (!sdp_get_uint8(data, &v))
+               return;
+
+       if (Nflag)
+               printf("(0x%02x)", v);
+
+       printf("\n");
+       if (v & (1<<0)) printf("    Local Phonebook\n");
+       if (v & (1<<1)) printf("    SIM Card\n");
+}
+
+static void
 print_rfcomm(sdp_data_t *data)
 {
        uint8_t v;



Home | Main Index | Thread Index | Old Index