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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
/**
* @licence app begin@
* SPDX-License-Identifier: MPL-2.0
*
* \copyright Copyright (C) 2016, PCA Peugeot Citroen
*
* \file main.cpp
*
* \brief This file is part of the Navigation Web API proof of concept.
*
* \author Philippe Colliot <philippe.colliot@mpsa.com>
*
* \version 0.1
*
* This Source Code Form is subject to the terms of the
* Mozilla Public License (MPL), v. 2.0.
* If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* For further information see http://www.genivi.org/.
*
* List of changes:
* <date>, <name>, <description of change>
*
* @licence end@
*/
#include <node.h>
#include "NavigationCoreProxy.hpp"
#include "../NavigationCoreWrapper.hpp"
using namespace v8;
using namespace std;
static DBus::Glib::BusDispatcher *dispatcher;
static DBus::Connection *connection;
NavigationCoreGuidanceProxy::NavigationCoreGuidanceProxy(DBus::Connection &connection, NavigationCoreProxy *navigationCoreProxy)
: DBus::ObjectProxy(connection,
"/org/genivi/navigationcore",
"org.genivi.navigationcore.Guidance")
{
mp_navigationCoreProxy = navigationCoreProxy;
}
void NavigationCoreGuidanceProxy::VehicleLeftTheRoadNetwork()
{
}
void NavigationCoreGuidanceProxy::GuidanceStatusChanged(const int32_t& guidanceStatus, const uint32_t& routeHandle)
{
mp_navigationCoreProxy->GuidanceStatusChanged(guidanceStatus,routeHandle);
}
void NavigationCoreGuidanceProxy::WaypointReached(const bool& isDestination)
{
}
void NavigationCoreGuidanceProxy::ManeuverChanged(const int32_t& maneuver)
{
}
void NavigationCoreGuidanceProxy::PositionOnRouteChanged(const uint32_t& offsetOnRoute)
{
}
void NavigationCoreGuidanceProxy::VehicleLeftTheRoute()
{
}
void NavigationCoreGuidanceProxy::PositionToRouteChanged(const uint32_t& distance, const int32_t& direction)
{
}
void NavigationCoreGuidanceProxy::ActiveRouteChanged(const int32_t& changeCause)
{
}
NavigationCoreProxy::NavigationCoreProxy(NavigationCoreWrapper *navigationCoreWrapper)
{
dispatcher = new DBus::Glib::BusDispatcher();
DBus::default_dispatcher = dispatcher;
dispatcher->attach(NULL);
connection = new DBus::Connection(DBus::Connection::SessionBus());
connection->setup(dispatcher);
mp_navigationCoreWrapper = navigationCoreWrapper;
mp_navigationCoreGuidanceProxy = new NavigationCoreGuidanceProxy(*connection,this);
}
NavigationCoreProxy::~NavigationCoreProxy()
{
delete mp_navigationCoreGuidanceProxy;
delete connection;
delete dispatcher;
}
void NavigationCoreProxy::GuidanceStatusChanged(const int32_t& guidanceStatus, const uint32_t& routeHandle)
{
mp_navigationCoreWrapper->GuidanceStatusChanged(guidanceStatus,routeHandle);
}
|