Skip to content

Commit

Permalink
Bind cch call log with phonebook
Browse files Browse the repository at this point in the history
After incoming/missed/outgoing call is done by/to number from phonebook
then combined call history will be shown with data about caller -
downloaded in vCard structure.
  • Loading branch information
michalskir authored and Johan Hedberg committed Sep 28, 2010
1 parent a8337ec commit 330b674
Showing 1 changed file with 66 additions and 1 deletion.
67 changes: 66 additions & 1 deletion plugins/phonebook-tracker.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,18 +337,83 @@
"nmo:isSent(?call) nmo:isAnswered(?call) ?x " \
"WHERE { " \
"{ " \
"{ " \
"?x a nco:Contact . " \
"?x nco:hasPhoneNumber ?h . " \
"?call a nmo:Call ; " \
"nmo:to ?x ; " \
"nmo:isSent true . " \
"?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:to ?x ; " \
"nmo:isSent true . " \
"?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:to ?x ; " \
"nmo:isSent true . " \
"} " \
"} UNION { " \
"{ " \
"?x a nco:Contact . " \
"?x nco:hasPhoneNumber ?h . " \
"?call a nmo:Call ; " \
"nmo:from ?x ; " \
"nmo:isSent 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 . " \
"?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 . " \
"} } ORDER BY DESC(nmo:receivedDate(?call))"
"} " \
"} " \
"} ORDER BY DESC(nmo:receivedDate(?call)) "

#define COMBINED_CALLS_LIST \
"SELECT ?c nco:nameFamily(?c) nco:nameGiven(?c) " \
Expand Down

0 comments on commit 330b674

Please sign in to comment.