summaryrefslogtreecommitdiff
path: root/obexd/client
diff options
context:
space:
mode:
authorGowtham Anandha Babu <gowtham.ab@samsung.com>2014-10-15 19:09:41 +0530
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-10-16 09:43:04 +0200
commitd0f7fd035f4a5f5e914450133fac843d09150496 (patch)
tree55caa74652e32ce11f4683217318ca2604c64f0c /obexd/client
parent3902d2949d4b12c0d3ee6b54cb714b64c3b2a7c3 (diff)
downloadbluez-d0f7fd035f4a5f5e914450133fac843d09150496.tar.gz
obexd/client/pbap: Add support for spd,fav
Add support for the speed-dial and favorite folders.
Diffstat (limited to 'obexd/client')
-rw-r--r--obexd/client/pbap.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/obexd/client/pbap.c b/obexd/client/pbap.c
index 20898601e..5c28455b2 100644
--- a/obexd/client/pbap.c
+++ b/obexd/client/pbap.c
@@ -180,14 +180,17 @@ static const GMarkupParser listing_parser = {
NULL,
NULL
};
+
static char *build_phonebook_path(const char *location, const char *item)
{
char *path = NULL, *tmp, *tmp1;
+ gboolean internal = FALSE;
if (!g_ascii_strcasecmp(location, "int") ||
- !g_ascii_strcasecmp(location, "internal"))
+ !g_ascii_strcasecmp(location, "internal")) {
path = g_strdup("/telecom");
- else if (!g_ascii_strncasecmp(location, "sim", 3)) {
+ internal = TRUE;
+ } else if (!g_ascii_strncasecmp(location, "sim", 3)) {
if (strlen(location) == 3)
tmp = g_strdup("sim1");
else
@@ -202,7 +205,9 @@ static char *build_phonebook_path(const char *location, const char *item)
!g_ascii_strcasecmp(item, "ich") ||
!g_ascii_strcasecmp(item, "och") ||
!g_ascii_strcasecmp(item, "mch") ||
- !g_ascii_strcasecmp(item, "cch")) {
+ !g_ascii_strcasecmp(item, "cch") ||
+ (internal && !g_ascii_strcasecmp(item, "spd")) ||
+ (internal && !g_ascii_strcasecmp(item, "fav"))) {
tmp = path;
tmp1 = g_ascii_strdown(item, -1);
path = g_build_filename(tmp, tmp1, NULL);