summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/nokia/qgeoroutexmlparser.h
diff options
context:
space:
mode:
authorJean Gressmann <jean.gressmann@nokia.com>2012-04-26 21:31:13 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-30 03:07:21 +0200
commit22e61bf9762b1694b963ad0c9e5e38f8f3f5b046 (patch)
tree553439f04958812d20979b936803ca4628451a56 /src/plugins/geoservices/nokia/qgeoroutexmlparser.h
parentf1da2e1b2f4be857cacd818368f6830c1590ae7f (diff)
downloadqtlocation-22e61bf9762b1694b963ad0c9e5e38f8f3f5b046.tar.gz
QtLocation/Nokia plugin: Added initial routing tests with mocked network.
These tests test the server reply is properly processed and the values are what we expect in the end. Also tested: - trash reponses, - no route errors, - network errors, - backward compatible responses (those with tags the implementation doesn't (yet) understand) are tested. Change-Id: I3407e1b7f256f7af967a1f6b42f14b012e8a2909 Reviewed-by: Cristian Adam <cristian.adam@nokia.com> Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
Diffstat (limited to 'src/plugins/geoservices/nokia/qgeoroutexmlparser.h')
-rw-r--r--src/plugins/geoservices/nokia/qgeoroutexmlparser.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/plugins/geoservices/nokia/qgeoroutexmlparser.h b/src/plugins/geoservices/nokia/qgeoroutexmlparser.h
index bc8059d2..c798b233 100644
--- a/src/plugins/geoservices/nokia/qgeoroutexmlparser.h
+++ b/src/plugins/geoservices/nokia/qgeoroutexmlparser.h
@@ -81,6 +81,18 @@ public:
QString maneuverId;
};
+class QGeoDynamicSpeedInfoContainer
+{
+public:
+ QGeoDynamicSpeedInfoContainer();
+
+public:
+ double trafficSpeed;
+ double baseSpeed;
+ int trafficTime;
+ int baseTime;
+};
+
class QGeoRouteXmlParser
{
public:
@@ -105,13 +117,14 @@ private:
bool postProcessRoute(QGeoRoute *route);
bool parseBoundingBox(QGeoBoundingBox &bounds);
+ bool parseDynamicSpeedInfo(QGeoDynamicSpeedInfoContainer &speedInfo);
QGeoRouteRequest m_request;
QXmlStreamReader *m_reader;
QList<QGeoRoute> m_results;
QString m_errorString;
- QList<QGeoManeuverContainer> maneuvers;
- QList<QGeoRouteSegmentContainer> segments;
+ QList<QGeoManeuverContainer> m_maneuvers;
+ QList<QGeoRouteSegmentContainer> m_segments;
};
QT_END_NAMESPACE