From: Kevron Rees Date: Thu, 16 Aug 2012 23:20:22 +0000 (-0700) Subject: missing this X-Git-Tag: submit/release/20120910.223349~98 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2cd643094b570c080e3bd56e6b730d0365d23e45;p=profile%2Fivi%2Fautomotive-message-broker.git missing this --- diff --git a/plugins/examplesink.cpp b/plugins/examplesink.cpp new file mode 100644 index 0000000..589ab9a --- /dev/null +++ b/plugins/examplesink.cpp @@ -0,0 +1,54 @@ +/* + 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 +*/ + + +#include "examplesink.h" +#include "abstractroutingengine.h" +#include "debugout.h" + +extern "C" AbstractSinkManager * create(AbstractRoutingEngine* routingengine) +{ + return new ExampleSinkManager(routingengine); +} + +ExampleSink::ExampleSink(AbstractRoutingEngine* engine): AbstractSink(engine) +{ + routingEngine->subscribeToProperty(VehicleProperty::EngineSpeed, this); + routingEngine->subscribeToProperty(VehicleProperty::VehicleSpeed, this); +} + + +PropertyList ExampleSink::subscriptions() +{ + +} + +void ExampleSink::supportedChanged(PropertyList supportedProperties) +{ + +} + +void ExampleSink::propertyChanged(VehicleProperty::Property property, boost::any value, std::string uuid) +{ + DebugOut()<(value)< + + +class ExampleSink : public AbstractSink +{ + +public: + ExampleSink(AbstractRoutingEngine* engine); + virtual PropertyList subscriptions(); + virtual void supportedChanged(PropertyList supportedProperties); + virtual void propertyChanged(VehicleProperty::Property property, boost::any value, std::string uuid); + virtual std::string uuid(); +}; + +class ExampleSinkManager: public AbstractSinkManager +{ +public: + ExampleSinkManager(AbstractRoutingEngine* engine) + :AbstractSinkManager(engine) + { + new ExampleSink(engine); + } +}; + +#endif // EXAMPLESINK_H