Diff between 4aef1e3570135b3d23ab0269896d1f34d6172a14 and c7b2f7ab45935f11895c08c5aad01dd1d88c97e2

Changed Files

File Additions Deletions Status
obexd/plugins/phonebook-tracker.c +54 -6 modified

Full Patch

diff --git a/obexd/plugins/phonebook-tracker.c b/obexd/plugins/phonebook-tracker.c
index 2cf8ba2..20053f6 100644
--- a/obexd/plugins/phonebook-tracker.c
+++ b/obexd/plugins/phonebook-tracker.c
@@ -113,7 +113,7 @@
 	"nco:streetAddress(?p) nco:locality(?p) nco:region(?p) "	\
 	"nco:postalcode(?p) nco:country(?p) ?f nco:emailAddress(?ew) "	\
 	"nco:birthDate(?c) nco:nickname(?c) nco:url(?c) "		\
-	"nco:photo(?c) nco:fullname(?o) nco:department(?a) "		\
+	"?file nco:fullname(?o) nco:department(?a) "			\
 	"nco:role(?a) nco:pobox(?pw) nco:extendedAddress(?pw) "		\
 	"nco:streetAddress(?pw) nco:locality(?pw) nco:region(?pw) "	\
 	"nco:postalcode(?pw) nco:country(?pw) nco:contactUID(?c) "	\
@@ -124,6 +124,10 @@
 	"\"NOTACALL\" \"false\" \"false\" ?c "				\
 	"WHERE { "							\
 		"?c a nco:PersonContact . "				\
+		"OPTIONAL { "						\
+			"?c a nco:PersonContact ; nco:photo ?pht . "	\
+			"?pht a nfo:FileDataObject ; nie:url ?file . "	\
+		"} "							\
 	"OPTIONAL { ?c nco:hasPhoneNumber ?h . "			\
 		"OPTIONAL {"						\
 		"?h a nco:FaxNumber ; "					\
@@ -179,7 +183,7 @@
 	"nco:streetAddress(?p) nco:locality(?p) nco:region(?p) "	\
 	"nco:postalcode(?p) nco:country(?p) \"\" nco:emailAddress(?ew) "\
 	"nco:birthDate(?c) nco:nickname(?c) nco:url(?c) "		\
-	"nco:photo(?c) nco:fullname(?o) nco:department(?a) "		\
+	"?file nco:fullname(?o) nco:department(?a) "			\
 	"nco:role(?a) nco:pobox(?pw) nco:extendedAddress(?pw) "		\
 	"nco:streetAddress(?pw) nco:locality(?pw) nco:region(?pw) "	\
 	"nco:postalcode(?pw) nco:country(?pw) nco:contactUID(?c) "	\
@@ -200,6 +204,10 @@
 		"?c a nco:PersonContact . "				\
 		"?c nco:hasPhoneNumber ?t . "				\
 		"OPTIONAL { "						\
+			"?c a nco:PersonContact ; nco:photo ?pht . "	\
+			"?pht a nfo:FileDataObject ; nie:url ?file . "	\
+		"} "							\
+		"OPTIONAL { "						\
 			"?t a nco:CellPhoneNumber ; "			\
 				"nco:phoneNumber ?vc . "		\
 		"} "							\
@@ -231,6 +239,10 @@
 		"?c nco:hasAffiliation ?a . "				\
 		"?a nco:hasPhoneNumber ?tmp . "				\
 		"OPTIONAL { "						\
+			"?c a nco:PersonContact ; nco:photo ?pht . "	\
+			"?pht a nfo:FileDataObject ; nie:url ?file . "	\
+		"} "							\
+		"OPTIONAL { "						\
 			"?a rdfs:label \"Work\" . "			\
 			"?tmp nco:phoneNumber ?w . "			\
 			"OPTIONAL { ?a nco:hasEmailAddress ?ew . } "	\
@@ -323,7 +335,7 @@
 	"nco:streetAddress(?p) nco:locality(?p) nco:region(?p) "	\
 	"nco:postalcode(?p) nco:country(?p) \"\" nco:emailAddress(?ew) "\
 	"nco:birthDate(?c) nco:nickname(?c) nco:url(?c) "		\
-	"nco:photo(?c) nco:fullname(?o) nco:department(?a) "		\
+	"?file nco:fullname(?o) nco:department(?a) "			\
 	"nco:role(?a) nco:pobox(?pw) nco:extendedAddress(?pw) "		\
 	"nco:streetAddress(?pw) nco:locality(?pw) nco:region(?pw) "	\
 	"nco:postalcode(?pw) nco:country(?pw) nco:contactUID(?c) "	\
@@ -344,6 +356,10 @@
 		"?c a nco:PersonContact . "				\
 		"?c nco:hasPhoneNumber ?t . "				\
 		"OPTIONAL { "						\
+			"?c a nco:PersonContact ; nco:photo ?pht . "	\
+			"?pht a nfo:FileDataObject ; nie:url ?file . "	\
+		"} "							\
+		"OPTIONAL { "						\
 			"?t a nco:CellPhoneNumber ; "			\
 				"nco:phoneNumber ?vc . "		\
 		"} "							\
@@ -375,6 +391,10 @@
 		"?c nco:hasAffiliation ?a . "				\
 		"?a nco:hasPhoneNumber ?tmp . "				\
 		"OPTIONAL { "						\
+			"?c a nco:PersonContact ; nco:photo ?pht . "	\
+			"?pht a nfo:FileDataObject ; nie:url ?file . "	\
+		"} "							\
+		"OPTIONAL { "						\
 			"?a rdfs:label \"Work\" . "			\
 			"?tmp nco:phoneNumber ?w . "			\
 			"OPTIONAL { ?a nco:hasEmailAddress ?ew . } "	\
@@ -466,7 +486,7 @@
 	"nco:streetAddress(?p) nco:locality(?p) nco:region(?p) "	\
 	"nco:postalcode(?p) nco:country(?p) \"\" nco:emailAddress(?ew) "\
 	"nco:birthDate(?c) nco:nickname(?c) nco:url(?c) "		\
-	"nco:photo(?c) nco:fullname(?o) nco:department(?a) "		\
+	"?file nco:fullname(?o) nco:department(?a) "			\
 	"nco:role(?a) nco:pobox(?pw) nco:extendedAddress(?pw) "		\
 	"nco:streetAddress(?pw) nco:locality(?pw) nco:region(?pw) "	\
 	"nco:postalcode(?pw) nco:country(?pw) nco:contactUID(?c) "	\
@@ -486,6 +506,10 @@
 		"?c a nco:PersonContact . "				\
 		"?c nco:hasPhoneNumber ?t . "				\
 		"OPTIONAL { "						\
+			"?c a nco:PersonContact ; nco:photo ?pht . "	\
+			"?pht a nfo:FileDataObject ; nie:url ?file . "	\
+		"} "							\
+		"OPTIONAL { "						\
 			"?t a nco:CellPhoneNumber ; "			\
 				"nco:phoneNumber ?vc . "		\
 		"} "							\
@@ -516,6 +540,10 @@
 		"?c nco:hasAffiliation ?a . "				\
 		"?a nco:hasPhoneNumber ?tmp . "				\
 		"OPTIONAL { "						\
+			"?c a nco:PersonContact ; nco:photo ?pht . "	\
+			"?pht a nfo:FileDataObject ; nie:url ?file . "	\
+		"} "							\
+		"OPTIONAL { "						\
 			"?a rdfs:label \"Work\" . "			\
 			"?tmp nco:phoneNumber ?w . "			\
 			"OPTIONAL { ?a nco:hasEmailAddress ?ew . } "	\
@@ -603,7 +631,7 @@
 	"nco:streetAddress(?p) nco:locality(?p) nco:region(?p) "	\
 	"nco:postalcode(?p) nco:country(?p) \"\" nco:emailAddress(?ew) "\
 	"nco:birthDate(?c) nco:nickname(?c) nco:url(?c) "		\
-	"nco:photo(?c) nco:fullname(?o) nco:department(?a) "		\
+	"?file nco:fullname(?o) nco:department(?a) "			\
 	"nco:role(?a) nco:pobox(?pw) nco:extendedAddress(?pw) "		\
 	"nco:streetAddress(?pw) nco:locality(?pw) nco:region(?pw) "	\
 	"nco:postalcode(?pw) nco:country(?pw) nco:contactUID(?c) "	\
@@ -623,6 +651,10 @@
 		"?c a nco:PersonContact . "				\
 		"?c nco:hasPhoneNumber ?t . "				\
 		"OPTIONAL { "						\
+			"?c a nco:PersonContact ; nco:photo ?pht . "	\
+			"?pht a nfo:FileDataObject ; nie:url ?file . "	\
+		"} "							\
+		"OPTIONAL { "						\
 			"?t a nco:CellPhoneNumber ; "			\
 				"nco:phoneNumber ?vc . "		\
 		"} "							\
@@ -653,6 +685,10 @@
 		"?c nco:hasAffiliation ?a . "				\
 		"?a nco:hasPhoneNumber ?tmp . "				\
 		"OPTIONAL { "						\
+			"?c a nco:PersonContact ; nco:photo ?pht . "	\
+			"?pht a nfo:FileDataObject ; nie:url ?file . "	\
+		"} "							\
+		"OPTIONAL { "						\
 			"?a rdfs:label \"Work\" . "			\
 			"?tmp nco:phoneNumber ?w . "			\
 			"OPTIONAL { ?a nco:hasEmailAddress ?ew . } "	\
@@ -705,6 +741,10 @@
 		"?c a nco:PersonContact . "				\
 		"?c nco:hasPhoneNumber ?t . "				\
 		"OPTIONAL { "						\
+			"?c a nco:PersonContact ; nco:photo ?pht . "	\
+			"?pht a nfo:FileDataObject ; nie:url ?file . "	\
+		"} "							\
+		"OPTIONAL { "						\
 			"?t a nco:CellPhoneNumber ; "			\
 				"nco:phoneNumber ?vc . "		\
 		"} "							\
@@ -735,6 +775,10 @@
 		"?c nco:hasAffiliation ?a . "				\
 		"?a nco:hasPhoneNumber ?tmp . "				\
 		"OPTIONAL { "						\
+			"?c a nco:PersonContact ; nco:photo ?pht . "	\
+			"?pht a nfo:FileDataObject ; nie:url ?file . "	\
+		"} "							\
+		"OPTIONAL { "						\
 			"?a rdfs:label \"Work\" . "			\
 			"?tmp nco:phoneNumber ?w . "			\
 			"OPTIONAL { ?a nco:hasEmailAddress ?ew . } "	\
@@ -844,7 +888,7 @@
 	"nco:streetAddress(?p) nco:locality(?p) nco:region(?p) "	\
 	"nco:postalcode(?p) nco:country(?p) ?f nco:emailAddress(?ew) "	\
 	"nco:birthDate(<%s>) nco:nickname(<%s>) nco:url(<%s>) "		\
-	"nco:photo(<%s>) nco:fullname(?o) nco:department(?a) "		\
+	"?file nco:fullname(?o) nco:department(?a) "			\
 	"nco:role(?a) nco:pobox(?pw) nco:extendedAddress(?pw) "		\
 	"nco:streetAddress(?pw) nco:locality(?pw) nco:region(?pw) "	\
 	"nco:postalcode(?pw) nco:country(?pw) nco:contactUID(<%s>) "	\
@@ -855,6 +899,10 @@
 	"\"NOTACALL\" \"false\" \"false\" <%s> "			\
 	"WHERE { "							\
 		"<%s> a nco:PersonContact . "				\
+		"OPTIONAL { "						\
+			"<%s> a nco:PersonContact ; nco:photo ?pht . "	\
+			"?pht a nfo:FileDataObject ; nie:url ?file . "	\
+		"} "							\
 	"OPTIONAL { <%s> nco:hasPhoneNumber ?h . "			\
 		"OPTIONAL {"						\
 		"?h a nco:FaxNumber ; "					\