summaryrefslogtreecommitdiff
path: root/plugins/phonebook-tracker.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz-von@nokia.com>2011-02-17 10:53:29 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2011-02-17 15:45:01 -0300
commit4f48e26fa73217dde9916fe6e857b1de7fae33cc (patch)
treeb8e32bb6e0bc69595e50a1e941a8bf65e07d37bc /plugins/phonebook-tracker.c
parent90823ed4d7a3be6504a47c1648a1a872c7ee4bc6 (diff)
downloadobexd-4f48e26fa73217dde9916fe6e857b1de7fae33cc.tar.gz
Add workaround for devices which use absolute path in pbap Name header
The pbap spec says: "5.1.2 Name The Name header shall contain the absolute path in the virtual folders architecture of the PSE, appended with the name of the file representation of one of the Phone Book Objects. Example: telecom/pb.vcf or SIM1/telecom/pb.vcf for the main phone book objects." The example actually uses relative paths but text state absolute paths although the OBEX specification says that the Name header is always relative to the current path.
Diffstat (limited to 'plugins/phonebook-tracker.c')
-rw-r--r--plugins/phonebook-tracker.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/plugins/phonebook-tracker.c b/plugins/phonebook-tracker.c
index 28d5c7d..9963aab 100644
--- a/plugins/phonebook-tracker.c
+++ b/plugins/phonebook-tracker.c
@@ -934,15 +934,15 @@ static TrackerSparqlConnection *connection = NULL;
static const char *name2query(const char *name)
{
- if (g_str_equal(name, "telecom/pb.vcf"))
+ if (g_str_equal(name, "/telecom/pb.vcf"))
return CONTACTS_QUERY_ALL;
- else if (g_str_equal(name, "telecom/ich.vcf"))
+ else if (g_str_equal(name, "/telecom/ich.vcf"))
return INCOMING_CALLS_QUERY;
- else if (g_str_equal(name, "telecom/och.vcf"))
+ else if (g_str_equal(name, "/telecom/och.vcf"))
return OUTGOING_CALLS_QUERY;
- else if (g_str_equal(name, "telecom/mch.vcf"))
+ else if (g_str_equal(name, "/telecom/mch.vcf"))
return MISSED_CALLS_QUERY;
- else if (g_str_equal(name, "telecom/cch.vcf"))
+ else if (g_str_equal(name, "/telecom/cch.vcf"))
return COMBINED_CALLS_QUERY;
return NULL;
@@ -950,15 +950,15 @@ static const char *name2query(const char *name)
static const char *name2count_query(const char *name)
{
- if (g_str_equal(name, "telecom/pb.vcf"))
+ if (g_str_equal(name, "/telecom/pb.vcf"))
return CONTACTS_COUNT_QUERY;
- else if (g_str_equal(name, "telecom/ich.vcf"))
+ else if (g_str_equal(name, "/telecom/ich.vcf"))
return INCOMING_CALLS_COUNT_QUERY;
- else if (g_str_equal(name, "telecom/och.vcf"))
+ else if (g_str_equal(name, "/telecom/och.vcf"))
return OUTGOING_CALLS_COUNT_QUERY;
- else if (g_str_equal(name, "telecom/mch.vcf"))
+ else if (g_str_equal(name, "/telecom/mch.vcf"))
return MISSED_CALLS_COUNT_QUERY;
- else if (g_str_equal(name, "telecom/cch.vcf"))
+ else if (g_str_equal(name, "/telecom/cch.vcf"))
return COMBINED_CALLS_COUNT_QUERY;
return NULL;
@@ -1921,11 +1921,11 @@ done:
}
if (data->params->maxlistcount == 0) {
- query = name2count_query("telecom/mch.vcf");
+ query = name2count_query("/telecom/mch.vcf");
col_amount = COUNT_QUERY_COL_AMOUNT;
pull_cb = pull_contacts_size;
} else {
- query = name2query("telecom/mch.vcf");
+ query = name2query("/telecom/mch.vcf");
col_amount = PULL_QUERY_COL_AMOUNT;
pull_cb = pull_contacts;
}
@@ -1971,7 +1971,7 @@ int phonebook_pull_read(void *request)
if(!data)
return -ENOENT;
- if (g_strcmp0(data->req_name, "telecom/mch.vcf") == 0) {
+ if (g_strcmp0(data->req_name, "/telecom/mch.vcf") == 0) {
query = NEW_MISSED_CALLS_LIST;
col_amount = PULL_QUERY_COL_AMOUNT;
pull_cb = pull_newmissedcalls;