Modified route arrow icons.
[situare] / src / gps / gpspositionprivatestub.h
1 /*
2    Situare - A location system for Facebook
3    Copyright (C) 2010  Ixonos Plc. Authors:
4
5        Jussi Laitinen - jussi.laitinen@ixonos.com
6
7    Situare is free software; you can redistribute it and/or
8    modify it under the terms of the GNU General Public License
9    version 2 as published by the Free Software Foundation.
10
11    Situare is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with Situare; if not, write to the Free Software
18    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
19    USA.
20 */
21
22 #ifndef GPSPOSITIONPRIVATESTUB_H
23 #define GPSPOSITIONPRIVATESTUB_H
24
25 #include <QObject>
26
27 #include "gpsposition.h"
28
29 class QString;
30
31 class GeoCoordinate;
32
33 /**
34 * @brief GPSPositionPrivate class does nothing.
35 *
36 * Class is used when compiling in desktop.
37 */
38 class GPSPositionPrivate : public QObject
39 {
40     Q_OBJECT
41
42 public:
43     /**
44     * @brief Constructor.
45     *
46     * @param parent QObject
47     */
48     GPSPositionPrivate(QObject *parent);
49
50 /******************************************************************************
51 * MEMBER FUNCTIONS AND SLOTS
52 ******************************************************************************/
53 public:
54     /**
55     * @brief Returns is GPS initialized.
56     *
57     * RETURNS FALSE
58     * @return true if initialized, false otherwise
59     */
60     bool isInitialized() const;
61
62     /**
63     * @brief Checks if GPS is running.
64     *
65     * RETURNS FALSE.
66     * @return true if GPS running, false otherwise
67     */
68     bool isRunning() const;
69
70     /**
71     * @brief Return last known position.
72     */
73     GeoCoordinate lastPosition() const;
74
75     /**
76     * @brief Informs gps to emit last known position.
77     */
78     void requestLastPosition();
79
80     /**
81     * @brief Requests update from GPS.
82     *
83     * Enables GPS if it is disabled
84     */
85     void requestUpdate();
86
87     /**
88     * @brief Enables power save mode.
89     *
90     * Starts GPS for position update and then stops it.
91     */
92     void setPowerSave(bool enabled);
93
94     /**
95     * @brief Set GPS update interval.
96     *
97     * DOES NOTHING.
98     * @return interval interval in milliseconds
99     */
100     void setUpdateInterval(int interval);
101
102     /**
103     * @brief Set GPS mode.
104     *
105     * DOES NOTHING
106     * @param mode GPS mode
107     * @param filePath file path to NMEA file if simulation mode is used
108     */
109     void setMode(GPSPosition::Mode mode, const QString &filePath = 0);
110
111     /**
112     * @brief Start GPS.
113     *
114     * Emits GPS initalization error.
115     */
116     void start();
117
118     /**
119     * @brief Stop GPS.
120     *
121     * DOES NOTHING.
122     */
123     void stop();
124
125 /*******************************************************************************
126  * DATA MEMBERS
127  ******************************************************************************/
128 private:
129     GPSPosition *m_parent;                      ///< Parent object
130 };
131
132 #endif // GPSPOSITIONMOCKUP_H