this is a api change that breaks several plugins.
authorKevron Rees <kevron_m_rees@linux.intel.com>
Tue, 11 Jun 2013 22:48:42 +0000 (15:48 -0700)
committerKevron Rees <kevron_m_rees@linux.intel.com>
Tue, 11 Jun 2013 22:48:42 +0000 (15:48 -0700)
lib/CMakeLists.txt
lib/abstractpropertytype.h
lib/abstractroutingengine.h
lib/abstractsource.h

index 9379f36..13ee8be 100644 (file)
@@ -1,5 +1,5 @@
-set(amb_sources abstractpropertytype.cpp abstractroutingengine.cpp listplusplus.cpp abstractsink.cpp vehicleproperty.cpp abstractsource.cpp debugout.cpp timestamp.cpp uuidhelper.cpp mappropertytype.hpp)
-set(amb_headers_install abstractpropertytype.h nullptr.h abstractroutingengine.h listplusplus.h abstractsink.h vehicleproperty.h debugout.h abstractsource.h timestamp.h uuidhelper.h mappropertytype.hpp)
+set(amb_sources abstractpropertytype.cpp abstractroutingengine.cpp listplusplus.cpp abstractsink.cpp vehicleproperty.cpp abstractsource.cpp debugout.cpp timestamp.cpp uuidhelper.cpp mappropertytype.hpp propertyinfo.hpp)
+set(amb_headers_install abstractpropertytype.h nullptr.h abstractroutingengine.h listplusplus.h abstractsink.h vehicleproperty.h debugout.h abstractsource.h timestamp.h uuidhelper.h mappropertytype.hpp properyinfo.hpp)
 
 add_library(amb SHARED ${amb_sources})
 
index 5e857be..0fae6d0 100644 (file)
@@ -37,9 +37,9 @@
 namespace Zone {
 enum Type {
        None = 0,
-       Driver = 1,
+       FrontRight = 1,
        FrontMiddle = 1 << 1,
-       Passenger = 1 << 2,
+       FrontLeft = 1 << 2,
        LeftRear = 1 << 3,
        MiddleRear = 1 << 4,
        RightRear = 1 << 5
@@ -53,6 +53,8 @@ public:
 
        AbstractPropertyType(std::string property): name(property), timestamp(-1), sequence(-1), zone(Zone::None), index(0) {}
 
+       ~AbstractPropertyType() { }
+
        virtual std::string toString() const = 0;
 
        virtual void fromString(std::string)= 0;
index 9099181..60633e1 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "vehicleproperty.h"
 #include "abstractpropertytype.h"
+#include "propertyinfo.hpp"
 
 class AbstractSink;
 class AbstractSource;
@@ -202,6 +203,7 @@ public:
        virtual void setSupported(PropertyList supported, AbstractSource* source) = 0;
        virtual void updateSupported(PropertyList added, PropertyList removed) = 0;
        virtual void updateProperty(VehicleProperty::Property property, AbstractPropertyType* value, std::string uuid) = 0;
+       virtual PropertyList supported() = 0;
 
        /// sinks:
        virtual void registerSink(AbstractSink* self) = 0;
@@ -210,8 +212,11 @@ public:
        virtual AsyncRangePropertyReply * getRangePropertyAsync(AsyncRangePropertyRequest request) = 0;
        virtual AsyncPropertyReply * setProperty(AsyncSetPropertyRequest request) = 0;
        virtual void subscribeToProperty(VehicleProperty::Property, AbstractSink* self) = 0;
+       virtual void subscribeToProperty(VehicleProperty::Property, std::string sourceUuidFilter, AbstractSink *self) = 0;
        virtual void unsubscribeToProperty(VehicleProperty::Property, AbstractSink* self) = 0;
-       virtual PropertyList supported() = 0;
+
+       virtual PropertyInfo getPropertyInfo(VehicleProperty::Property, std::string sourceUuid) = 0;
+       virtual std::list<std::string> getSourcesForProperty(VehicleProperty::Property) = 0;
 };
 
 #endif // ABSTRACTROUTINGENGINE_H
index 10ff01b..55824f6 100644 (file)
 #include "vehicleproperty.h"
 #include "abstractroutingengine.h"
 #include "abstractpropertytype.h"
+#include "propertyinfo.hpp"
+
 
-using namespace std;
 
 class AbstractSource;
 
-typedef list<AbstractSource*> SourceList;
+typedef std::list<AbstractSource*> SourceList;
 
 
 
 class AbstractSource: public AbstractSink
 {
+using namespace std;
 
 public:
        enum Operations {
@@ -60,6 +62,8 @@ public:
        virtual PropertyList supported() = 0;
 
        virtual int supportedOperations() = 0;
+
+       PropertyInfo getPropertyInfo(VehicleProperty::Property) = 0;
        
 
 protected: