summaryrefslogtreecommitdiff
path: root/obexd/client
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-11-27 11:18:26 +0100
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-12-02 11:36:00 +0200
commitee0a057f44ecac344db092ca593d4e41bb3486ea (patch)
tree726981ebfb90d09f30a5bd8664faf730f8627342 /obexd/client
parentfb9c29020fa0a5e0df87626fbf46506d1f81ff60 (diff)
downloadbluez-ee0a057f44ecac344db092ca593d4e41bb3486ea.tar.gz
obexd/client: Add FixedImageSize property
This adds FixedImageSize property to PhonebookAccess interface.
Diffstat (limited to 'obexd/client')
-rw-r--r--obexd/client/pbap.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/obexd/client/pbap.c b/obexd/client/pbap.c
index f048aafbd..23980711b 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 },
{ }
};