summaryrefslogtreecommitdiffstats
path: root/app/dbus_server.h
blob: 8cd2f529db7896a98160a0be9aa736e21cfa1c39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef DBUS_SERVER_H
#define DBUS_SERVER_H
#include "naviapi_interface.h"
#include "naviapi_adaptor.h"
#include <QtQml/QQmlApplicationEngine>

class DBus_Server : public QObject{

    Q_OBJECT

    QString m_serverName;
    QString m_pathName;
    QString m_objName;

public:
    DBus_Server(const QString &pathName,
                const QString &objName,
                const QString &serverName,
                QObject *parent = nullptr);
    ~DBus_Server();

private:
    void initDBus();
    void initAPIs(QObject*);

signals:
    void doAddPOI(QVariant,QVariant,QVariant);
    void doRemovePOIs(QVariant);
    void doGetRouteInfo();

public slots:
    void addPOI(uint category_id, double poi_Lat, double poi_Lon);
    void removePOIs(uint category_id);
    void getRouteInfoSlot();
    void sendSignalRouteInfo(double srt_lat,double srt_lon,double end_lat,double end_lon);
    void sendSignalPosInfo(double lat,double lon,double drc,double dst);
    void sendSignalStopDemo();
    void sendSignalArrvied();
};
#endif // DBUS_SERVER_H