From 6a7a6d66462ced151cf7a3fc47860cbbc446d2d1 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 16 Nov 2012 15:37:29 +0200 Subject: [PATCH] core: Add default PBAP Server service record --- src/profile.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/src/profile.c b/src/profile.c index ae73ccc3e..7d56edcb3 100644 --- a/src/profile.c +++ b/src/profile.c @@ -351,6 +351,49 @@ \ " +#define PSE_RECORD \ + " \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + " + struct ext_io; struct ext_profile { @@ -1397,6 +1440,13 @@ static char *get_pce_record(struct ext_profile *ext, struct ext_io *l2cap, return g_strdup_printf(PCE_RECORD, ext->version, ext->name); } +static char *get_pse_record(struct ext_profile *ext, struct ext_io *l2cap, + struct ext_io *rfcomm) +{ + return g_strdup_printf(PSE_RECORD, rfcomm->chan, ext->version, + ext->name); +} + static char *get_opp_record(struct ext_profile *ext, struct ext_io *l2cap, struct ext_io *rfcomm) { @@ -1498,6 +1548,8 @@ static struct default_settings { .uuid = OBEX_PSE_UUID, .name = "Phone Book Access", .channel = PBAP_DEFAULT_CHANNEL, + .get_record = get_pse_record, + .version = 0x0101, }, { .uuid = OBEX_PCE_UUID, .name = "Phone Book Access Client", -- 2.47.3