missing files added
authorKevron Rees <kevron_m_rees@linux.intel.com>
Wed, 22 Aug 2012 21:32:33 +0000 (14:32 -0700)
committerMichael Carpenter <malcom2073@gmail.com>
Thu, 23 Aug 2012 09:51:23 +0000 (05:51 -0400)
config
plugins/dbus/properties.cpp [new file with mode: 0644]
plugins/dbus/properties.h [new file with mode: 0644]
plugins/websocketsink/websocketsinkmanager.cpp

diff --git a/config b/config
index 44830c7..bc39085 100644 (file)
--- 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 (file)
index 0000000..e69de29
diff --git a/plugins/dbus/properties.h b/plugins/dbus/properties.h
new file mode 100644 (file)
index 0000000..de7efed
--- /dev/null
@@ -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<VehicleProperty::Property>(&supportedProperties).contains((*itr)))
+                       {
+                               routingEngine->subscribeToProperty((*itr), this);
+
+                       }
+               }
+       }
+};
+
+#endif
index 2828010..9664572 100644 (file)
@@ -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;