summaryrefslogtreecommitdiff
path: root/src/positioning/qlocationutils_p.h
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2021-02-08 14:09:27 +0100
committerIvan Solovev <ivan.solovev@qt.io>2021-02-12 10:47:02 +0100
commit4ca9fd760f1511e00301a8f13c10108fe83823e7 (patch)
treeb0a7cac08a3e88df5c865e1f44ebcc57bbf51a80 /src/positioning/qlocationutils_p.h
parent67f840a23295ad5d202005fc4913857d2da3edf5 (diff)
downloadqtlocation-4ca9fd760f1511e00301a8f13c10108fe83823e7.tar.gz
QtPositioning: move QNmeaSatelliteInfoSource to the library
- Move files from plugin to the library. - Add virtual methods, so that NMEA parsing can be overridden. - Add and update unit tests Task-number: QTBUG-90491 Change-Id: Ia2deb27c97c1552cd96832a47fe944bdc7638a07 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/positioning/qlocationutils_p.h')
-rw-r--r--src/positioning/qlocationutils_p.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/positioning/qlocationutils_p.h b/src/positioning/qlocationutils_p.h
index 563db200..9f793f95 100644
--- a/src/positioning/qlocationutils_p.h
+++ b/src/positioning/qlocationutils_p.h
@@ -54,6 +54,7 @@
#include <math.h> // needed for non-std:: versions of functions
#include <qmath.h>
#include <QtPositioning/QGeoCoordinate>
+#include <QtPositioning/QNmeaSatelliteInfoSource>
#include <QtPositioning/private/qpositioningglobal_p.h>
static const double offsetEpsilon = 1e-12; // = 0.000000000001
@@ -293,18 +294,13 @@ public:
/*
Retruns a list of QGeoSatelliteInfo in the view.
- Note: this function has to be called repeatedly until it returns true.
- Reason being that GSV sentences can be split into multiple samples, so getting the full data
- requires parsing multiple sentences.
+ Note: this function has to be called repeatedly until it returns
+ QNmeaSatelliteInfoSource::FullyParsed.
+ Reason being that GSV sentences can be split into multiple samples, so
+ getting the full data requires parsing multiple sentences.
*/
- enum GSVParseStatus {
- GSVNotParsed,
- GSVPartiallyParsed,
- GSVFullyParsed
- };
- static GSVParseStatus getSatInfoFromNmea(const char *data,
- int size,
- QList<QGeoSatelliteInfo> &infos);
+ static QNmeaSatelliteInfoSource::SatelliteInfoParseStatus
+ getSatInfoFromNmea(const char *data, int size, QList<QGeoSatelliteInfo> &infos);
/*
Parses GSA for satellites in use.