diff options
author | Gowtham Anandha Babu <gowtham.ab@samsung.com> | 2014-10-15 19:09:41 +0530 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-10-16 09:43:04 +0200 |
commit | d0f7fd035f4a5f5e914450133fac843d09150496 (patch) | |
tree | 55caa74652e32ce11f4683217318ca2604c64f0c /obexd | |
parent | 3902d2949d4b12c0d3ee6b54cb714b64c3b2a7c3 (diff) | |
download | bluez-d0f7fd035f4a5f5e914450133fac843d09150496.tar.gz |
obexd/client/pbap: Add support for spd,fav
Add support for the speed-dial and favorite folders.
Diffstat (limited to 'obexd')
-rw-r--r-- | obexd/client/pbap.c | 11 | ||||
-rw-r--r-- | obexd/plugins/phonebook.h | 4 |
2 files changed, 12 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); diff --git a/obexd/plugins/phonebook.h b/obexd/plugins/phonebook.h index fff33c1a4..70a9cb797 100644 --- a/obexd/plugins/phonebook.h +++ b/obexd/plugins/phonebook.h @@ -37,6 +37,8 @@ #define PB_CALLS_INCOMING_FOLDER "/telecom/ich" #define PB_CALLS_MISSED_FOLDER "/telecom/mch" #define PB_CALLS_OUTGOING_FOLDER "/telecom/och" +#define PB_CALLS_SPEEDDIAL_FOLDER "/telecom/spd" +#define PB_CALLS_FAVORITE_FOLDER "/telecom/fav" #define PB_LUID_FOLDER "/telecom/pb/luid" #define PB_CONTACTS "/telecom/pb.vcf" @@ -44,6 +46,8 @@ #define PB_CALLS_INCOMING "/telecom/ich.vcf" #define PB_CALLS_MISSED "/telecom/mch.vcf" #define PB_CALLS_OUTGOING "/telecom/och.vcf" +#define PB_CALLS_SPEEDDIAL "/telecom/spd.vcf" +#define PB_CALLS_FAVORITE "/telecom/fav.vcf" #define PB_DEVINFO "/telecom/devinfo.txt" #define PB_INFO_LOG "/telecom/pb/info.log" #define PB_CC_LOG "/telecom/pb/luid/cc.log" |