Diff between 3902d2949d4b12c0d3ee6b54cb714b64c3b2a7c3 and d0f7fd035f4a5f5e914450133fac843d09150496

Changed Files

File Additions Deletions Status
doc/obex-api.txt +2 -0 modified
obexd/client/pbap.c +8 -3 modified
obexd/plugins/phonebook.h +4 -0 modified

Full Patch

diff --git a/doc/obex-api.txt b/doc/obex-api.txt
index a39abc0..349fe4c 100644
--- a/doc/obex-api.txt
+++ b/doc/obex-api.txt
@@ -341,6 +341,8 @@ Methods		void Select(string location, string phonebook)
 				"och":	outgoing call history
 				"mch":	missing call history
 				"cch":	combination of ich och mch
+				"spd":	speed dials entry ( only for "internal" )
+				"fav":	favorites entry ( only for "internal" )
 
 			Possible errors: org.bluez.obex.Error.InvalidArguments
 					 org.bluez.obex.Error.Failed
diff --git a/obexd/client/pbap.c b/obexd/client/pbap.c
index 2089860..5c28455 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 fff33c1..70a9cb7 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"