Linux bluetooth development
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 6/8] obexd/client: Add FixedImageSize property
Date: Mon,  1 Dec 2014 10:47:16 +0200	[thread overview]
Message-ID: <1417423638-29222-6-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1417423638-29222-1-git-send-email-luiz.dentz@gmail.com>

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This adds FixedImageSize property to PhonebookAccess interface.
---
 doc/obex-api.txt    |  7 +++++++
 obexd/client/pbap.c | 19 +++++++++++++++++++
 2 files changed, 26 insertions(+)

diff --git a/doc/obex-api.txt b/doc/obex-api.txt
index 44af2fa..32f9a79 100644
--- a/doc/obex-api.txt
+++ b/doc/obex-api.txt
@@ -519,6 +519,13 @@ Properties	string Folder [readonly]
 			Possible values: 32-character hexadecimal such
 			as A1A2A3A4B1B2C1C2D1D2E1E2E3E4E5E6
 
+		bool FixedImageSize [readonly, optional]
+
+			Indicate support for fixed image size.
+
+			Possible values: True if image is JPEG 300x300 pixels
+			otherwise False.
+
 Synchronization hierarchy
 =========================
 
diff --git a/obexd/client/pbap.c b/obexd/client/pbap.c
index f048aaf..2398071 100644
--- a/obexd/client/pbap.c
+++ b/obexd/client/pbap.c
@@ -1148,11 +1148,30 @@ static gboolean get_secondary(const GDBusPropertyTable *property,
 	return TRUE;
 }
 
+static gboolean image_size_exists(const GDBusPropertyTable *property,
+								void *data)
+{
+	struct pbap_data *pbap = data;
+
+	return pbap->supported_features & DEFAULT_IMAGE_FEATURE;
+}
+
+static gboolean get_image_size(const GDBusPropertyTable *property,
+					DBusMessageIter *iter, void *data)
+{
+	dbus_bool_t value = TRUE;
+
+	dbus_message_iter_append_basic(iter, DBUS_TYPE_BOOLEAN, &value);
+
+	return TRUE;
+}
+
 static const GDBusPropertyTable pbap_properties[] = {
 	{ "Folder", "s", get_folder, NULL, folder_exists },
 	{ "DatabaseIdentifier", "s", get_databaseid, NULL, databaseid_exists },
 	{ "PrimaryCounter", "s", get_primary, NULL, version_exists },
 	{ "SecondaryCounter", "s", get_secondary, NULL, version_exists },
+	{ "FixedImageSize", "b", get_image_size, NULL, image_size_exists },
 	{ }
 };
 
-- 
1.9.3


  parent reply	other threads:[~2014-12-01  8:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-01  8:47 [PATCH BlueZ 1/8] obexd/client: Add support for reading version Luiz Augusto von Dentz
2014-12-01  8:47 ` [PATCH BlueZ 2/8] obexd/client: Parse PBAP record Luiz Augusto von Dentz
2014-12-01  8:47 ` [PATCH BlueZ 3/8] obexd/client: Add Folder property Luiz Augusto von Dentz
2014-12-01  8:47 ` [PATCH BlueZ 4/8] obexd/client: Add DatabaseIdentifier property Luiz Augusto von Dentz
2014-12-01  8:47 ` [PATCH BlueZ 5/8] obexd/client: Add folder counters properties Luiz Augusto von Dentz
2014-12-01  8:47 ` Luiz Augusto von Dentz [this message]
2014-12-01  8:47 ` [PATCH BlueZ 7/8] obexd/client: Add UpdateVersion to PhonebookAccess Luiz Augusto von Dentz
2014-12-01  8:47 ` [PATCH BlueZ 8/8] obexd/client: Add supported_features support Luiz Augusto von Dentz
2014-12-01 12:17   ` Gowtham Anandha Babu
2014-12-01 12:51     ` Luiz Augusto von Dentz
2014-12-01 13:31       ` Gowtham Anandha Babu
2014-12-01 13:34         ` Luiz Augusto von Dentz
2014-12-01 14:00           ` Luiz Augusto von Dentz
     [not found]             ` <003c01d00d71$f818ba20$e84a2e60$@samsung.com>
2014-12-01 14:41               ` Luiz Augusto von Dentz
2014-12-02  6:37                 ` Gowtham Anandha Babu
2014-12-02  9:32                   ` Luiz Augusto von Dentz
2014-12-02  9:39 ` [PATCH BlueZ 1/8] obexd/client: Add support for reading version Luiz Augusto von Dentz

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=1417423638-29222-6-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