From 0008e04ec4f98978f4f4cc0fd7f686301dde73ee Mon Sep 17 00:00:00 2001 From: Rafal Michalski Date: Tue, 28 Sep 2010 11:04:21 +0200 Subject: [PATCH] obexd: Bind mch call log with phonebook After missed call is done by number from phonebook then missed call history will be shown with data about caller - downloaded in vCard structure. --- obexd/plugins/phonebook-tracker.c | 38 +++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/obexd/plugins/phonebook-tracker.c b/obexd/plugins/phonebook-tracker.c index 5aaa9a81f..faa328180 100644 --- a/obexd/plugins/phonebook-tracker.c +++ b/obexd/plugins/phonebook-tracker.c @@ -124,13 +124,47 @@ "nco:title(?a) nco:phoneNumber(?t) nmo:receivedDate(?call) " \ "nmo:isSent(?call) nmo:isAnswered(?call) ?x " \ "WHERE { " \ + "{ " \ + "?x a nco:Contact . " \ + "?x nco:hasPhoneNumber ?h . " \ + "?call a nmo:Call ; " \ + "nmo:from ?x ; " \ + "nmo:isSent false ; " \ + "nmo:isAnswered false . " \ + "?c a nco:PersonContact . " \ + "?c nco:hasPhoneNumber ?h . " \ + "OPTIONAL { ?c nco:hasEmailAddress ?e . } " \ + "OPTIONAL { ?c nco:hasPostalAddress ?p . } " \ + "OPTIONAL { " \ + "?c nco:hasAffiliation ?a . " \ + "OPTIONAL { ?a nco:hasEmailAddress ?ew . } " \ + "OPTIONAL { ?a nco:hasPostalAddress ?pw . } " \ + "OPTIONAL { ?a nco:org ?o . } " \ + "} " \ + "} UNION { " \ + "?x a nco:Contact . " \ + "?x nco:hasPhoneNumber ?w . " \ + "?call a nmo:Call ; " \ + "nmo:from ?x ; " \ + "nmo:isSent false ; " \ + "nmo:isAnswered false . " \ + "?c a nco:PersonContact . " \ + "OPTIONAL { ?c nco:hasEmailAddress ?e . } " \ + "OPTIONAL { ?c nco:hasPostalAddress ?p . } " \ + "?c nco:hasAffiliation ?a . " \ + "?a nco:hasPhoneNumber ?w . " \ + "OPTIONAL { ?a nco:hasEmailAddress ?ew . } " \ + "OPTIONAL { ?a nco:hasPostalAddress ?pw . } " \ + "OPTIONAL { ?a nco:org ?o . } " \ + "} UNION { " \ "?x a nco:Contact . " \ "?x nco:hasPhoneNumber ?t . " \ "?call a nmo:Call ; " \ "nmo:from ?x ; " \ "nmo:isSent false ; " \ - "nmo:isAnswered false ." \ - "} ORDER BY DESC(nmo:receivedDate(?call))" + "nmo:isAnswered false . " \ + "} " \ + "} ORDER BY DESC(nmo:receivedDate(?call)) " #define MISSED_CALLS_LIST \ "SELECT ?c nco:nameFamily(?c) " \ -- 2.47.3