-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})
mPropertyChangedCb = propertyChangedCb;
}
+void AbstractSource::setSupportedChangedCb(SupportedChangedSignal supportedChangedCb)
+{
+ mSupportedChangedCb = supportedChangedCb;
+}
+
+
class AbstractSource;
typedef function<void (VehicleProperty::Property, boost::any)> PropertyChangedSignal;
+typedef function<void (PropertyList)> SupportedChangedSignal;
typedef list<AbstractSource*> SourceList;
void propertyChanged(VehicleProperty::Property property, boost::any value);
void setPropertyChangedCb(PropertyChangedSignal propertyChangedCb);
+ void setSupportedChangedCb(SupportedChangedSignal supportedChangedCb);
///pure virtual methods:
private:
PropertyChangedSignal mPropertyChangedCb;
+ SupportedChangedSignal mSupportedChangedCb;
};
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
+++ /dev/null
-/*
- <one line to give the library's name and an idea of what it does.>
- Copyright (C) 2012 Kevron Rees <email>
-
- 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 <QObject>
-
-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;
-}
-
-
+++ /dev/null
-/*
- <one line to give the library's name and an idea of what it does.>
- Copyright (C) 2012 Kevron Rees <email>
-
- 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 <QObject>
-
-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;
-}
-
-
+++ /dev/null
-/*
- <one line to give the library's name and an idea of what it does.>
- Copyright (C) 2012 Kevron Rees <email>
-
- 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 <nobdystream.h>
-
-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
+++ /dev/null
-/*
- <one line to give the library's name and an idea of what it does.>
- Copyright (C) 2012 Kevron Rees <email>
-
- 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 <nobdystream.h>
-#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