From 6ada90b812f8199950ab931723e9be993adc02b8 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 15 Nov 2012 13:52:16 +0200 Subject: [PATCH] core: Add default SPP record for external profiles --- src/profile.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/src/profile.c b/src/profile.c index 07c61b0fb..76df2ca5b 100644 --- a/src/profile.c +++ b/src/profile.c @@ -150,6 +150,43 @@ \ " +#define SPP_RECORD \ + " \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + " + struct ext_profile { struct btd_profile p; @@ -1088,6 +1125,11 @@ static char *get_hfp_ag_record(struct ext_profile *ext) ext->name, ext->features); } +static char *get_spp_record(struct ext_profile *ext) +{ + return g_strdup_printf(SPP_RECORD, ext->chan, ext->version, ext->name); +} + static struct default_settings { const char *uuid; const char *name; @@ -1104,6 +1146,8 @@ static struct default_settings { .uuid = SPP_UUID, .name = "Serial Port", .channel = SPP_DEFAULT_CHANNEL, + .get_record = get_spp_record, + .version = 0x0102, }, { .uuid = DUN_GW_UUID, .name = "Dialup Networking", -- 2.47.3