summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2012-03-28 10:06:13 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2012-03-28 10:06:13 (GMT)
commitaa7ae38e252eb04c16dab66bb7c91c124b125271 (patch)
treef770982fd5ac2937da8e95d9048e7387385e76e5
parent85f98b950f43ab5df03fb9d6655f4c9d736ac756 (diff)
downloadlibkolabxml-aa7ae38e252eb04c16dab66bb7c91c124b125271.tar.gz
Added template for vector<Kolab::Geo> and adapt php tests accordingly
-rw-r--r--libkolabxml/lib/kolabformat.i1
-rwxr-xr-xlibkolabxml/lib/php/test.php4
2 files changed, 4 insertions, 1 deletions
diff --git a/libkolabxml/lib/kolabformat.i b/libkolabxml/lib/kolabformat.i
index 30726f3..12db5b1 100644
--- a/libkolabxml/lib/kolabformat.i
+++ b/libkolabxml/lib/kolabformat.i
@@ -28,6 +28,7 @@ namespace std {
%template(vectorattachment) vector<Kolab::Attachment>;
%template(vectorattendee) vector<Kolab::Attendee>;
%template(vectorcontactref) vector<Kolab::ContactReference>;
+ %template(vectorgeo) vector<Kolab::Geo>;
%template(vectorrelated) vector<Kolab::Related>;
%template(vectortelephone) vector<Kolab::Telephone>;
%template(vectordatetime) vector<Kolab::cDateTime>;
diff --git a/libkolabxml/lib/php/test.php b/libkolabxml/lib/php/test.php
index 48c3304..75f7d9f 100755
--- a/libkolabxml/lib/php/test.php
+++ b/libkolabxml/lib/php/test.php
@@ -102,7 +102,9 @@ $c->setTitles(array2vector("MyProfession"));
$pic = "R0lGODlhEgASAIAAAMDAwAAAACH5BAEAAAAALAAAAAASABIAQAIPhI+py+0Po5y02ouz3pwXADs=";
$c->setPhoto(base64_decode($pic), 'image/gif');
-$c->setGPSpos(array2vector("geo:46.952585,7.43766"));
+$geo = new vectorgeo;
+$geo->push(new Geo(46.952585, 7.43766));
+$c->setGPSpos($geo);
$bd = new cDateTime(1980,8,1);
$c->setBDay($bd);