X-Git-Url: http://git.maemo.org/git/?p=speedfreak;a=blobdiff_plain;f=Client%2Fmaemo5location.cpp;h=a8065fd09c90d25341bf3aa978658214fac4f580;hp=b294c53d96791be0017c0a0c4707d01bcea092d9;hb=cff9082eb2e1860d474fb89749a2ac4845885627;hpb=6c084ac4841e5db94a71710a02db344f36eaa8fc diff --git a/Client/maemo5location.cpp b/Client/maemo5location.cpp index b294c53..a8065fd 100755 --- a/Client/maemo5location.cpp +++ b/Client/maemo5location.cpp @@ -18,16 +18,14 @@ Maemo5Location::Maemo5Location(QObject* parent):QObject(parent) { ptr = new Maemo5LocationPrivate(this); - connect(ptr,SIGNAL(agnss()),this,SIGNAL(agnss())); - connect(ptr,SIGNAL(awcp()),this,SIGNAL(awcp())); - connect(ptr,SIGNAL(locationUpdated()),this,SIGNAL(locationUpdated())); + connect(ptr, SIGNAL(agnss()), this, SIGNAL(agnss())); + connect(ptr, SIGNAL(awcp()), this, SIGNAL(awcp())); + connect(ptr, SIGNAL(locationUpdated()), this, SIGNAL(locationUpdated())); connect(ptr, SIGNAL(gps_connected()), this, SIGNAL(gps_connected())); connect(ptr, SIGNAL(gps_disconnected()), this, SIGNAL(gps_disconnected())); - connect(ptr, SIGNAL(gps_err(int)), this, SIGNAL(gps_error(int))); + connect(ptr, SIGNAL(gps_error(int)), this, SIGNAL(gps_error(int))); connect(ptr, SIGNAL(gpsd_running()), this, SIGNAL(gpsd_running())); connect(ptr, SIGNAL(gpsd_stopped()), this, SIGNAL(gpsd_stopped())); - - ptr->get_agnss(); } /** @@ -39,19 +37,19 @@ Maemo5Location::~Maemo5Location() } /** - *Returns latitude. + *Start polling gps. */ -double Maemo5Location::getLatitude() +void Maemo5Location::startPollingGPS() { - return ptr->get_lat(); + ptr->get_agnss(); } /** - *Returns longitude. + *Stop polling gps. */ -double Maemo5Location::getLongitude() +void Maemo5Location::stopPollingGPS() { - return ptr->get_lon(); + ptr->stop(); } /** @@ -79,6 +77,30 @@ int Maemo5Location::getSignalStrength() } /** + *Returns gps online. + */ +bool Maemo5Location::getGpsOnline() +{ + return ptr->get_gps_online(); +} + +/** + *Returns latitude. + */ +double Maemo5Location::getLatitude() +{ + return ptr->get_lat(); +} + +/** + *Returns longitude. + */ +double Maemo5Location::getLongitude() +{ + return ptr->get_lon(); +} + +/** *Returns timestamp of the update in seconds. */ double Maemo5Location::getTime()