From 672e65e6486b060a63f4f6f2d204177791598382 Mon Sep 17 00:00:00 2001 From: Kevron Rees Date: Wed, 22 Aug 2012 14:32:33 -0700 Subject: [PATCH] missing files added --- config | 2 +- plugins/dbus/properties.cpp | 0 plugins/dbus/properties.h | 48 ++++++++++++++++++++++++++ plugins/websocketsink/websocketsinkmanager.cpp | 2 +- 4 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 plugins/dbus/properties.cpp create mode 100644 plugins/dbus/properties.h diff --git a/config b/config index 44830c7..bc39085 100644 --- a/config +++ b/config @@ -1,5 +1,5 @@ { "sources" : [ "../plugins/examplesourceplugin.so" ], - "sinks": [ "../plugins/examplesinkplugin.so", "../plugins/dbus/dbussinkplugin.so" ,"../plugins/tcpsink/websocketsinkplugin.so" ] + "sinks": [ "../plugins/examplesinkplugin.so", "../plugins/dbus/dbussinkplugin.so" ,"../plugins/websocketsink/websocketsinkplugin.so" ] } diff --git a/plugins/dbus/properties.cpp b/plugins/dbus/properties.cpp new file mode 100644 index 0000000..e69de29 diff --git a/plugins/dbus/properties.h b/plugins/dbus/properties.h new file mode 100644 index 0000000..de7efed --- /dev/null +++ b/plugins/dbus/properties.h @@ -0,0 +1,48 @@ +/* + Copyright (C) 2012 Intel Corporation + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef _PROPERTIES_H_H_H_ +#define _PROPERTIES_H_H_H_ + +#include "dbusplugin.h" +#include "abstractdbusinterface.h" + +class VehicleSpeedProperty: public AbstractDBusInterface, public DBusSink +{ +public: + AccelerationPropertyInterface(AbstractRoutingEngine* re, GDBusConnection* connection) + :AbstractDBusInterface("org.automotive.acceleration","/org/automotive/acceleration", connection), + DBusSink(re) + { + supportedChanged(re->supported()); + } + + void supportedChanged(PropertyList supportedProperties) + { + for(PropertyDBusMap itr = propertyDBusMap.begin(); itr != propertyDBusMap.end(); itr++) + { + if(ListPlusPlus(&supportedProperties).contains((*itr))) + { + routingEngine->subscribeToProperty((*itr), this); + + } + } + } +}; + +#endif diff --git a/plugins/websocketsink/websocketsinkmanager.cpp b/plugins/websocketsink/websocketsinkmanager.cpp index 2828010..9664572 100644 --- a/plugins/websocketsink/websocketsinkmanager.cpp +++ b/plugins/websocketsink/websocketsinkmanager.cpp @@ -41,7 +41,7 @@ WebSocketSinkManager::WebSocketSinkManager(AbstractRoutingEngine* engine):Abstra protocollist[0] = { "http-only", websocket_callback, 0 }; protocollist[1] = { NULL, NULL, 0 }; - int port = 7681; + int port = 23000; const char *interface = "lo"; const char *ssl_cert_path = NULL; const char *ssl_key_path = NULL; -- 2.7.4