From: Kevron Rees Date: Wed, 8 Aug 2012 23:53:20 +0000 (-0700) Subject: started core routing engine X-Git-Tag: submit/release/20120910.223349~109 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dd3c64c4b43ae6ed816200053da9c64a5903724a;p=profile%2Fivi%2Fautomotive-message-broker.git started core routing engine --- diff --git a/ambd/CMakeLists.txt b/ambd/CMakeLists.txt index 8310dd2..f7f1808 100644 --- a/ambd/CMakeLists.txt +++ b/ambd/CMakeLists.txt @@ -1,4 +1,4 @@ -add_executable(ambd main.cpp pluginloader.cpp) +add_executable(ambd core.cpp main.cpp pluginloader.cpp) include_directories(${include_dirs} ) target_link_libraries(ambd ${link_libraries}) diff --git a/lib/abstractsource.cpp b/lib/abstractsource.cpp index 4f49968..bd75d0b 100644 --- a/lib/abstractsource.cpp +++ b/lib/abstractsource.cpp @@ -34,3 +34,9 @@ void AbstractSource::setPropertyChangedCb(PropertyChangedSignal propertyChangedC mPropertyChangedCb = propertyChangedCb; } +void AbstractSource::setSupportedChangedCb(SupportedChangedSignal supportedChangedCb) +{ + mSupportedChangedCb = supportedChangedCb; +} + + diff --git a/lib/abstractsource.h b/lib/abstractsource.h index ef29df4..cb7c0f0 100644 --- a/lib/abstractsource.h +++ b/lib/abstractsource.h @@ -31,6 +31,7 @@ using namespace std; class AbstractSource; typedef function PropertyChangedSignal; +typedef function SupportedChangedSignal; typedef list SourceList; @@ -43,6 +44,7 @@ public: void propertyChanged(VehicleProperty::Property property, boost::any value); void setPropertyChangedCb(PropertyChangedSignal propertyChangedCb); + void setSupportedChangedCb(SupportedChangedSignal supportedChangedCb); ///pure virtual methods: @@ -55,6 +57,7 @@ public: private: PropertyChangedSignal mPropertyChangedCb; + SupportedChangedSignal mSupportedChangedCb; }; diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index a9bcf6e..ed50e32 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -7,15 +7,3 @@ add_library(exampleplugin MODULE ${exampleplugin_sources}) set_target_properties(exampleplugin PROPERTIES PREFIX "") target_link_libraries(exampleplugin -lamb -L${CMAKE_CURRENT_BINARY_DIR}/lib ${link_libraries}) -if(use_qtcore) - if(nobdy_compat) - pkg_check_modules(nobdy REQUIRED nobdy) - set(nobdyplugin_headers nobdycompatplugin.h) - set(nobdyplugin_sources nobdycompatplugin.cpp) - qt4_wrap_cpp(nobdy_moc_sources ${nobdyplugin_headers}) - add_library(nobdyplugin MODULE ${nobdyplugin_sources} ${nobdy_moc_sources}) - set_target_properties(nobdyplugin PROPERTIES PREFIX "") - include_directories(${nobdy_INCLUDE_DIRS} ${include_dirs}) - target_link_libraries(nobdyplugin ${nobdy_LIBRARIES} -lamb -L${CMAKE_CURRENT_BINARY_DIR}/lib ${link_libraries}) - endif(nobdy_compat) -endif(use_qtcore) \ No newline at end of file diff --git a/plugins/nobdycompatplugin.cpp b/plugins/nobdycompatplugin.cpp deleted file mode 100644 index 7ea7e93..0000000 --- a/plugins/nobdycompatplugin.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - - Copyright (C) 2012 Kevron Rees - - 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 -*/ - - -#include "propertytypes/vehiclespeed.h" -#include "nobdycompatplugin.h" -#include - -NobdyCompatPlugin::NobdyCompatPlugin(QObject *parent): QObject(parent) -{ - vehicleSpeedProperty = new VehicleSpeedProperty(); - - velocityStream = NobdyStreamFactory::createDefaultStream(VehicleData::Velocity); - engineSpeedStream = NobdyStreamFactory::createDefaultStream(VehicleData::EngineRPM); - - QObject::connect(velocityStream, SIGNAL(changed(QVariant)), this, SLOT(velocityChangedSlot(QVariant))); -} - -void NobdyCompatPlugin::engineSpeedChangedSlot(QVariant value) -{ - -} - -void NobdyCompatPlugin::velocityChangedSlot(QVariant value) -{ - vehicleSpeedProperty->setValue(value.toUInt()); -} - -extern "C" void create() -{ - new NobdyCompatPlugin; -} - - diff --git a/plugins/nobdycompatplugin.cpp~ b/plugins/nobdycompatplugin.cpp~ deleted file mode 100644 index 12a386d..0000000 --- a/plugins/nobdycompatplugin.cpp~ +++ /dev/null @@ -1,50 +0,0 @@ -/* - - Copyright (C) 2012 Kevron Rees - - 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 -*/ - - -#include "propertytypes/vehiclespeed.h" -#include "nobdycompatplugin.h" -#include - -NobdyCompatPlugin::NobdyCompatPlugin(QObject *parent): QObject(parent) -{ - vehicleSpeedProperty = new VehicleSpeedProperty(); - - velocityStream = NobdyStreamFactory::createDefaultStream(VehicleData::Velocity); - engineSpeedStream = NobdyStreamFactory::createDefaultStream(VehicleData::EngineRPM); - - QObject::connect(velocityStream,SIGNAL(changed(QVariant)),this, SLOT(velocityChangedSlot(QVariant))); -} - -void NobdyCompatPlugin::engineSpeedChangedSlot(QVariant value) -{ - -} - -void NobdyCompatPlugin::velocityChangedSlot(QVariant value) -{ - vehicleSpeedProperty->setValue(value.toUInt()); -} - -extern "C" void create() -{ - new NobdyCompatPlugin; -} - - diff --git a/plugins/nobdycompatplugin.h b/plugins/nobdycompatplugin.h deleted file mode 100644 index 22d4010..0000000 --- a/plugins/nobdycompatplugin.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - - Copyright (C) 2012 Kevron Rees - - 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 NOBDYCOMPATPLUGIN_H -#define NOBDYCOMPATPLUGIN_H - -#include - -class VehicleSpeedProperty; - -class NobdyCompatPlugin : public QObject -{ -Q_OBJECT -public: - explicit NobdyCompatPlugin(QObject* parent = 0); - -private slots: - void velocityChangedSlot(QVariant value); - void engineSpeedChangedSlot(QVariant value); - -private: - VehicleSpeedProperty * vehicleSpeedProperty; - NobdyStream* velocityStream; - NobdyStream* engineSpeedStream; - -}; - -#endif // NOBDYCOMPATPLUGIN_H diff --git a/plugins/nobdycompatplugin.h~ b/plugins/nobdycompatplugin.h~ deleted file mode 100644 index 4b78ae9..0000000 --- a/plugins/nobdycompatplugin.h~ +++ /dev/null @@ -1,44 +0,0 @@ -/* - - Copyright (C) 2012 Kevron Rees - - 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 NOBDYCOMPATPLUGIN_H -#define NOBDYCOMPATPLUGIN_H - -#include -#include "propertytypes/vehiclespeed.h" - -class NobdyCompatPlugin : public QObject -{ -Q_OBJECT -public: - explicit NobdyCompatPlugin(QObject* parent = 0); - -private slots: - void velocityChangedSlot(QVariant value); - void engineSpeedChangedSlot(QVariant value); - -private: - VehicleSpeedProperty * vehicleSpeedProperty; - NobdyStream* velocityStream; - NobdyStream* engineSpeedStream; - -}; - -#endif // NOBDYCOMPATPLUGIN_H