This class represents the cached list of accesspoint with their corresponfin location. More...
#include <LocationCache.h>
Public Slots | |
| void | addCache (QHash< QString, QGeoCoordinate >) |
| Slot called if WiGLE has downloaded and parsed the APs. | |
| void | setCacheRegion (QGeoCoordinate center) |
| Set the size of the cache region. | |
Signals | |
| void | cacheDone (QString src) |
Public Member Functions | |
| LocationCache (QObject *parent=0) | |
| Construct an AP Cache Object. | |
| virtual | ~LocationCache () |
| Destruct Cache object. | |
| void | add (QString mac, QGeoCoordinate pos) |
| DEPRECATED: Add a signle AP to the cache. | |
| QGeoCoordinate | getCacheCenter () |
| Get the current value of the region's center. | |
| void | updateCache () |
| Update Cache. | |
| void | reset () |
| Reset Cache. | |
| void | init () |
| Initialize AP Cache. | |
| QGeoCoordinate | getPos (QString mac) |
| Lookup an APs position in the Cache. | |
| QGeoCoordinate | getPos (QList< QString > macs) |
| Get the mean position of a list of APs. | |
This class represents the cached list of accesspoint with their corresponfin location.
| LocationCache::LocationCache | ( | QObject * | parent = 0 |
) |
Construct an AP Cache Object.
An instance to WiFLE is created. This instance is required to to cache updates.
| void LocationCache::add | ( | QString | mac, | |
| QGeoCoordinate | pos | |||
| ) |
DEPRECATED: Add a signle AP to the cache.
| mac | the AP's mac address | |
| pos | the position of the AP |
| void LocationCache::addCache | ( | QHash< QString, QGeoCoordinate > | newCache | ) | [slot] |
Slot called if WiGLE has downloaded and parsed the APs.
The cache is written to disk.
| newCache | is a QHash with the new APs' information |
| QGeoCoordinate LocationCache::getPos | ( | QList< QString > | macs | ) |
Get the mean position of a list of APs.
| macs | a list of AP MAC addresses |
| QGeoCoordinate LocationCache::getPos | ( | QString | mac | ) |
Lookup an APs position in the Cache.
| mac | is the APs MAC addres |
| void LocationCache::init | ( | ) |
Initialize AP Cache.
Reads previous cache information from file. If the file is empty it start a cache update.
| void LocationCache::reset | ( | ) |
Reset Cache.
Clear the cache in memory, clean the cache file on disk
| void LocationCache::setCacheRegion | ( | QGeoCoordinate | center | ) | [slot] |
Set the size of the cache region.
The region is 0.1 x 0.1 deg large and is center is given as paramter
| center | is the Center of the region |
| void LocationCache::updateCache | ( | ) |
Update Cache.
Check whteher the region is correctly set and get APs from WiGLE
1.6.3