From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 03/11] core: Add SYNC record
Date: Wed, 12 Dec 2012 13:52:08 +0200 [thread overview]
Message-ID: <1355313136-7891-3-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1355313136-7891-1-git-send-email-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds SYNC record to detault settings
---
src/profile.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/src/profile.c b/src/profile.c
index a3dd372..53d32b6 100644
--- a/src/profile.c
+++ b/src/profile.c
@@ -436,6 +436,46 @@
</attribute> \
</record>"
+#define SYNC_RECORD \
+ "<?xml version=\"1.0\" encoding=\"UTF-8\" ?> \
+ <record> \
+ <attribute id=\"0x0001\"> \
+ <sequence> \
+ <uuid value=\"0x1104\"/> \
+ </sequence> \
+ </attribute> \
+ <attribute id=\"0x0004\"> \
+ <sequence> \
+ <sequence> \
+ <uuid value=\"0x0100\"/> \
+ </sequence> \
+ <sequence> \
+ <uuid value=\"0x0003\"/> \
+ <uint8 value=\"0x%02x\"/> \
+ </sequence> \
+ <sequence> \
+ <uuid value=\"0x0008\"/> \
+ </sequence> \
+ </sequence> \
+ </attribute> \
+ <attribute id=\"0x0009\"> \
+ <sequence> \
+ <sequence> \
+ <uuid value=\"0x1104\"/> \
+ <uint16 value=\"0x%04x\" /> \
+ </sequence> \
+ </sequence> \
+ </attribute> \
+ <attribute id=\"0x0100\"> \
+ <text value=\"%s\"/> \
+ </attribute> \
+ <attribute id=\"0x0301\"> \
+ <sequence> \
+ <uint8 value=\"0x01\"/> \
+ </sequence> \
+ </attribute> \
+ </record>"
+
#define GENERIC_RECORD \
"<?xml version=\"1.0\" encoding=\"UTF-8\" ?> \
<record> \
@@ -1618,6 +1658,13 @@ static char *get_mas_record(struct ext_profile *ext, struct ext_io *l2cap,
ext->name);
}
+static char *get_sync_record(struct ext_profile *ext, struct ext_io *l2cap,
+ struct ext_io *rfcomm)
+{
+ return g_strdup_printf(SYNC_RECORD, rfcomm->chan, ext->version,
+ ext->name);
+}
+
static char *get_opp_record(struct ext_profile *ext, struct ext_io *l2cap,
struct ext_io *rfcomm)
{
@@ -1777,6 +1824,8 @@ static struct default_settings {
.uuid = OBEX_SYNC_UUID,
.name = "Synchronization",
.channel = SYNC_DEFAULT_CHANNEL,
+ .get_record = get_sync_record,
+ .version = 0x0100,
}, {
.uuid = OBEX_PSE_UUID,
.name = "Phone Book Access",
--
1.7.11.7
next prev parent reply other threads:[~2012-12-12 11:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-12 11:52 [PATCH BlueZ 01/11] obexd: Port bluetooth plugin to use external profile support Luiz Augusto von Dentz
2012-12-12 11:52 ` [PATCH BlueZ 02/11] core: Add MAS record Luiz Augusto von Dentz
2012-12-12 11:52 ` Luiz Augusto von Dentz [this message]
2012-12-12 11:52 ` [PATCH BlueZ 04/11] obexd: Enable support for MAS profile Luiz Augusto von Dentz
2012-12-12 11:52 ` [PATCH BlueZ 05/11] obexd: Enable support SYNC profile Luiz Augusto von Dentz
2012-12-12 11:52 ` [PATCH BlueZ 06/11] obexd: Add support for custom records Luiz Augusto von Dentz
2012-12-12 11:52 ` [PATCH BlueZ 07/11] opp: Remove record details Luiz Augusto von Dentz
2012-12-12 11:52 ` [PATCH BlueZ 08/11] ftp: " Luiz Augusto von Dentz
2012-12-12 11:52 ` [PATCH BlueZ 09/11] pbap: " Luiz Augusto von Dentz
2012-12-12 11:52 ` [PATCH BlueZ 10/11] mas: " Luiz Augusto von Dentz
2012-12-12 11:52 ` [PATCH BlueZ 11/11] irmc: " Luiz Augusto von Dentz
2012-12-12 12:02 ` [PATCH BlueZ 01/11] obexd: Port bluetooth plugin to use external profile support Johan Hedberg
2012-12-12 16:38 ` Mikel Astiz
2012-12-12 18:55 ` Johan Hedberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1355313136-7891-3-git-send-email-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).