41 |
41 |
42 #ifndef DBUSSERVER_MAEMO_H |
42 #ifndef DBUSSERVER_MAEMO_H |
43 #define DBUSSERVER_MAEMO_H |
43 #define DBUSSERVER_MAEMO_H |
44 |
44 |
45 #include <QtDBus/QDBusAbstractAdaptor> |
45 #include <QtDBus/QDBusAbstractAdaptor> |
46 #include "dbuscomm_maemo_p.h" |
|
47 |
|
48 #include "qgeopositioninfo.h" |
46 #include "qgeopositioninfo.h" |
49 #include "qgeopositioninfosource.h" |
47 #include "qgeopositioninfosource.h" |
|
48 #include "qgeosatelliteinfo.h" |
50 |
49 |
51 QTM_BEGIN_NAMESPACE |
50 QTM_BEGIN_NAMESPACE |
52 |
51 |
53 class DBusComm; |
52 class DBusServerIF { |
|
53 public: |
|
54 virtual void receivePositionUpdate(const QGeoPositionInfo &update) = 0; |
|
55 virtual void receiveSettings(const QGeoPositionInfoSource::PositioningMethod methods, int interval) = 0; |
|
56 virtual void receiveSatellitesInView(const QList<QGeoSatelliteInfo> &update) = 0; |
|
57 virtual void receiveSatellitesInUse(const QList<QGeoSatelliteInfo> &update) = 0; |
|
58 }; |
|
59 |
|
60 |
54 class DBusServer: public QDBusAbstractAdaptor |
61 class DBusServer: public QDBusAbstractAdaptor |
55 { |
62 { |
56 Q_OBJECT |
63 Q_OBJECT |
57 Q_CLASSINFO("D-Bus Interface", "com.nokia.qlocation.updates") |
64 Q_CLASSINFO("D-Bus Interface", "com.nokia.qlocation.updates") |
58 |
65 |
59 public: |
66 public: |
60 DBusServer(QObject *obj); |
67 DBusServer(QObject *obj, DBusServerIF *interface); |
61 void setHandlerObject(DBusComm* p); |
68 |
|
69 public Q_SLOTS: |
|
70 Q_NOREPLY void positionUpdate(const QByteArray &update); |
|
71 Q_NOREPLY void satellitesInViewUpdate(const QByteArray &update); |
|
72 Q_NOREPLY void satellitesInUseUpdate(const QByteArray &update); |
|
73 Q_NOREPLY void currentSettings(const QGeoPositionInfoSource::PositioningMethod methods, |
|
74 int interval); |
62 |
75 |
63 private: |
76 private: |
64 DBusComm* handler; |
77 Q_DISABLE_COPY(DBusServer) |
65 |
78 DBusServerIF *interface; |
66 public slots: |
|
67 Q_NOREPLY void positionUpdate(const QByteArray &update); |
|
68 Q_NOREPLY void currentSettings(const QGeoPositionInfoSource::PositioningMethod methods, |
|
69 const int interval); |
|
70 }; |
79 }; |
71 |
80 |
72 QTM_END_NAMESPACE |
81 QTM_END_NAMESPACE |
73 |
82 |
74 #endif |
83 #endif |