[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/base/attica/lib
From: Sebastian Kügler <sebas () kde ! org>
Date: 2009-04-15 2:39:08
Message-ID: 1239763148.929323.21513.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 954071 by sebas:
Support for retrieving nearby persons in the attica library
Pass latitude, longitude and distance in there, and you'll get a list of
persons nearby.
M +12 -0 ocsapi.cpp
M +1 -0 ocsapi.h
--- trunk/playground/base/attica/lib/ocsapi.cpp #954070:954071
@@ -43,6 +43,18 @@
return doRequestPersonList( url );
}
+PersonListJob *OcsApi::requestPersonSearchByLocation( qreal latitude, qreal \
longitude, qreal distance) +{
+ QString la = QString::number(latitude);
+ QString lo = QString::number(longitude);
+ QString di = QString::number(distance);
+ QString u = QString("http://api.opendesktop.org/v1/person/data?latitude=%1&longitude=%2&distance=%3").arg(la, \
lo, di); + KUrl url( u );
+ qDebug() << "Location-based search:" << u << latitude << longitude << distance;
+ qDebug() << la << lo << di;
+ return doRequestPersonList( url );
+}
+
PersonListJob *OcsApi::requestFriend( const QString &id )
{
KUrl url( "http://api.opendesktop.org/v1/friend/data/" + id );
--- trunk/playground/base/attica/lib/ocsapi.h #954070:954071
@@ -44,6 +44,7 @@
static PersonJob *requestPerson( const QString &id );
static PersonJob *requestPersonSelf();
static PersonListJob *requestPersonSearchByName( const QString &name );
+ static PersonListJob *requestPersonSearchByLocation( qreal latitude, qreal \
longitude, qreal distance);
static PersonListJob *requestFriend( const QString &id );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic