find_package(Boost REQUIRED)
-pkg_check_modules(glib REQUIRED glib-2.0)
-pkg_check_modules(json REQUIRED json-glib-1.0)
+
+pkg_check_modules(glib REQUIRED glib-2.0 gobject-2.0)
+pkg_check_modules(json REQUIRED json)
+
add_definitions(-std=c++0x)
add_definitions(-DDBusServiceName="org.automotive.message.broker")
include_directories( ${include_dirs} ${uuid_INCLUDE_DIR})
-target_link_libraries(amb ${libtool_LIBRARY} ${glib_LIBRARIES} ${gio_LIBRARIES} ${uuid_LIBRARY})
+target_link_libraries(amb ${libtool_LIBRARY} ${glib_LIBRARIES} ${gio_LIBRARIES} ${uuid_LIBRARY} ${json_LIBRARY})
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/automotive-message-broker.pc.in ${CMAKE_CURRENT_BINARY_DIR}/automotive-message-broker.pc @ONLY)
{
json_object *dataobject = json_object_object_get(rootobject,"data");
- json_object *valueobject = json_object_object_get(rootobject,"value");
- json_object *timestampobject = json_object_object_get(rootobject,"timestamp");
- json_object *sequenceobject= json_object_object_get(rootobject,"sequence");
+ json_object *valueobject = json_object_object_get(dataobject,"value");
+ json_object *timestampobject = json_object_object_get(dataobject,"timestamp");
+ json_object *sequenceobject= json_object_object_get(dataobject,"sequence");
string value = string(json_object_get_string(valueobject));
string timestamp = string(json_object_get_string(timestampobject));
json_object *arrayobj = (json_object*)array_list_get_idx(dataarray,i);
props.push_back(string(json_object_get_string(arrayobj)));
}
- array_list_free(dataarray);
+ //array_list_free(dataarray);
}
else
{
propertylist.push_back(type);
//props.push_back(string(json_object_get_string(arrayobj)));
}
- array_list_free(dataarray);
+ //array_list_free(dataarray);
if (source->uuidRangedReplyMap.find(id) != source->uuidRangedReplyMap.end())
{
source->uuidRangedReplyMap[id]->values = propertylist;