1 #include "custompropertyinterface.h"
2 #include "vehicleproperty.h"
3 #include "varianttype.h"
4 #include "listplusplus.h"
6 CustomPropertyInterface::CustomPropertyInterface(VehicleProperty::Property prop, AbstractRoutingEngine *re, GDBusConnection *connection)
7 :DBusSink(prop, re, connection, map<string, string>())
9 PropertyList list = VehicleProperty::customProperties();
11 if(contains(list,prop))
13 AbstractPropertyType* temp = VehicleProperty::getPropertyTypeForPropertyNameValue(prop);
17 throw std::runtime_error("Cannot create custom property: " + prop);
20 GVariant* var = temp->toVariant();
21 std::string signature = g_variant_get_type_string(var);
24 propertyDBusMap.push_back( new VariantType(re, prop, prop, VariantType::ReadWrite));