summaryrefslogtreecommitdiff
path: root/src/plugins/position/simulator/qlocationconnection_simulator_p.h
diff options
context:
space:
mode:
authorAlex Wilson <alex.wilson@nokia.com>2012-03-07 16:38:50 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-12 03:25:51 +0100
commit369fa99b132f8c1425da8a41f1436b8d86aaa50e (patch)
treea13d675390d1590df27c70a4ee47b6490cc58800 /src/plugins/position/simulator/qlocationconnection_simulator_p.h
parentc435861528161ee931287034f41023c11dfb7ba3 (diff)
downloadqtlocation-369fa99b132f8c1425da8a41f1436b8d86aaa50e.tar.gz
Update positioning sources to use new plugin style
Notably, also splits the default sources that were previously compiled into the library, out into their own plugins. This follows a similar pattern to the geoservices change. We also drop the "plugin whitelisting" feature in favour of a simple Priority value in the plugin JSON -- the whitelist provides no additional security over this solution on any of our platforms. Task-number: QTBUG-24331 Change-Id: I62a9c940157ad2e33a9a575fa09633b98656b276 Reviewed-by: Alex <alex.blasche@nokia.com>
Diffstat (limited to 'src/plugins/position/simulator/qlocationconnection_simulator_p.h')
-rw-r--r--src/plugins/position/simulator/qlocationconnection_simulator_p.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/src/plugins/position/simulator/qlocationconnection_simulator_p.h b/src/plugins/position/simulator/qlocationconnection_simulator_p.h
new file mode 100644
index 00000000..22cc3b63
--- /dev/null
+++ b/src/plugins/position/simulator/qlocationconnection_simulator_p.h
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the QtLocation module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QLOCATIONCONNECTION_H
+#define QLOCATIONCONNECTION_H
+
+#include "qlocationdata_simulator_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+
+namespace Simulator
+{
+ class Connection;
+ class ConnectionWorker;
+
+ class LocationConnection : public QObject
+ {
+ Q_OBJECT
+ public:
+ static void ensureSimulatorConnection();
+ virtual ~LocationConnection();
+
+ private:
+ LocationConnection();
+ Q_DISABLE_COPY(LocationConnection)
+
+ private slots:
+ // these will be called by the simulator
+ void setLocationData(const QGeoPositionInfoData &);
+ void setSatelliteData(const QGeoSatelliteInfoData &);
+ void initialLocationDataSent();
+
+ signals:
+ void initialDataReceived();
+
+ private:
+ Connection *mConnection;
+ ConnectionWorker *mWorker;
+ };
+} // end namespace Simulator
+
+QGeoPositionInfoData *qtPositionInfo();
+QGeoSatelliteInfoData *qtSatelliteInfo();
+
+QT_END_NAMESPACE
+
+#endif // QLOCATIONCONNECTION_H