diff options
author | <philippe colliot> | 2016-03-15 18:07:25 +0100 |
---|---|---|
committer | <philippe colliot> | 2016-03-15 18:07:25 +0100 |
commit | fd4b29aede024f3a7eb93b2c93e5305bd8c3aca0 (patch) | |
tree | f64471a24426cd49817833b65627ecf13ffdefbd /test/navigation/w3c | |
parent | d6dc8b51d7b9e7b15af4a22b976da7323aa7a170 (diff) | |
download | poi-service-fd4b29aede024f3a7eb93b2c93e5305bd8c3aca0.tar.gz |
Add copyright headers
Diffstat (limited to 'test/navigation/w3c')
16 files changed, 1030 insertions, 40 deletions
diff --git a/test/navigation/w3c/socket-based-poc/index.html b/test/navigation/w3c/socket-based-poc/navigation-settings-language-and-units.html index 822381b..822381b 100644 --- a/test/navigation/w3c/socket-based-poc/index.html +++ b/test/navigation/w3c/socket-based-poc/navigation-settings-language-and-units.html diff --git a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/NavigationCoreConfigurationWrapper.cpp b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/NavigationCoreWrapper.cpp index 3c4c887..e48d522 100644 --- a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/NavigationCoreConfigurationWrapper.cpp +++ b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/NavigationCoreWrapper.cpp @@ -1,14 +1,40 @@ +/** +* @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 "NavigationCoreConfigurationWrapper.hpp" +#include "NavigationCoreWrapper.hpp" using namespace v8; using namespace std; -Persistent<FunctionTemplate> NavigationCoreConfigurationWrapper::constructor; +Persistent<FunctionTemplate> NavigationCoreWrapper::constructor; -void NavigationCoreConfigurationWrapper::ConfigurationChanged(const Handle<Function>& callback, const Handle<Array>& array) { +void NavigationCoreWrapper::ConfigurationChanged(const Handle<Function>& callback, const Handle<Array>& array) { HandleScope scope; // In case the operation succeeded, convention is to pass null as the // first argument before the result arguments. @@ -24,11 +50,11 @@ void NavigationCoreConfigurationWrapper::ConfigurationChanged(const Handle<Funct callback->Call(Context::GetCurrent()->Global(), argc, argv); } -void NavigationCoreConfigurationWrapper::Init(Handle<Object> target) { +void NavigationCoreWrapper::Init(Handle<Object> target) { HandleScope scope; Local<FunctionTemplate> tpl = FunctionTemplate::New(New); - Local<String> name = String::NewSymbol("NavigationCoreConfigurationWrapper"); + Local<String> name = String::NewSymbol("NavigationCoreWrapper"); constructor = Persistent<FunctionTemplate>::New(tpl); // ObjectWrap uses the first internal field to store the wrapped pointer. @@ -47,13 +73,13 @@ void NavigationCoreConfigurationWrapper::Init(Handle<Object> target) { target->Set(name, constructor->GetFunction()); } -NavigationCoreConfigurationWrapper::NavigationCoreConfigurationWrapper() { +NavigationCoreWrapper::NavigationCoreWrapper() { } -NavigationCoreConfigurationWrapper::~NavigationCoreConfigurationWrapper() { +NavigationCoreWrapper::~NavigationCoreWrapper() { } -Handle<Value> NavigationCoreConfigurationWrapper::New(const Arguments& args) { +Handle<Value> NavigationCoreWrapper::New(const Arguments& args) { HandleScope scope; if (!args.IsConstructCall()) { @@ -64,14 +90,14 @@ Handle<Value> NavigationCoreConfigurationWrapper::New(const Arguments& args) { NavigationCoreProxy* proxy = new NavigationCoreProxy(); // Creates a new instance object of this type and wraps it. - NavigationCoreConfigurationWrapper* obj = new NavigationCoreConfigurationWrapper(); + NavigationCoreWrapper* obj = new NavigationCoreWrapper(); obj->mp_proxy = proxy; obj->Wrap(args.This()); return args.This(); } -Handle<Value> NavigationCoreConfigurationWrapper::GetProperty(const Arguments& args) { +Handle<Value> NavigationCoreWrapper::GetProperty(const Arguments& args) { HandleScope scope; //to properly clean up v8 handles if (args.Length() < 1) { @@ -84,7 +110,7 @@ Handle<Value> NavigationCoreConfigurationWrapper::GetProperty(const Arguments& a if(propertyName == "Locale") { // Retrieves the pointer to the wrapped object instance. - NavigationCoreConfigurationWrapper* obj = ObjectWrap::Unwrap<NavigationCoreConfigurationWrapper>(args.This()); + NavigationCoreWrapper* obj = ObjectWrap::Unwrap<NavigationCoreWrapper>(args.This()); Local<Object> ret = Object::New(); Locale localeValue; @@ -99,7 +125,7 @@ Handle<Value> NavigationCoreConfigurationWrapper::GetProperty(const Arguments& a { if(propertyName == "TimeFormat") { // Retrieves the pointer to the wrapped object instance. - NavigationCoreConfigurationWrapper* obj = ObjectWrap::Unwrap<NavigationCoreConfigurationWrapper>(args.This()); + NavigationCoreWrapper* obj = ObjectWrap::Unwrap<NavigationCoreWrapper>(args.This()); Local<Object> ret = Object::New(); @@ -109,7 +135,7 @@ Handle<Value> NavigationCoreConfigurationWrapper::GetProperty(const Arguments& a { if(propertyName == "CoordinatesFormat") { // Retrieves the pointer to the wrapped object instance. - NavigationCoreConfigurationWrapper* obj = ObjectWrap::Unwrap<NavigationCoreConfigurationWrapper>(args.This()); + NavigationCoreWrapper* obj = ObjectWrap::Unwrap<NavigationCoreWrapper>(args.This()); Local<Object> ret = Object::New(); @@ -120,7 +146,7 @@ Handle<Value> NavigationCoreConfigurationWrapper::GetProperty(const Arguments& a return Undefined(); } -Handle<Value> NavigationCoreConfigurationWrapper::SetProperty(const Arguments& args) +Handle<Value> NavigationCoreWrapper::SetProperty(const Arguments& args) { HandleScope scope; //to properly clean up v8 handles @@ -149,7 +175,7 @@ Handle<Value> NavigationCoreConfigurationWrapper::SetProperty(const Arguments& a localeValue.scriptCode = std::string(*scriptCode); // Retrieves the pointer to the wrapped object instance. - NavigationCoreConfigurationWrapper* obj = ObjectWrap::Unwrap<NavigationCoreConfigurationWrapper>(args.This()); + NavigationCoreWrapper* obj = ObjectWrap::Unwrap<NavigationCoreWrapper>(args.This()); obj->mp_proxy->mp_configurationProxy->SetLocale(localeValue.languageCode,localeValue.countryCode,localeValue.scriptCode); Handle<Value> callBackValue = property_obj->Get(String::New("callBack")); @@ -166,11 +192,11 @@ Handle<Value> NavigationCoreConfigurationWrapper::SetProperty(const Arguments& a return Undefined(); } -Handle<Value> NavigationCoreConfigurationWrapper::GetVersion(const Arguments& args) { +Handle<Value> NavigationCoreWrapper::GetVersion(const Arguments& args) { HandleScope scope; //to properly clean up v8 handles // Retrieves the pointer to the wrapped object instance. - NavigationCoreConfigurationWrapper* obj = ObjectWrap::Unwrap<NavigationCoreConfigurationWrapper>(args.This()); + NavigationCoreWrapper* obj = ObjectWrap::Unwrap<NavigationCoreWrapper>(args.This()); ::DBus::Struct< uint16_t, uint16_t, uint16_t, std::string > DBus_version = obj->mp_proxy->mp_configurationProxy->GetVersion(); @@ -183,11 +209,11 @@ Handle<Value> NavigationCoreConfigurationWrapper::GetVersion(const Arguments& ar return scope.Close(ret); } -Handle<Value> NavigationCoreConfigurationWrapper::GetSupportedLocales(const Arguments& args) { +Handle<Value> NavigationCoreWrapper::GetSupportedLocales(const Arguments& args) { HandleScope scope; //to properly clean up v8 handles // Retrieves the pointer to the wrapped object instance. - NavigationCoreConfigurationWrapper* obj = ObjectWrap::Unwrap<NavigationCoreConfigurationWrapper>(args.This()); + NavigationCoreWrapper* obj = ObjectWrap::Unwrap<NavigationCoreWrapper>(args.This()); std::vector< ::DBus::Struct< std::string, std::string, std::string > > localeList = obj->mp_proxy->mp_configurationProxy->GetSupportedLocales(); @@ -204,12 +230,12 @@ Handle<Value> NavigationCoreConfigurationWrapper::GetSupportedLocales(const Argu return scope.Close(ret); } -Handle<Value> NavigationCoreConfigurationWrapper::GetUnitsOfMeasurement(const Arguments& args) +Handle<Value> NavigationCoreWrapper::GetUnitsOfMeasurement(const Arguments& args) { HandleScope scope; //to properly clean up v8 handles // Retrieves the pointer to the wrapped object instance. - NavigationCoreConfigurationWrapper* obj = ObjectWrap::Unwrap<NavigationCoreConfigurationWrapper>(args.This()); + NavigationCoreWrapper* obj = ObjectWrap::Unwrap<NavigationCoreWrapper>(args.This()); NavigationCoreConfigurationProxy::UnitsOfMeasurement unitsOfMeasurement = obj->mp_proxy->mp_configurationProxy->GetUnitsOfMeasurement(); @@ -234,7 +260,7 @@ Handle<Value> NavigationCoreConfigurationWrapper::GetUnitsOfMeasurement(const Ar } void RegisterModule(Handle<Object> target) { - NavigationCoreConfigurationWrapper::Init(target); + NavigationCoreWrapper::Init(target); } -NODE_MODULE(NavigationCoreConfigurationWrapper, RegisterModule); +NODE_MODULE(NavigationCoreWrapper, RegisterModule); diff --git a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/NavigationCoreConfigurationWrapper.hpp b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/NavigationCoreWrapper.hpp index 82d98d2..af08bee 100644 --- a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/NavigationCoreConfigurationWrapper.hpp +++ b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/NavigationCoreWrapper.hpp @@ -1,12 +1,38 @@ -#ifndef NAVIGATIONCORECONFIGURATIONWRAPPER_HPP -#define NAVIGATIONCORECONFIGURATIONWRAPPER_HPP +/** +* @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@ +*/ +#ifndef NAVIGATIONCOREWRAPPER_HPP +#define NAVIGATIONCOREWRAPPER_HPP #define USE_DBUS 0 #include <node.h> #include <node_buffer.h> -#include "./dbus-proxies/NavigationCoreConfigurationProxy.hpp" +#include "./dbus-proxies/NavigationCoreProxy.hpp" #include <string> #include <vector> @@ -17,14 +43,14 @@ // header file. // using namespace v8; -class NavigationCoreConfigurationWrapper : public node::ObjectWrap { +class NavigationCoreWrapper : public node::ObjectWrap { public: static v8::Persistent<v8::FunctionTemplate> constructor; static void Init(v8::Handle<v8::Object> target); protected: - NavigationCoreConfigurationWrapper(); - ~NavigationCoreConfigurationWrapper(); + NavigationCoreWrapper(); + ~NavigationCoreWrapper(); static v8::Handle<v8::Value> New(const v8::Arguments& args); static v8::Handle<v8::Value> GetVersion(const v8::Arguments& args); diff --git a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/POIServiceWrapper.cpp b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/POIServiceWrapper.cpp new file mode 100644 index 0000000..776f17f --- /dev/null +++ b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/POIServiceWrapper.cpp @@ -0,0 +1,84 @@ +/** +* @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 "POIServiceWrapper.hpp" + +using namespace v8; +using namespace std; + + +Persistent<FunctionTemplate> POIServiceWrapper::constructor; + + +void POIServiceWrapper::Init(Handle<Object> target) { + HandleScope scope; + + Local<FunctionTemplate> tpl = FunctionTemplate::New(New); + Local<String> name = String::NewSymbol("POIServiceWrapper"); + + constructor = Persistent<FunctionTemplate>::New(tpl); + // ObjectWrap uses the first internal field to store the wrapped pointer. + constructor->InstanceTemplate()->SetInternalFieldCount(1); + constructor->SetClassName(name); + + // Add all prototype methods, getters and setters here. + + // This has to be last, otherwise the properties won't show up on the + // object in JavaScript. + target->Set(name, constructor->GetFunction()); +} + +POIServiceWrapper::POIServiceWrapper() { +} + +POIServiceWrapper::~POIServiceWrapper() { +} + +Handle<Value> POIServiceWrapper::New(const Arguments& args) { + HandleScope scope; + + if (!args.IsConstructCall()) { + return ThrowException(Exception::TypeError( + String::New("Use the new operator to create instances of this object.")) + ); + } + POIServiceProxy* proxy = new POIServiceProxy(); + + // Creates a new instance object of this type and wraps it. + POIServiceWrapper* obj = new POIServiceWrapper(); + obj->mp_proxy = proxy; + obj->Wrap(args.This()); + + return args.This(); +} + +void RegisterModule(Handle<Object> target) { + POIServiceWrapper::Init(target); +} + +NODE_MODULE(POIServiceWrapper, RegisterModule); diff --git a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/POIServiceWrapper.hpp b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/POIServiceWrapper.hpp new file mode 100644 index 0000000..33d6185 --- /dev/null +++ b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/POIServiceWrapper.hpp @@ -0,0 +1,62 @@ +/** +* @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@ +*/ +#ifndef POISERVICEWRAPPER_HPP +#define POISERVICEWRAPPER_HPP + +#define USE_DBUS 0 + +#include <node.h> +#include <node_buffer.h> + +#include "./dbus-proxies/POIServiceProxy.hpp" + +#include <string> +#include <vector> +#include <map> + +// Do not include this line. It's generally frowned upon to use namespaces +// in header files as it may cause issues with other code that includes your +// header file. +// using namespace v8; + +class POIServiceWrapper : public node::ObjectWrap { +public: + static v8::Persistent<v8::FunctionTemplate> constructor; + static void Init(v8::Handle<v8::Object> target); + +protected: + POIServiceWrapper(); + ~POIServiceWrapper(); + + static v8::Handle<v8::Value> New(const v8::Arguments& args); + +private: + + POIServiceProxy* mp_proxy; +}; + +#endif diff --git a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/binding.gyp b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/binding.gyp index 9d230bb..28b9194 100644 --- a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/binding.gyp +++ b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/binding.gyp @@ -1,18 +1,35 @@ { 'targets': [ { - 'target_name': 'NavigationCoreConfigurationProxy', + 'target_name': 'NavigationCoreProxy', 'product_prefix': 'lib', 'type': 'shared_library', - 'sources': [ './dbus-proxies/NavigationCoreConfigurationProxy.cpp' ], + 'sources': [ './dbus-proxies/NavigationCoreProxy.cpp' ], 'include_dirs': ['./','/usr/include/dbus-c++-1/','/usr/include/glib-2.0/','/usr/lib/i386-linux-gnu/glib-2.0/include/'], 'cflags_cc': ['-Wall', '-std=gnu++11', '-fexceptions','-fPIC'], 'libraries': ['-ldbus-c++-1 -ldbus-1 -ldbus-c++-glib-1', '-L/usr/lib/i386-linux-gnu/'] }, { - 'target_name': 'NavigationCoreConfigurationWrapper', - 'dependencies': [ 'NavigationCoreConfigurationProxy' ], - 'sources': [ './NavigationCoreConfigurationWrapper.cpp' ], + 'target_name': 'NavigationCoreWrapper', + 'dependencies': [ 'NavigationCoreProxy' ], + 'sources': [ './NavigationCoreWrapper.cpp' ], + 'include_dirs': ['./','./dbus-proxies','/usr/include/dbus-c++-1/','/usr/include/glib-2.0/','/usr/lib/i386-linux-gnu/glib-2.0/include/'], + 'cflags_cc': ['-Wall', '-std=gnu++11', '-fexceptions'], + 'libraries': ['-ldbus-c++-1 -ldbus-1 -ldbus-c++-glib-1', '-L/usr/lib/i386-linux-gnu/'] + }, + { + 'target_name': 'POIServiceProxy', + 'product_prefix': 'lib', + 'type': 'shared_library', + 'sources': [ './dbus-proxies/POIServiceProxy.cpp' ], + 'include_dirs': ['./','/usr/include/dbus-c++-1/','/usr/include/glib-2.0/','/usr/lib/i386-linux-gnu/glib-2.0/include/'], + 'cflags_cc': ['-Wall', '-std=gnu++11', '-fexceptions','-fPIC'], + 'libraries': ['-ldbus-c++-1 -ldbus-1 -ldbus-c++-glib-1', '-L/usr/lib/i386-linux-gnu/'] + }, + { + 'target_name': 'POIServiceWrapper', + 'dependencies': [ 'POIServiceProxy' ], + 'sources': [ './POIServiceWrapper.cpp' ], 'include_dirs': ['./','./dbus-proxies','/usr/include/dbus-c++-1/','/usr/include/glib-2.0/','/usr/lib/i386-linux-gnu/glib-2.0/include/'], 'cflags_cc': ['-Wall', '-std=gnu++11', '-fexceptions'], 'libraries': ['-ldbus-c++-1 -ldbus-1 -ldbus-c++-glib-1', '-L/usr/lib/i386-linux-gnu/'] diff --git a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/NavigationCoreConfigurationProxy.cpp b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/NavigationCoreProxy.cpp index c5ce609..7e3501e 100644 --- a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/NavigationCoreConfigurationProxy.cpp +++ b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/NavigationCoreProxy.cpp @@ -1,6 +1,32 @@ +/** +* @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 "NavigationCoreConfigurationProxy.hpp" +#include "NavigationCoreProxy.hpp" using namespace v8; using namespace std; @@ -41,6 +67,7 @@ NavigationCoreProxy::NavigationCoreProxy() NavigationCoreProxy::~NavigationCoreProxy() { + delete mp_configurationProxy; delete connection; delete dispatcher; } diff --git a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/NavigationCoreConfigurationProxy.hpp b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/NavigationCoreProxy.hpp index 9f976e1..1f7a028 100644 --- a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/NavigationCoreConfigurationProxy.hpp +++ b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/NavigationCoreProxy.hpp @@ -1,5 +1,31 @@ -#ifndef NAVIGATIONCORECONFIGURATIONPROXY_HPP -#define NAVIGATIONCORECONFIGURATIONPROXY_HPP +/** +* @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@ +*/ +#ifndef NAVIGATIONCOREPROXY_HPP +#define NAVIGATIONCOREPROXY_HPP #include <dbus-c++/glib-integration.h> #include "genivi-navigationcore-constants.h" diff --git a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/POIServiceProxy.cpp b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/POIServiceProxy.cpp new file mode 100644 index 0000000..95838a3 --- /dev/null +++ b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/POIServiceProxy.cpp @@ -0,0 +1,75 @@ +/** +* @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 "POIServiceProxy.hpp" + +using namespace v8; +using namespace std; + +static DBus::Glib::BusDispatcher *dispatcher; +static DBus::Connection *connection; + +POISearchProxy::POISearchProxy(DBus::Connection &connection) + : DBus::ObjectProxy(connection, + "/org/genivi/poiservice", + "org.genivi.poiservice.POISearch") +{ + +} + +void POISearchProxy::CategoriesUpdated(const std::vector< ::DBus::Struct< uint32_t, uint16_t > >& poiCategories) +{ + +} + +void POISearchProxy::PoiStatus(const uint32_t& poiSearchHandle, const int32_t& statusValue) +{ + +} + +void POISearchProxy::ResultListChanged(const uint32_t& poiSearchHandle, const uint16_t& resultListSize) +{ + +} + +POIServiceProxy::POIServiceProxy() +{ + dispatcher = new DBus::Glib::BusDispatcher(); + DBus::default_dispatcher = dispatcher; + dispatcher->attach(NULL); + connection = new DBus::Connection(DBus::Connection::SessionBus()); + connection->setup(dispatcher); + mp_poiSearchProxy = new POISearchProxy(*connection); +} + + +POIServiceProxy::~POIServiceProxy() +{ + delete connection; + delete dispatcher; +} diff --git a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/POIServiceProxy.hpp b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/POIServiceProxy.hpp new file mode 100644 index 0000000..d42b3a7 --- /dev/null +++ b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/POIServiceProxy.hpp @@ -0,0 +1,70 @@ +/** +* @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@ +*/ +#ifndef POISERVICEPROXY_HPP +#define POISERVICEPROXY_HPP + +#include <dbus-c++/glib-integration.h> +#include "genivi-poiservice-constants.h" +#include "genivi-poiservice-poisearch_proxy.h" + +#include <node.h> +#include <node_buffer.h> + +#include <string> +#include <vector> +#include <map> + +// Do not include this line. It's generally frowned upon to use namespaces +// in header files as it may cause issues with other code that includes your +// header file. +// using namespace v8; + +class POISearchProxy + : public org::genivi::poiservice::POISearch_proxy, + public DBus::ObjectProxy +{ +public: + + POISearchProxy(DBus::Connection &connection); + + void CategoriesUpdated(const std::vector< ::DBus::Struct< uint32_t, uint16_t > >& poiCategories); + void PoiStatus(const uint32_t& poiSearchHandle, const int32_t& statusValue); + void ResultListChanged(const uint32_t& poiSearchHandle, const uint16_t& resultListSize); + +private: +}; + +class POIServiceProxy +{ +public: + POIServiceProxy(); + ~POIServiceProxy(); + + POISearchProxy* mp_poiSearchProxy; +}; + +#endif diff --git a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/enhanced-position-proxy.h b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/enhanced-position-proxy.h new file mode 100644 index 0000000..0472243 --- /dev/null +++ b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/enhanced-position-proxy.h @@ -0,0 +1,105 @@ + +/* + * This file was automatically generated by dbusxx-xml2cpp; DO NOT EDIT! + */ + +#ifndef __dbusxx__enhanced_position_proxy_h__PROXY_MARSHAL_H +#define __dbusxx__enhanced_position_proxy_h__PROXY_MARSHAL_H + +#include <dbus-c++/dbus.h> +#include <cassert> + +namespace org { +namespace genivi { +namespace positioning { + +class EnhancedPosition_proxy +: public ::DBus::InterfaceProxy +{ +public: + + EnhancedPosition_proxy() + : ::DBus::InterfaceProxy("org.genivi.positioning.EnhancedPosition") + { + connect_signal(EnhancedPosition_proxy, PositionUpdate, _PositionUpdate_stub); + } + +public: + + /* properties exported by this interface */ +public: + + /* methods exported by this interface, + * this functions will invoke the corresponding methods on the remote objects + */ + ::DBus::Struct< uint16_t, uint16_t, uint16_t, std::string > GetVersion() + { + ::DBus::CallMessage call; + call.member("GetVersion"); + ::DBus::Message ret = invoke_method (call); + ::DBus::MessageIter ri = ret.reader(); + + ::DBus::Struct< uint16_t, uint16_t, uint16_t, std::string > argout; + ri >> argout; + return argout; + } + + void GetPositionInfo(const uint64_t& valuesToReturn, uint64_t& timestamp, std::map< uint64_t, ::DBus::Variant >& data) + { + ::DBus::CallMessage call; + ::DBus::MessageIter wi = call.writer(); + + wi << valuesToReturn; + call.member("GetPositionInfo"); + ::DBus::Message ret = invoke_method (call); + ::DBus::MessageIter ri = ret.reader(); + + ri >> timestamp; + ri >> data; + } + + void GetSatelliteInfo(uint64_t& timestamp, std::vector< ::DBus::Struct< uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, bool > >& satelliteInfo) + { + ::DBus::CallMessage call; + call.member("GetSatelliteInfo"); + ::DBus::Message ret = invoke_method (call); + ::DBus::MessageIter ri = ret.reader(); + + ri >> timestamp; + ri >> satelliteInfo; + } + + void GetTime(uint64_t& timestamp, std::map< uint64_t, ::DBus::Variant >& time) + { + ::DBus::CallMessage call; + call.member("GetTime"); + ::DBus::Message ret = invoke_method (call); + ::DBus::MessageIter ri = ret.reader(); + + ri >> timestamp; + ri >> time; + } + + +public: + + /* signal handlers for this interface + */ + virtual void PositionUpdate(const uint64_t& changedValues) = 0; + +private: + + /* unmarshalers (to unpack the DBus message before calling the actual signal handler) + */ + void _PositionUpdate_stub(const ::DBus::SignalMessage &sig) + { + ::DBus::MessageIter ri = sig.reader(); + + uint64_t changedValues; + ri >> changedValues; + PositionUpdate(changedValues); + } +}; + +} } } +#endif //__dbusxx__enhanced_position_proxy_h__PROXY_MARSHAL_H diff --git a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/genivi-poiservice-constants.h b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/genivi-poiservice-constants.h new file mode 100644 index 0000000..4182524 --- /dev/null +++ b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/genivi-poiservice-constants.h @@ -0,0 +1,62 @@ + +/* This is an automatically generated file, do not edit */ + +enum GENIVI_POISERVICE_Constants { + GENIVI_POISERVICE_INVALID = 0, + GENIVI_POISERVICE_AIRPORT = 1, + GENIVI_POISERVICE_SPORTING = 2, + GENIVI_POISERVICE_FERRY_TERMINAL = 3, + GENIVI_POISERVICE_ENTERTAINMENT = 4, + GENIVI_POISERVICE_HOTEL_MOTEL = 5, + GENIVI_POISERVICE_RESTAURANT = 6, + GENIVI_POISERVICE_PARKING = 7, + GENIVI_POISERVICE_FUEL_STATION = 8, + GENIVI_POISERVICE_SERVICE_AREA = 9, + GENIVI_POISERVICE_CAR_REPAIR_SHOP = 10, + GENIVI_POISERVICE_CAR_DEALER = 11, + GENIVI_POISERVICE_CAR_RENTAL_AGENCY = 12, + GENIVI_POISERVICE_MEDICAL = 13, + GENIVI_POISERVICE_SHOPPING = 14, + GENIVI_POISERVICE_BUSINESS_AREA = 15, + GENIVI_POISERVICE_LANDMARK = 16, + GENIVI_POISERVICE_FLASH_RADAR = 17, + GENIVI_POISERVICE_POI_TRUCK = 18, + GENIVI_POISERVICE_SANCTUARY = 19, + GENIVI_POISERVICE_TOLLBOOTH = 20, + GENIVI_POISERVICE_KIOSK = 21, + GENIVI_POISERVICE_WATER_CLOSET = 22, + GENIVI_POISERVICE_BANK_AND_FINANCIAL = 23, + GENIVI_POISERVICE_TRAVEL = 24, + GENIVI_POISERVICE_TOURIST = 25, + GENIVI_POISERVICE_PUBLIC_BUILDING = 26, + GENIVI_POISERVICE_RAILWAY_STATION = 27, + GENIVI_POISERVICE_DESTINATION_FLAG = 204, + GENIVI_POISERVICE_FAVORITE = 205, + GENIVI_POISERVICE_FAVORITE_HOME = 206, + GENIVI_POISERVICE_FAVORITE_ADDRESSBOOK = 207, + GENIVI_POISERVICE_USER_IMPORT = 208, + GENIVI_POISERVICE_USER_CONTACT = 209, + GENIVI_POISERVICE_MOTORWAY_EXIT = 210, + GENIVI_POISERVICE_ALL_CATEGORIES = 0xffff, + GENIVI_POISERVICE_STRING = 500, + GENIVI_POISERVICE_INTEGER = 501, + GENIVI_POISERVICE_COORDINATES = 502, + GENIVI_POISERVICE_NOT_STARTED = 510, + GENIVI_POISERVICE_SEARCHING = 511, + GENIVI_POISERVICE_FINISHED = 512, + GENIVI_POISERVICE_MORE_THAN = 520, + GENIVI_POISERVICE_LESS_THAN = 521, + GENIVI_POISERVICE_EQUAL = 522, + GENIVI_POISERVICE_SORT_DEFAULT = 560, + GENIVI_POISERVICE_SORT_BY_DISTANCE = 561, + GENIVI_POISERVICE_SORT_BY_TIME = 562, + GENIVI_POISERVICE_OFF_ROUTE = 600, + GENIVI_POISERVICE_ON_ROUTE = 601, + GENIVI_POISERVICE_INSIDE_CORRIDOR = 602, + GENIVI_POISERVICE_ADDED = 700, + GENIVI_POISERVICE_REMOVED = 701, + GENIVI_POISERVICE_ATTR_ADDED = 702, + GENIVI_POISERVICE_ATTR_MODIFIED = 703, + GENIVI_POISERVICE_ATTR_REMOVED = 704, +}; +
\ No newline at end of file diff --git a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/genivi-poiservice-poisearch_proxy.h b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/genivi-poiservice-poisearch_proxy.h new file mode 100644 index 0000000..72210ff --- /dev/null +++ b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/genivi-poiservice-poisearch_proxy.h @@ -0,0 +1,323 @@ + +/* + * This file was automatically generated by dbusxx-xml2cpp; DO NOT EDIT! + */ + +#ifndef __dbusxx___home_psa_Desktop_genivi_navigation_master_src_navigation_build_dbus_include_poi_service_genivi_poiservice_poisearch_proxy_h__PROXY_MARSHAL_H +#define __dbusxx___home_psa_Desktop_genivi_navigation_master_src_navigation_build_dbus_include_poi_service_genivi_poiservice_poisearch_proxy_h__PROXY_MARSHAL_H + +#include <dbus-c++/dbus.h> +#include <cassert> + +namespace org { +namespace genivi { +namespace poiservice { + +class POISearch_proxy +: public ::DBus::InterfaceProxy +{ +public: + + POISearch_proxy() + : ::DBus::InterfaceProxy("org.genivi.poiservice.POISearch") + { + connect_signal(POISearch_proxy, CategoriesUpdated, _CategoriesUpdated_stub); + connect_signal(POISearch_proxy, PoiStatus, _PoiStatus_stub); + connect_signal(POISearch_proxy, ResultListChanged, _ResultListChanged_stub); + } + +public: + + /* properties exported by this interface */ +public: + + /* methods exported by this interface, + * this functions will invoke the corresponding methods on the remote objects + */ + ::DBus::Struct< uint16_t, uint16_t, uint16_t, std::string > GetVersion() + { + ::DBus::CallMessage call; + call.member("GetVersion"); + ::DBus::Message ret = invoke_method (call); + ::DBus::MessageIter ri = ret.reader(); + + ::DBus::Struct< uint16_t, uint16_t, uint16_t, std::string > argout; + ri >> argout; + return argout; + } + + std::vector< ::DBus::Struct< uint32_t, bool > > ValidateCategories(const std::vector< uint32_t >& categories) + { + ::DBus::CallMessage call; + ::DBus::MessageIter wi = call.writer(); + + wi << categories; + call.member("ValidateCategories"); + ::DBus::Message ret = invoke_method (call); + ::DBus::MessageIter ri = ret.reader(); + + std::vector< ::DBus::Struct< uint32_t, bool > > argout; + ri >> argout; + return argout; + } + + std::vector< ::DBus::Struct< uint32_t, std::string, bool > > GetAvailableCategories() + { + ::DBus::CallMessage call; + call.member("GetAvailableCategories"); + ::DBus::Message ret = invoke_method (call); + ::DBus::MessageIter ri = ret.reader(); + + std::vector< ::DBus::Struct< uint32_t, std::string, bool > > argout; + ri >> argout; + return argout; + } + + uint32_t GetRootCategory() + { + ::DBus::CallMessage call; + call.member("GetRootCategory"); + ::DBus::Message ret = invoke_method (call); + ::DBus::MessageIter ri = ret.reader(); + + uint32_t argout; + ri >> argout; + return argout; + } + + std::vector< ::DBus::Struct< uint32_t, bool > > GetChildrenCategories(const uint32_t& category) + { + ::DBus::CallMessage call; + ::DBus::MessageIter wi = call.writer(); + + wi << category; + call.member("GetChildrenCategories"); + ::DBus::Message ret = invoke_method (call); + ::DBus::MessageIter ri = ret.reader(); + + std::vector< ::DBus::Struct< uint32_t, bool > > argout; + ri >> argout; + return argout; + } + + std::vector< ::DBus::Struct< uint32_t, bool > > GetParentCategories(const uint32_t& category) + { + ::DBus::CallMessage call; + ::DBus::MessageIter wi = call.writer(); + + wi << category; + call.member("GetParentCategories"); + ::DBus::Message ret = invoke_method (call); + ::DBus::MessageIter ri = ret.reader(); + + std::vector< ::DBus::Struct< uint32_t, bool > > argout; + ri >> argout; + return argout; + } + + std::vector< ::DBus::Struct< ::DBus::Struct< uint32_t, std::vector< uint32_t >, ::DBus::Struct< uint8_t, ::DBus::Variant >, std::string, bool, std::string, ::DBus::Struct< uint8_t, ::DBus::Variant > >, std::vector< ::DBus::Struct< uint32_t, std::string, int32_t, std::vector< ::DBus::Struct< int32_t, std::string, ::DBus::Struct< uint8_t, ::DBus::Variant > > > > >, std::vector< ::DBus::Struct< uint32_t, std::string > > > > GetCategoriesDetails(const std::vector< uint32_t >& categories) + { + ::DBus::CallMessage call; + ::DBus::MessageIter wi = call.writer(); + + wi << categories; + call.member("GetCategoriesDetails"); + ::DBus::Message ret = invoke_method (call); + ::DBus::MessageIter ri = ret.reader(); + + std::vector< ::DBus::Struct< ::DBus::Struct< uint32_t, std::vector< uint32_t >, ::DBus::Struct< uint8_t, ::DBus::Variant >, std::string, bool, std::string, ::DBus::Struct< uint8_t, ::DBus::Variant > >, std::vector< ::DBus::Struct< uint32_t, std::string, int32_t, std::vector< ::DBus::Struct< int32_t, std::string, ::DBus::Struct< uint8_t, ::DBus::Variant > > > > >, std::vector< ::DBus::Struct< uint32_t, std::string > > > > argout; + ri >> argout; + return argout; + } + + uint32_t CreatePoiSearchHandle() + { + ::DBus::CallMessage call; + call.member("CreatePoiSearchHandle"); + ::DBus::Message ret = invoke_method (call); + ::DBus::MessageIter ri = ret.reader(); + + uint32_t argout; + ri >> argout; + return argout; + } + + void DeletePoiSearchHandle(const uint32_t& poiSearchHandle) + { + ::DBus::CallMessage call; + ::DBus::MessageIter wi = call.writer(); + + wi << poiSearchHandle; + call.member("DeletePoiSearchHandle"); + ::DBus::Message ret = invoke_method (call); + } + + void SetCenter(const uint32_t& poiSearchHandle, const ::DBus::Struct< double, double, double >& location) + { + ::DBus::CallMessage call; + ::DBus::MessageIter wi = call.writer(); + + wi << poiSearchHandle; + wi << location; + call.member("SetCenter"); + ::DBus::Message ret = invoke_method (call); + } + + void SetRouteHandle(const uint32_t& poiSearchHandle, const uint32_t& sessionHandle, const uint32_t& routeHandle, const uint32_t& startSearchOffset, const uint32_t& endSearchOffset) + { + ::DBus::CallMessage call; + ::DBus::MessageIter wi = call.writer(); + + wi << poiSearchHandle; + wi << sessionHandle; + wi << routeHandle; + wi << startSearchOffset; + wi << endSearchOffset; + call.member("SetRouteHandle"); + ::DBus::Message ret = invoke_method (call); + } + + void SetCategories(const uint32_t& poiSearchHandle, const std::vector< ::DBus::Struct< uint32_t, uint32_t > >& poiCategories) + { + ::DBus::CallMessage call; + ::DBus::MessageIter wi = call.writer(); + + wi << poiSearchHandle; + wi << poiCategories; + call.member("SetCategories"); + ::DBus::Message ret = invoke_method (call); + } + + void SetAttributes(const uint32_t& poiSearchHandle, const std::vector< ::DBus::Struct< uint32_t, uint32_t, int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant >, int32_t, bool > >& poiAttributes) + { + ::DBus::CallMessage call; + ::DBus::MessageIter wi = call.writer(); + + wi << poiSearchHandle; + wi << poiAttributes; + call.member("SetAttributes"); + ::DBus::Message ret = invoke_method (call); + } + + void StartPoiSearch(const uint32_t& poiSearchHandle, const std::string& inputString, const int32_t& sortOption) + { + ::DBus::CallMessage call; + ::DBus::MessageIter wi = call.writer(); + + wi << poiSearchHandle; + wi << inputString; + wi << sortOption; + call.member("StartPoiSearch"); + ::DBus::Message ret = invoke_method (call); + } + + void CancelPoiSearch(const uint32_t& poiSearchHandle) + { + ::DBus::CallMessage call; + ::DBus::MessageIter wi = call.writer(); + + wi << poiSearchHandle; + call.member("CancelPoiSearch"); + ::DBus::Message ret = invoke_method (call); + } + + void StartPoiProximityAlert(const uint32_t& poiSearchHandle, const std::string& inputString, const int32_t& sortOption) + { + ::DBus::CallMessage call; + ::DBus::MessageIter wi = call.writer(); + + wi << poiSearchHandle; + wi << inputString; + wi << sortOption; + call.member("StartPoiProximityAlert"); + ::DBus::Message ret = invoke_method (call); + } + + void CancelPoiProximityAlert(const uint32_t& poiSearchHandle) + { + ::DBus::CallMessage call; + ::DBus::MessageIter wi = call.writer(); + + wi << poiSearchHandle; + call.member("CancelPoiProximityAlert"); + ::DBus::Message ret = invoke_method (call); + } + + void RequestResultList(const uint32_t& poiSearchHandle, const uint16_t& offset, const uint16_t& maxWindowSize, const std::vector< uint32_t >& attributeList, int32_t& statusValue, uint16_t& resultListSize, std::vector< ::DBus::Struct< uint32_t, uint32_t, int32_t, std::vector< ::DBus::Struct< uint32_t, int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > > > > >& resultListWindow) + { + ::DBus::CallMessage call; + ::DBus::MessageIter wi = call.writer(); + + wi << poiSearchHandle; + wi << offset; + wi << maxWindowSize; + wi << attributeList; + call.member("RequestResultList"); + ::DBus::Message ret = invoke_method (call); + ::DBus::MessageIter ri = ret.reader(); + + ri >> statusValue; + ri >> resultListSize; + ri >> resultListWindow; + } + + std::vector< ::DBus::Struct< ::DBus::Struct< uint32_t, std::string, ::DBus::Struct< double, double, double > >, std::vector< uint32_t >, std::vector< ::DBus::Struct< uint32_t, int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > > > > > GetPoiDetails(const std::vector< uint32_t >& id) + { + ::DBus::CallMessage call; + ::DBus::MessageIter wi = call.writer(); + + wi << id; + call.member("GetPoiDetails"); + ::DBus::Message ret = invoke_method (call); + ::DBus::MessageIter ri = ret.reader(); + + std::vector< ::DBus::Struct< ::DBus::Struct< uint32_t, std::string, ::DBus::Struct< double, double, double > >, std::vector< uint32_t >, std::vector< ::DBus::Struct< uint32_t, int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > > > > > argout; + ri >> argout; + return argout; + } + + +public: + + /* signal handlers for this interface + */ + virtual void CategoriesUpdated(const std::vector< ::DBus::Struct< uint32_t, uint16_t > >& poiCategories) = 0; + virtual void PoiStatus(const uint32_t& poiSearchHandle, const int32_t& statusValue) = 0; + virtual void ResultListChanged(const uint32_t& poiSearchHandle, const uint16_t& resultListSize) = 0; + +private: + + /* unmarshalers (to unpack the DBus message before calling the actual signal handler) + */ + void _CategoriesUpdated_stub(const ::DBus::SignalMessage &sig) + { + ::DBus::MessageIter ri = sig.reader(); + + std::vector< ::DBus::Struct< uint32_t, uint16_t > > poiCategories; + ri >> poiCategories; + CategoriesUpdated(poiCategories); + } + void _PoiStatus_stub(const ::DBus::SignalMessage &sig) + { + ::DBus::MessageIter ri = sig.reader(); + + uint32_t poiSearchHandle; + ri >> poiSearchHandle; + int32_t statusValue; + ri >> statusValue; + PoiStatus(poiSearchHandle, statusValue); + } + void _ResultListChanged_stub(const ::DBus::SignalMessage &sig) + { + ::DBus::MessageIter ri = sig.reader(); + + uint32_t poiSearchHandle; + ri >> poiSearchHandle; + uint16_t resultListSize; + ri >> resultListSize; + ResultListChanged(poiSearchHandle, resultListSize); + } +}; + +} } } +#endif //__dbusxx___home_psa_Desktop_genivi_navigation_master_src_navigation_build_dbus_include_poi_service_genivi_poiservice_poisearch_proxy_h__PROXY_MARSHAL_H diff --git a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/positioning-constants.h b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/positioning-constants.h new file mode 100644 index 0000000..64fd839 --- /dev/null +++ b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/dbus-proxies/positioning-constants.h @@ -0,0 +1,61 @@ + +/* This is an automatically generated file, do not edit */ + + + +enum GENIVI_ENHANCEDPOSITIONSERVICE_Constants { + GENIVI_ENHANCEDPOSITIONSERVICE_LATITUDE = 0x00000001, + GENIVI_ENHANCEDPOSITIONSERVICE_LONGITUDE = 0x00000002, + GENIVI_ENHANCEDPOSITIONSERVICE_ALTITUDE = 0x00000004, + GENIVI_ENHANCEDPOSITIONSERVICE_HEADING = 0x00000008, + GENIVI_ENHANCEDPOSITIONSERVICE_SPEED = 0x00000010, + GENIVI_ENHANCEDPOSITIONSERVICE_CLIMB = 0x00000020, + GENIVI_ENHANCEDPOSITIONSERVICE_ROLL_RATE = 0x00000040, + GENIVI_ENHANCEDPOSITIONSERVICE_PITCH_RATE = 0x00000080, + GENIVI_ENHANCEDPOSITIONSERVICE_YAW_RATE = 0x00000100, + GENIVI_ENHANCEDPOSITIONSERVICE_PDOP = 0x00000200, + GENIVI_ENHANCEDPOSITIONSERVICE_HDOP = 0x00000400, + GENIVI_ENHANCEDPOSITIONSERVICE_VDOP = 0x00000800, + GENIVI_ENHANCEDPOSITIONSERVICE_USED_SATELLITES = 0x00001000, + GENIVI_ENHANCEDPOSITIONSERVICE_TRACKED_SATELLITES = 0x00002000, + GENIVI_ENHANCEDPOSITIONSERVICE_VISIBLE_SATELLITES = 0x00004000, + GENIVI_ENHANCEDPOSITIONSERVICE_SIGMA_HPOSITION = 0x00008000, + GENIVI_ENHANCEDPOSITIONSERVICE_SIGMA_ALTITUDE = 0x00010000, + GENIVI_ENHANCEDPOSITIONSERVICE_SIGMA_HEADING = 0x00020000, + GENIVI_ENHANCEDPOSITIONSERVICE_SIGMA_SPEED = 0x00040000, + GENIVI_ENHANCEDPOSITIONSERVICE_SIGMA_CLIMB = 0x00080000, + GENIVI_ENHANCEDPOSITIONSERVICE_GNSS_FIX_STATUS = 0x00100000, + GENIVI_ENHANCEDPOSITIONSERVICE_DR_STATUS = 0x00200000, + GENIVI_ENHANCEDPOSITIONSERVICE_RELIABILTY_INDEX = 0x00400000, + GENIVI_ENHANCEDPOSITIONSERVICE_USED_SATELLITESYSTEMS = 0x00800000, + GENIVI_ENHANCEDPOSITIONSERVICE_YEAR = 0x01000000, + GENIVI_ENHANCEDPOSITIONSERVICE_MONTH = 0x02000000, + GENIVI_ENHANCEDPOSITIONSERVICE_DAY = 0x04000000, + GENIVI_ENHANCEDPOSITIONSERVICE_HOUR = 0x08000000, + GENIVI_ENHANCEDPOSITIONSERVICE_MINUTE = 0x10000000, + GENIVI_ENHANCEDPOSITIONSERVICE_SECOND = 0x20000000, + GENIVI_ENHANCEDPOSITIONSERVICE_MS = 0x40000000, + GENIVI_ENHANCEDPOSITIONSERVICE_TIME_SCALE = 0x80000000, + GENIVI_ENHANCEDPOSITIONSERVICE_LEAP_SECONDS = 0x100000000, + GENIVI_ENHANCEDPOSITIONSERVICE_INVALID = 0x00000000, + GENIVI_ENHANCEDPOSITIONSERVICE_GPS = 0x00000001, + GENIVI_ENHANCEDPOSITIONSERVICE_GLONASS = 0x00000002, + GENIVI_ENHANCEDPOSITIONSERVICE_GALILEO = 0x00000004, + GENIVI_ENHANCEDPOSITIONSERVICE_BEIDOU = 0x00000008, + GENIVI_ENHANCEDPOSITIONSERVICE_COMPASS = 0x00000008, + GENIVI_ENHANCEDPOSITIONSERVICE_GPS_L2 = 0x00000010, + GENIVI_ENHANCEDPOSITIONSERVICE_GPS_L5 = 0x00000020, + GENIVI_ENHANCEDPOSITIONSERVICE_GLONASS_L2 = 0x00000040, + GENIVI_ENHANCEDPOSITIONSERVICE_BEIDOU_B2 = 0x00000080, + GENIVI_ENHANCEDPOSITIONSERVICE_SBAS_WAAS = 0x00010000, + GENIVI_ENHANCEDPOSITIONSERVICE_SBAS_EGNOS = 0x00020000, + GENIVI_ENHANCEDPOSITIONSERVICE_SBAS_MSAS = 0x00040000, + GENIVI_ENHANCEDPOSITIONSERVICE_SBAS_QZSS_SAIF = 0x00080000, + GENIVI_ENHANCEDPOSITIONSERVICE_SBAS_SDCM = 0x00100000, + GENIVI_ENHANCEDPOSITIONSERVICE_SBAS_GAGAN = 0x00200000, + GENIVI_ENHANCEDPOSITIONSERVICE_MAP_MATCHED_FEEDBACK = 0x00000001, + GENIVI_ENHANCEDPOSITIONSERVICE_TEST_FEEDBACK = 0x00000002, + GENIVI_ENHANCEDPOSITIONSERVICE_TIME_SCALE_UTC = 0, + GENIVI_ENHANCEDPOSITIONSERVICE_TIME_SCALE_GPS = 1, +}; +
\ No newline at end of file diff --git a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/package.json b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/package.json index 9fd3d53..363ea2d 100644 --- a/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/package.json +++ b/test/navigation/w3c/socket-based-poc/node-cpp-lbs-modules/package.json @@ -10,7 +10,7 @@ ], "author": "Philippe Colliot <philippe.colliot@mpsa.com>", "contributors": [""], - "main": "./build/Release/NavigationCoreConfigurationWrapper", + "main": "./build/Release/NavigationCoreWrapper", "license": "MPL V.2.0", "devDependencies": { "chai": "~3.5.0", diff --git a/test/navigation/w3c/socket-based-poc/server.js b/test/navigation/w3c/socket-based-poc/server.js index 421d437..02d7391 100644 --- a/test/navigation/w3c/socket-based-poc/server.js +++ b/test/navigation/w3c/socket-based-poc/server.js @@ -1,3 +1,29 @@ +/** +* @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@ +*/ // Requirement of external JS files var resource = require('./js/resource.js'); @@ -16,10 +42,10 @@ var tree = webidl2.parse(file.toString()); //console.log(escodegen.generate(tree)); // Requirements of LBS add-on modules -var navigationCoreConfigurationWrapper = require(resource.generatedNodejsModulePath+'/NavigationCoreConfigurationWrapper'); +var navigationCoreConfigurationWrapper = require(resource.generatedNodejsModulePath+'/NavigationCoreWrapper'); // Create instances -var i_navigationCoreConfiguration = new navigationCoreConfigurationWrapper.NavigationCoreConfigurationWrapper(); +var i_navigationCoreConfiguration = new navigationCoreConfigurationWrapper.NavigationCoreWrapper(); // Create and init server var port = 8080; |