From 3a55cafdb9f1bd024999e0488119b46b9fb2d32b Mon Sep 17 00:00:00 2001 From: Vinicius Costa Gomes Date: Fri, 23 Apr 2010 14:26:23 -0300 Subject: [PATCH] obexd: use nmo:isSent and nmo:isAnswered properties Instead of comparing nmo:to and nmo:from with the default owner contact, check whether the message was sent. nmo:isAnswered is used to tell if that call was missed. --- obexd/plugins/phonebook-tracker.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/obexd/plugins/phonebook-tracker.c b/obexd/plugins/phonebook-tracker.c index 82068dc30..8340c57b4 100644 --- a/obexd/plugins/phonebook-tracker.c +++ b/obexd/plugins/phonebook-tracker.c @@ -76,8 +76,8 @@ "WHERE { " \ "?call a nmo:Call ; " \ "nmo:from ?contact ; " \ - "nmo:to ; " \ - "nmo:isRead false ." \ + "nmo:isSent false ; " \ + "nmo:isAnswered false ." \ "?contact a nco:PersonContact ; " \ "nco:nameFamily ?family ; " \ "nco:nameGiven ?given ; " \ @@ -95,8 +95,8 @@ "WHERE { " \ "?call a nmo:Call ; " \ "nmo:from ?contact ; " \ - "nmo:to " TRACKER_DEFAULT_CONTACT_ME " ; " \ - "nmo:isRead false ." \ + "nmo:isSent false ; " \ + "nmo:isAnswered false ." \ "?contact a nco:PersonContact ; " \ "nco:nameFamily ?family ; " \ "nco:nameGiven ?given ; " \ @@ -113,7 +113,7 @@ "WHERE { " \ "?call a nmo:Call ; " \ "nmo:from ?contact ; " \ - "nmo:to " TRACKER_DEFAULT_CONTACT_ME " . " \ + "nmo:isSent false . " \ "?contact a nco:PersonContact ; " \ "nco:nameFamily ?family ; " \ "nco:nameGiven ?given ; " \ @@ -131,7 +131,7 @@ "WHERE { " \ "?call a nmo:Call ; " \ "nmo:from ?contact ; " \ - "nmo:to " TRACKER_DEFAULT_CONTACT_ME " . " \ + "nmo:isSent false . " \ "?contact a nco:PersonContact ; " \ "nco:nameFamily ?family ; " \ "nco:nameGiven ?given ; " \ @@ -147,8 +147,8 @@ "WHERE { " \ "?call a nmo:Call ; " \ "nmo:to ?contact ; " \ - "nmo:from " TRACKER_DEFAULT_CONTACT_ME " . " \ - "?contact a nco:PersonContact ; " \ + "nmo:isSent true . " \ + "?contact a nco:PersonContact ; " \ "nco:nameFamily ?family ; " \ "nco:nameGiven ?given ; " \ "nco:fullname ?fullname ; " \ @@ -165,8 +165,8 @@ "WHERE { " \ "?call a nmo:Call ; " \ "nmo:to ?contact ; " \ - "nmo:from " TRACKER_DEFAULT_CONTACT_ME " . " \ - "?contact a nco:PersonContact ; " \ + "nmo:isSent true . " \ + "?contact a nco:PersonContact ; " \ "nco:nameFamily ?family ; " \ "nco:nameGiven ?given ; " \ "nco:hasPhoneNumber ?phone . " \ @@ -182,7 +182,7 @@ "{ " \ "?call a nmo:Call ; " \ "nmo:to ?contact ; " \ - "nmo:from " TRACKER_DEFAULT_CONTACT_ME " . " \ + "nmo:isSent true . " \ "?contact a nco:PersonContact ; " \ "nco:nameFamily ?family ; " \ "nco:nameGiven ?given ; " \ @@ -195,7 +195,7 @@ "} UNION { " \ "?call a nmo:Call ; " \ "nmo:from ?contact ; " \ - "nmo:to " TRACKER_DEFAULT_CONTACT_ME " . " \ + "nmo:isSent false . " \ "?contact a nco:PersonContact ; " \ "nco:nameFamily ?family ; " \ "nco:nameGiven ?given ; " \ @@ -214,7 +214,7 @@ "{ " \ "?call a nmo:Call ; " \ "nmo:to ?contact ; " \ - "nmo:from " TRACKER_DEFAULT_CONTACT_ME " . " \ + "nmo:isSent true . " \ "?contact a nco:PersonContact ; " \ "nco:nameFamily ?family ; " \ "nco:nameGiven ?given ; " \ @@ -225,7 +225,7 @@ "} UNION { " \ "?call a nmo:Call ; " \ "nmo:from ?contact ; " \ - "nmo:to " TRACKER_DEFAULT_CONTACT_ME " . " \ + "nmo:isSent false . " \ "?contact a nco:PersonContact ; " \ "nco:nameFamily ?family ; " \ "nco:nameGiven ?given ; " \ -- 2.47.3