diff options
author | Matt Ranostay <matt.ranostay@konsulko.com> | 2019-11-10 18:23:23 -0800 |
---|---|---|
committer | Matt Ranostay <matt.ranostay@konsulko.com> | 2019-11-11 20:28:23 -0800 |
commit | d01ce33b26daf332d4b8bd9e389e0877c1c38b88 (patch) | |
tree | e16486c8baaa36a53cd8db7d6bde153eab8f3c87 /app/dbus_client.cpp | |
parent | 8f03b833b933fc632284e594cb636877c47b8128 (diff) |
tbtnavi: remove dbus navicore client
In order to use new agl-service-navigation the current navicore
DBus client needs to be removed.
Bug-AGL: SPEC-2880
Change-Id: I4c6eef6c44ec55aa1fd2fc6b73c2cf3aa7fbd51e
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'app/dbus_client.cpp')
-rw-r--r-- | app/dbus_client.cpp | 116 |
1 files changed, 0 insertions, 116 deletions
diff --git a/app/dbus_client.cpp b/app/dbus_client.cpp deleted file mode 100644 index 62dde46..0000000 --- a/app/dbus_client.cpp +++ /dev/null @@ -1,116 +0,0 @@ -#include "dbus_client.h" - -dbus_client::dbus_client(const QString &pathName, - const QString &objName, - const QString &serverName, - QObject *parent) : - m_serverName(serverName), - m_pathName(pathName + serverName), - m_objName(objName + serverName) -{ - // DBus & api init - initDBus(); - initAPIs(parent); -} - -dbus_client::~dbus_client(){} - -void dbus_client::initDBus(){ - - new NaviapiAdaptor(this); - - // connect session to navigation service(add route info) - if (!QDBusConnection::sessionBus().connect( - QString(), - QString(), - m_pathName, - "signalRouteInfo", - this, - SLOT(addRoutePointsSlot(double, double, double, double)))) { //slot - qWarning() << m_serverName << "sessionBus.connect(): signalRouteInfo failed"; - } - - // connect session to navigation service(current postion info) - if (!QDBusConnection::sessionBus().connect( - QString(), - QString(), - m_pathName, - "signalPosInfo", - this, - SLOT(positionSlot(double, double, double, double)))) { //slot - qWarning() << m_serverName << "sessionBus.connect(): signalPosInfo failed"; - } - - // connect session to navigation service(when demo stopped) - if (!QDBusConnection::sessionBus().connect( - QString(), - QString(), - m_pathName, - "signalStopDemo", - this, - SLOT(stopdemoSlot()))) { //slot - qWarning() << m_serverName << "sessionBus.connect(): signalStopDemo failed"; - } - - // connect session to navigation service(when arrived destination) - if (!QDBusConnection::sessionBus().connect( - QString(), - QString(), - m_pathName, - "signalArrived", - this, - SLOT(arrivedestSlot()))) { //slot - qWarning() << m_serverName << "sessionBus.connect(): signalArrived failed"; - } -} - -void dbus_client::initAPIs(QObject *parent){ - // connect the signal to qml inside function(addRoutePointsQml -> do_addRoutePoint) - if(!QObject::connect(this, SIGNAL(addRoutePointsQml(QVariant, QVariant, QVariant, QVariant)), - parent, SLOT(do_addRoutePoint(QVariant, QVariant, QVariant, QVariant)))) { - qWarning() << m_serverName << "SIGNAL:addRoutePointsQml to qmlSLOT:do_addRoutePoint connect failed"; - } - - // connect the signal to qml inside function(positionQml -> do_setCoordinate) - if(!QObject::connect(this, SIGNAL(positionQml(QVariant, QVariant,QVariant, QVariant)), - parent, SLOT(do_setCoordinate(QVariant, QVariant,QVariant, QVariant)))) { - qWarning() << m_serverName << "SIGNAL:positionQml to qmlSLOT:do_setCoordinate connect failed"; - } - - // connect the signal to qml inside function(stopdemoQml -> do_stopnavidemo) - if(!QObject::connect(this, SIGNAL(stopdemoQml()), - parent, SLOT(do_stopnavidemo()))) { - qWarning() << m_serverName << "SIGNAL:stopdemoQml to qmlSLOT:do_stopnavidemo connect failed"; - } - - // connect the signal to qml inside function(arrivedestQml -> do_arrivedest) - if(!QObject::connect(this, SIGNAL(arrivedestQml()), - parent, SLOT(do_arrivedest()))) { - qWarning() << m_serverName << "SIGNAL:arrivedestQml to qmlSLOT:do_arrivedest connect failed"; - } -} - -// Signal&&Method -// addRoutePointsSlot -> addRoutePointsQml(use for qml) -void dbus_client::addRoutePointsSlot(double route_Lat_s, double route_Lon_s, double route_Lat_e, double route_Lon_e) -{ - emit addRoutePointsQml(route_Lat_s, route_Lon_s, route_Lat_e, route_Lon_e); -} - -// positionSlot -> positionQml(use for qml) -void dbus_client::positionSlot(double cur_Lat_p, double cur_Lon_p,double cur_direction, double cur_distance) -{ - emit positionQml(cur_Lat_p, cur_Lon_p,cur_direction,cur_distance); -} - -// stopdemoSlot -> stopdemoQml(use for qml) -void dbus_client::stopdemoSlot() -{ - emit stopdemoQml(); -} - -// arrivedestSlot -> arrivedestQml(use for qml) -void dbus_client::arrivedestSlot() -{ - emit arrivedestQml(); -} |