From 4c5be944a506f64427a25ada714a4a6f64e5ebf3 Mon Sep 17 00:00:00 2001 From: asanoaozora Date: Fri, 16 Sep 2016 17:24:43 +0200 Subject: align DBus xml files by adding error output arguments to some methods --- src/navigation/CMakeLists.txt | 17 +++---- .../genivi_mapviewer_mapviewercontrol.cxx | 30 +++++++----- .../session-plugin/genivi_mapviewer_session.cxx | 17 ++++--- .../genivi_navigationcore_guidance.cxx | 14 ++++-- .../genivi_navigationcore_locationinput.cxx | 18 +++---- .../genivi_navigationcore_mapmatchedposition.cxx | 38 +++++++-------- .../genivi_navigationcore_routing.cxx | 57 ++++++++++++---------- .../genivi_navigationcore_session.cxx | 17 ++++--- 8 files changed, 111 insertions(+), 97 deletions(-) (limited to 'src') diff --git a/src/navigation/CMakeLists.txt b/src/navigation/CMakeLists.txt index da2a773..bdc00ea 100644 --- a/src/navigation/CMakeLists.txt +++ b/src/navigation/CMakeLists.txt @@ -73,12 +73,6 @@ set(DBUS_GENERATED_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/dbus-include") set(PRELOAD_CACHE_FOR_PLUGINS "${NAVIT_CONFIG_H_DIR}/cmake_plugin_settings.txt") get_directory_property(hasParent PARENT_DIRECTORY) -if(hasParent) -set(API_DIR_PARENT_SCOPE ${API_DIR} PARENT_SCOPE) -set(POSITIONING_API_DIR_PARENT_SCOPE ${CMAKE_CURRENT_SOURCE_DIR}/positioning/enhanced-position-service/dbus/api PARENT_SCOPE) -set(DBUS_GENERATED_INCLUDE_DIR_PARENT_SCOPE ${DBUS_GENERATED_INCLUDE_DIR} PARENT_SCOPE) -set(DBUS_GENERATED_INCLUDE_DIR_POSITIONING_PARENT_SCOPE ${DBUS_GENERATED_INCLUDE_DIR_POSITIONING} PARENT_SCOPE) -endif(hasParent) if(NOT ${YOCTO_CONFIG}) # for enhanced position service @@ -87,7 +81,7 @@ if(NOT ${YOCTO_CONFIG}) endif() set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin) - if (WITH_PLUGIN_MIGRATION) + if (${WITH_PLUGIN_MIGRATION}) set(FRANCA_POSITIONING_DIR "${CMAKE_CURRENT_SOURCE_DIR}/positioning/enhanced-position-service/franca/api") execute_process(COMMAND uname -i OUTPUT_VARIABLE OS_VERSION) if("${OS_VERSION}" MATCHES "i686") @@ -96,9 +90,14 @@ if(NOT ${YOCTO_CONFIG}) set(OS_VERSION "x86_64") endif() set(WITH_FRANCA_DBUS_INTERFACE "ON" CACHE INTERNAL "") + set(WITH_DBUS_INTERFACE "OFF" CACHE INTERNAL "") set(COMMONAPI_TOOL_GENERATOR "${COMMONAPI_TOOL_DIR}/org.genivi.commonapi.core.cli.product/target/products/org.genivi.commonapi.core.cli.product/linux/gtk/${OS_VERSION}/commonapi-generator-linux-${OS_VERSION}" CACHE INTERNAL "") set(COMMONAPI_DBUS_TOOL_GENERATOR "${COMMONAPI_DBUS_TOOL_DIR}/org.genivi.commonapi.dbus.cli.product/target/products/org.genivi.commonapi.dbus.cli.product/linux/gtk/${OS_VERSION}/commonapi-dbus-generator-linux-${OS_VERSION}" CACHE INTERNAL "") - set(COMMONAPI_GEN_DIR_POSITIONING "${CMAKE_CURRENT_BINARY_DIR}/enhanced-position-service/franca/api") + if(hasParent) + set(COMMONAPI_GEN_DIR_POSITIONING "${COMMONAPI_GEN_DIR}" PARENT_SCOPE) + else() + set(COMMONAPI_GEN_DIR_POSITIONING "${CMAKE_CURRENT_BINARY_DIR}/enhanced-position-service/franca/api") + endif(hasParent) endif() add_subdirectory(positioning) unset(CMAKE_LIBRARY_OUTPUT_DIRECTORY) @@ -125,7 +124,7 @@ endif() include(${NAVIT_CMAKE_DIR}/navit_macros.cmake) -if (WITH_PLUGIN_MIGRATION) +if (${WITH_PLUGIN_MIGRATION}) # generates the CommonAPI templates from the Franca files set(COMMONAPI_GEN_DIR "${CMAKE_CURRENT_BINARY_DIR}/franca/src-gen") # for hmi and navigation diff --git a/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx b/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx index 58a2967..ae407e2 100644 --- a/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx +++ b/src/navigation/map-viewer/mapviewercontrol-plugin/genivi_mapviewer_mapviewercontrol.cxx @@ -81,7 +81,7 @@ enum { static DBus::Glib::BusDispatcher dispatchers[CONNECTION_AMOUNT]; static DBus::Connection *conns[CONNECTION_AMOUNT]; -static int32_t navigationcore_session=-1; +static uint32_t navigationcore_session=-1; static double double_variant(DBus::Variant variant); class MapViewerControl; @@ -301,7 +301,9 @@ position_update(MapMatchedPosition *pos, struct vehicle *v) valuesToReturn.push_back(GENIVI_NAVIGATIONCORE_SPEED); valuesToReturn.push_back(GENIVI_NAVIGATIONCORE_HEADING); - std::map< DBusCommonAPIEnumeration, DBusCommonAPIVariant> map=pos->GetPosition(valuesToReturn); + int32_t error; + std::map< DBusCommonAPIEnumeration, DBusCommonAPIVariant> map; + pos->GetPosition(valuesToReturn,error,map); if (map.find(GENIVI_NAVIGATIONCORE_SPEED) != map.end()) { struct attr position_speed={attr_position_speed}; double speed; @@ -338,23 +340,23 @@ class MapViewerControl { } - uint32_t - CreateMapViewInstance(const uint32_t& sessionHandle, const ::DBus::Struct< uint16_t, uint16_t >& mapViewSize, const DBusCommonAPIEnumeration& mapViewType) + void + CreateMapViewInstance(const uint32_t& sessionHandle, const ::DBus::Struct< uint16_t, uint16_t >& mapViewSize, const DBusCommonAPIEnumeration& mapViewType, int32_t& error, uint32_t& mapViewInstanceHandle) { dbg(lvl_debug,"enter\n"); if (mapViewType != GENIVI_MAPVIEWER_MAIN_MAP) throw DBus::ErrorInvalidArgs("Unsupported mapViewType"); - uint32_t MapViewInstanceHandle=1; - while (handles[MapViewInstanceHandle]) { - MapViewInstanceHandle++; - if (MapViewInstanceHandle == 256) + mapViewInstanceHandle=1; + while (handles[mapViewInstanceHandle]) { + mapViewInstanceHandle++; + if (mapViewInstanceHandle == 256) throw DBus::ErrorLimitsExceeded("Out of mapviewinstance handles"); } - handles[MapViewInstanceHandle]=new MapViewerControlObj(this, MapViewInstanceHandle, mapViewSize); - return MapViewInstanceHandle; - } + handles[mapViewInstanceHandle]=new MapViewerControlObj(this, mapViewInstanceHandle, mapViewSize); + error=0; //not used + } - void + int32_t ReleaseMapViewInstance(const uint32_t& SessionHandle, const uint32_t& MapViewInstanceHandle) { MapViewerControlObj *obj=handles[MapViewInstanceHandle]; @@ -362,6 +364,7 @@ class MapViewerControl throw DBus::ErrorInvalidArgs("Invalid mapviewinstance handle"); delete(obj); handles[MapViewInstanceHandle]=NULL; + return(0); //not implemented yet } void @@ -1341,7 +1344,8 @@ MapViewerControlObj::DisplayRoute(uint32_t SessionHandle, uint32_t RouteHandle, HideRoute(SessionHandle, RouteHandle); if (navigationcore_session == -1) { NavigationCoreSession session(*conns[NAVIGATIONCORE_SESSION_CONNECTION]); - navigationcore_session=session.CreateSession("MapViewerControl"); + int32_t error; + session.CreateSession("MapViewerControl",error,navigationcore_session); } DisplayedRoute *route=new DisplayedRoute(this,navigationcore_session,RouteHandle,m_mapset); route->Show(); diff --git a/src/navigation/map-viewer/session-plugin/genivi_mapviewer_session.cxx b/src/navigation/map-viewer/session-plugin/genivi_mapviewer_session.cxx index fd1dcc3..2c3bd97 100644 --- a/src/navigation/map-viewer/session-plugin/genivi_mapviewer_session.cxx +++ b/src/navigation/map-viewer/session-plugin/genivi_mapviewer_session.cxx @@ -68,17 +68,17 @@ class Session return Version; } - uint32_t CreateSession(const std::string &client) + void CreateSession(const std::string& client, int32_t& error, uint32_t& sessionHandle) { dbg(lvl_debug,"enter\n"); - uint32_t SessionHandle=1; - while (handles[SessionHandle]) { - SessionHandle++; - if (SessionHandle == 256) + sessionHandle=1; + while (handles[sessionHandle]) { + sessionHandle++; + if (sessionHandle == 256) throw DBus::Error("org.genivi.mapviewer.Session.Error.NoMoreSessionHandles","Out of session handles"); } - handles[SessionHandle]=new std::string(client); - return SessionHandle; + handles[sessionHandle]=new std::string(client); + error=0; //not implemented yet } DBusCommonAPIEnumeration GetSessionStatus(const uint32_t& SessionHandle) @@ -89,7 +89,7 @@ class Session return GENIVI_MAPVIEWER_NOT_AVAILABLE; } - void DeleteSession(const uint32_t& SessionHandle) + int32_t DeleteSession(const uint32_t& SessionHandle) { dbg(lvl_debug,"enter\n"); if (!handles[SessionHandle]) @@ -97,6 +97,7 @@ class Session delete(handles[SessionHandle]); handles[SessionHandle]=NULL; SessionDeleted(SessionHandle); + return(0); //not implemented yet } std::vector< ::DBus::Struct< uint32_t, std::string > > diff --git a/src/navigation/navigation-core/guidance-plugin/genivi_navigationcore_guidance.cxx b/src/navigation/navigation-core/guidance-plugin/genivi_navigationcore_guidance.cxx index c70e1fb..d653a14 100644 --- a/src/navigation/navigation-core/guidance-plugin/genivi_navigationcore_guidance.cxx +++ b/src/navigation/navigation-core/guidance-plugin/genivi_navigationcore_guidance.cxx @@ -330,7 +330,7 @@ class Guidance guidance->GetGuidanceDetails(voiceGuidance, vehicleOnTheRoad, isDestinationReached, maneuver); } - void + int32_t PlayVoiceManeuver() { if (!guidance) { @@ -338,6 +338,7 @@ class Guidance throw DBus::ErrorFailed("no guidance active"); } guidance->PlayVoiceManeuver(); + return(0); //not implemented yet } void @@ -347,14 +348,15 @@ class Guidance } void - GetManeuversList(const uint16_t& requestedNumberOfManeuvers, const uint32_t& maneuverOffset, uint16_t& numberOfManeuvers, std::vector< ::DBus::Struct< std::string, std::string, uint16_t, int32_t, uint32_t, std::vector< ::DBus::Struct< uint32_t, uint32_t, int32_t, int32_t, std::map< int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > > > > > >& maneuversList) + GetManeuversList(const uint16_t& requestedNumberOfManeuvers, const uint32_t& maneuverOffset, int32_t& error, uint16_t& numberOfManeuvers, std::vector< ::DBus::Struct< std::string, std::string, uint16_t, int32_t, uint32_t, std::vector< ::DBus::Struct< uint32_t, uint32_t, int32_t, int32_t, std::map< int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > > > > > >& maneuversList) { if (!guidance) { dbg(lvl_debug,"no guidance active\n"); throw DBus::ErrorFailed("no guidance active"); } guidance->GetManeuversList(requestedNumberOfManeuvers, maneuverOffset, numberOfManeuvers, maneuversList); - } + error=0; //not used + } void SetRouteCalculationMode(const uint32_t& sessionHandle, const int32_t& routeCalculationMode) @@ -362,10 +364,11 @@ class Guidance throw DBus::ErrorNotSupported("Not yet supported"); } - void + int32_t SkipNextManeuver(const uint32_t& sessionHandle) { throw DBus::ErrorNotSupported("Not yet supported"); + return(0); //not implemented yet } void @@ -379,10 +382,11 @@ class Guidance } } - void + int32_t SetVoiceGuidanceSettings(const int32_t& promptMode) { guidance->SetVoiceGuidanceSettings(promptMode); + return(0); //not implemented yet } int32_t diff --git a/src/navigation/navigation-core/locationinput-plugin/genivi_navigationcore_locationinput.cxx b/src/navigation/navigation-core/locationinput-plugin/genivi_navigationcore_locationinput.cxx index 213fea0..82b5aab 100644 --- a/src/navigation/navigation-core/locationinput-plugin/genivi_navigationcore_locationinput.cxx +++ b/src/navigation/navigation-core/locationinput-plugin/genivi_navigationcore_locationinput.cxx @@ -100,21 +100,20 @@ class LocationInput { } - uint32_t CreateLocationInput(const uint32_t& SessionHandle) + void CreateLocationInput(const uint32_t& sessionHandle, int32_t& error, uint32_t& locationInputHandle) { - uint32_t LocationInputHandle; dbg(lvl_debug,"enter\n"); - LocationInputHandle=1; - while (handles[LocationInputHandle]) { - LocationInputHandle++; - if (LocationInputHandle == 256) + locationInputHandle=1; + while (handles[locationInputHandle]) { + locationInputHandle++; + if (locationInputHandle == 256) throw DBus::ErrorLimitsExceeded("Out of location handles"); } - handles[LocationInputHandle]=new LocationInputObj(this, LocationInputHandle); - return LocationInputHandle; + handles[locationInputHandle]=new LocationInputObj(this, locationInputHandle); + error=0; //not implemented yet } - void DeleteLocationInput(const uint32_t& SessionHandle, const uint32_t& LocationInputHandle) + int32_t DeleteLocationInput(const uint32_t& SessionHandle, const uint32_t& LocationInputHandle) { dbg(lvl_debug,"enter\n"); LocationInputObj *obj=handles[LocationInputHandle]; @@ -122,6 +121,7 @@ class LocationInput throw DBus::ErrorInvalidArgs("location handle invalid"); delete(obj); handles[LocationInputHandle]=NULL; + return(0); //not implemented yet } std::vector< int32_t > GetSupportedAddressAttributes() diff --git a/src/navigation/navigation-core/mapmatchedposition-plugin/genivi_navigationcore_mapmatchedposition.cxx b/src/navigation/navigation-core/mapmatchedposition-plugin/genivi_navigationcore_mapmatchedposition.cxx index 9990ff2..bef9760 100644 --- a/src/navigation/navigation-core/mapmatchedposition-plugin/genivi_navigationcore_mapmatchedposition.cxx +++ b/src/navigation/navigation-core/mapmatchedposition-plugin/genivi_navigationcore_mapmatchedposition.cxx @@ -154,47 +154,45 @@ class MapMatchedPosition } #endif - std::map< int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > > - GetPosition(const std::vector< int32_t >& valuesToReturn) - { + void + GetPosition(const std::vector< int32_t >& valuesToReturn, int32_t& error, std::map< int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > >& position) + { dbg(lvl_debug,"enter\n"); - std::map< int32_t, DBusCommonAPIVariant >map; struct attr attr; for (int i = 0 ; i < valuesToReturn.size() ; i++) { switch (valuesToReturn[i]) { case GENIVI_NAVIGATIONCORE_LATITUDE: if (tracking_get_attr(tracking, attr_position_coord_geo, &attr, NULL)) - map[GENIVI_NAVIGATIONCORE_LATITUDE]._2=variant_double(attr.u.coord_geo->lat); + position[GENIVI_NAVIGATIONCORE_LATITUDE]._2=variant_double(attr.u.coord_geo->lat); break; case GENIVI_NAVIGATIONCORE_LONGITUDE: if (tracking_get_attr(tracking, attr_position_coord_geo, &attr, NULL)) - map[GENIVI_NAVIGATIONCORE_LONGITUDE]._2=variant_double(attr.u.coord_geo->lng); + position[GENIVI_NAVIGATIONCORE_LONGITUDE]._2=variant_double(attr.u.coord_geo->lng); break; case GENIVI_NAVIGATIONCORE_SPEED: if (tracking_get_attr(tracking, attr_position_speed, &attr, NULL)) - map[GENIVI_NAVIGATIONCORE_SPEED]._2=variant_double(*attr.u.numd); + position[GENIVI_NAVIGATIONCORE_SPEED]._2=variant_double(*attr.u.numd); break; case GENIVI_NAVIGATIONCORE_HEADING: if (tracking_get_attr(tracking, attr_position_direction, &attr, NULL)) - map[GENIVI_NAVIGATIONCORE_HEADING]._2=variant_double(*attr.u.numd); + position[GENIVI_NAVIGATIONCORE_HEADING]._2=variant_double(*attr.u.numd); break; } } - return map; + error=0; //not implemented yet } - std::map< int32_t, DBusCommonAPIVariant > - GetAddress(const std::vector< int32_t >& valuesToReturn) - { - std::map< int32_t, DBusCommonAPIVariant >ret; + void + GetCurrentAddress(const std::vector< int32_t >& valuesToReturn, int32_t& error, std::map< int32_t, ::DBus::Struct< uint8_t, ::DBus::Variant > >& address) + { std::vector< int32_t >::const_iterator it; - for (it = valuesToReturn.begin(); it < valuesToReturn.end(); it++) { - if (*it == GENIVI_NAVIGATIONCORE_STREET && street_name) { - ret[*it]._2=variant_string(street_name); - } - } - return ret; - } + for (it = valuesToReturn.begin(); it < valuesToReturn.end(); it++) { + if (*it == GENIVI_NAVIGATIONCORE_STREET && street_name) { + address[*it]._2=variant_string(street_name); + } + } + error=0; //not implemented yet + } std::map< int32_t, DBusCommonAPIVariant > GetPositionOnSegment(const std::vector< int32_t >& valuesToReturn) diff --git a/src/navigation/navigation-core/routing-plugin/genivi_navigationcore_routing.cxx b/src/navigation/navigation-core/routing-plugin/genivi_navigationcore_routing.cxx index 68bc969..60aa611 100644 --- a/src/navigation/navigation-core/routing-plugin/genivi_navigationcore_routing.cxx +++ b/src/navigation/navigation-core/routing-plugin/genivi_navigationcore_routing.cxx @@ -139,21 +139,21 @@ class Routing { } - uint32_t - CreateRoute(const uint32_t& SessionHandle) - { - dbg(lvl_debug,"enter\n"); - uint32_t RouteHandle=1; - while (handles[RouteHandle]) { - RouteHandle++; - if (RouteHandle == 256) + void + CreateRoute(const uint32_t& sessionHandle, int32_t& error, uint32_t& routeHandle) + { + dbg(lvl_debug,"enter\n"); + routeHandle=1; + while (handles[routeHandle]) { + routeHandle++; + if (routeHandle == 256) throw DBus::ErrorLimitsExceeded("Out of route handles"); } - handles[RouteHandle]=new RoutingObj(this, SessionHandle, RouteHandle); - return RouteHandle; + handles[routeHandle]=new RoutingObj(this, sessionHandle, routeHandle); + error=0; //not implemented yet } - void + int32_t DeleteRoute(const uint32_t& SessionHandle, const uint32_t& RouteHandle) { RoutingObj *obj=handles[RouteHandle]; @@ -162,16 +162,18 @@ class Routing delete(obj); handles[RouteHandle]=NULL; RouteDeleted(RouteHandle); + return(0); //not implemented yet } - void + int32_t SetCostModel(const uint32_t& SessionHandle, const uint32_t& RouteHandle, const DBusCommonAPIEnumeration& CostModel) { RoutingObj *obj=handles[RouteHandle]; if (!obj) throw DBus::ErrorInvalidArgs("Route handle invalid"); obj->SetCostModel(SessionHandle, CostModel); - } + return(0); //not implemented yet + } DBusCommonAPIEnumeration GetCostModel(const uint32_t& RouteHandle) @@ -195,7 +197,7 @@ class Routing return CostModels; } - void + int32_t SetWaypoints(const uint32_t& SessionHandle , const uint32_t& RouteHandle , const bool& StartFromCurrentPosition , const std::vector< std::map< DBusCommonAPIEnumeration, DBusCommonAPIVariant > >& Waypoints) { dbg(lvl_debug,"enter\n"); @@ -203,7 +205,8 @@ class Routing if (!obj) throw DBus::ErrorInvalidArgs("Route handle invalid"); obj->SetWaypoints(SessionHandle, StartFromCurrentPosition, Waypoints); - } + return(0); //not implemented yet + } void GetWaypoints(const uint32_t& RouteHandle , bool& StartFromCurrentPosition , std::vector< std::map< DBusCommonAPIEnumeration, DBusCommonAPIVariant > >& Waypoints) @@ -215,7 +218,7 @@ class Routing obj->GetWaypoints(StartFromCurrentPosition, Waypoints); } - void + int32_t CalculateRoute(const uint32_t& SessionHandle , const uint32_t& RouteHandle ) { dbg(lvl_debug,"enter\n"); @@ -223,7 +226,8 @@ class Routing if (!obj) throw DBus::ErrorInvalidArgs("Route handle invalid"); obj->CalculateRoute(SessionHandle); - } + return(0); //not implemented yet + } void GetRouteSegments(const uint32_t& routeHandle, const int16_t& detailLevel, const std::vector< DBusCommonAPIEnumeration >& valuesToReturn, const uint32_t& numberOfSegments, const uint32_t& offset, uint32_t& totalNumberOfSegments, std::vector< std::map< DBusCommonAPIEnumeration, DBusCommonAPIVariant > >& routeSegments) @@ -245,14 +249,15 @@ class Routing return Version; } - void + int32_t SetRoutePreferences(const uint32_t& sessionHandle, const uint32_t& routeHandle, const std::string& country, const std::vector< ::DBus::Struct< DBusCommonAPIEnumeration, DBusCommonAPIEnumeration > >& roadPreferenceList, const std::vector< ::DBus::Struct< DBusCommonAPIEnumeration, DBusCommonAPIEnumeration > >& conditionPreferenceList) { RoutingObj *obj=handles[routeHandle]; if (!obj) throw DBus::ErrorInvalidArgs("Route handle invalid"); obj->SetRoutePreferences(sessionHandle, country, roadPreferenceList); - } + return(0); //not implemented yet + } void GetRoutePreferences(const uint32_t& routeHandle, const std::string& country, std::vector< ::DBus::Struct< DBusCommonAPIEnumeration, DBusCommonAPIEnumeration > >& roadPreferenceList, std::vector< ::DBus::Struct< DBusCommonAPIEnumeration, DBusCommonAPIEnumeration > >& conditionPreferenceList) @@ -306,11 +311,12 @@ class Routing throw DBus::ErrorNotSupported("Not yet supported"); } - void + int32_t SetTransportationMeans(const uint32_t& sessionHandle, const uint32_t& routeHandle, const std::vector< int32_t >& transportationMeansList) { throw DBus::ErrorNotSupported("Not yet supported"); - } + return(0); //not implemented yet + } std::vector< DBusCommonAPIEnumeration > GetTransportationMeans(const uint32_t& routeHandle) @@ -324,11 +330,12 @@ class Routing throw DBus::ErrorNotSupported("Not yet supported"); } - void + int32_t SetExcludedAreas(const uint32_t& sessionHandle, const uint32_t& routeHandle, const std::vector< std::vector< ::DBus::Struct< double, double > > >& excludedAreas) { throw DBus::ErrorNotSupported("Not yet supported"); - } + return(0); //not implemented yet + } std::vector< std::vector< ::DBus::Struct< double, double > > > GetExcludedAreas(const uint32_t& routeHandle) @@ -346,8 +353,8 @@ class Routing RouteCalculationCancelled(routeHandle); } - std::vector< uint32_t > - CalculateRoutes(const uint32_t& sessionHandle, const std::vector< uint32_t >& calculatedRoutesList) + void + CalculateRoutes(const uint32_t& sessionHandle, const std::vector< uint32_t >& calculatedRoutesList, int32_t& error, std::vector< uint32_t >& alternativeRoutesList) { throw DBus::ErrorNotSupported("Not yet supported"); } diff --git a/src/navigation/navigation-core/session-plugin/genivi_navigationcore_session.cxx b/src/navigation/navigation-core/session-plugin/genivi_navigationcore_session.cxx index 57a52c4..60e761e 100644 --- a/src/navigation/navigation-core/session-plugin/genivi_navigationcore_session.cxx +++ b/src/navigation/navigation-core/session-plugin/genivi_navigationcore_session.cxx @@ -68,17 +68,17 @@ class Session return Version; } - uint32_t CreateSession(const std::string &client) + void CreateSession(const std::string& client, int32_t& error, uint32_t& sessionHandle) { dbg(lvl_debug,"enter\n"); - uint32_t SessionHandle=1; - while (handles[SessionHandle]) { - SessionHandle++; - if (SessionHandle == 256) + sessionHandle=1; + while (handles[sessionHandle]) { + sessionHandle++; + if (sessionHandle == 256) throw DBus::Error("org.genivi.navigationcore.Session.Error.NoMoreSessionHandles","Out of session handles"); } - handles[SessionHandle]=new std::string(client); - return SessionHandle; + handles[sessionHandle]=new std::string(client); + error=0; //not implemented yet } DBusCommonAPIEnumeration GetSessionStatus(const uint32_t& SessionHandle) @@ -89,7 +89,7 @@ class Session return GENIVI_NAVIGATIONCORE_NOT_AVAILABLE; } - void DeleteSession(const uint32_t& SessionHandle) + int32_t DeleteSession(const uint32_t& SessionHandle) { dbg(lvl_debug,"enter\n"); if (!handles[SessionHandle]) @@ -97,6 +97,7 @@ class Session delete(handles[SessionHandle]); handles[SessionHandle]=NULL; SessionDeleted(SessionHandle); + return(0); //not implemented yet } std::vector< ::DBus::Struct< uint32_t, std::string > > -- cgit v1.2.1