diff options
10 files changed, 67 insertions, 45 deletions
diff --git a/src/appMain/sdl_preloaded_pt.json b/src/appMain/sdl_preloaded_pt.json index 06b9c3caa4..8f006426f9 100644 --- a/src/appMain/sdl_preloaded_pt.json +++ b/src/appMain/sdl_preloaded_pt.json @@ -539,8 +539,8 @@ }
}
},
- "CloudApp":{
- "rpcs":{
+ "CloudAppStore": {
+ "rpcs": {
"SetCloudAppProperties":{
"hmi_levels":["BACKGROUND",
"FULL",
@@ -550,7 +550,11 @@ "hmi_levels":["BACKGROUND",
"FULL",
"LIMITED"]
- },
+ }
+ }
+ },
+ "CloudApp": {
+ "rpcs": {
"GetVehicleData": {
"hmi_levels": ["BACKGROUND",
"FULL",
@@ -585,9 +589,9 @@ }
}
},
- "AppServiceProducer":{
- "rpcs":{
- "PublishAppService":{
+ "AppServiceProvider": {
+ "rpcs": {
+ "PublishAppService": {
"hmi_levels": [
"FULL",
"LIMITED",
diff --git a/src/components/application_manager/include/application_manager/event_engine/event.h b/src/components/application_manager/include/application_manager/event_engine/event.h index cfd6e95693..14595cd293 100644 --- a/src/components/application_manager/include/application_manager/event_engine/event.h +++ b/src/components/application_manager/include/application_manager/event_engine/event.h @@ -131,9 +131,9 @@ int32_t Event::smart_object_function_id() const { } int32_t Event::smart_object_correlation_id() const { - return response_so_.getElement(strings::params) - .getElement(strings::correlation_id) - .asInt(); + return static_cast<int32_t>(response_so_.getElement(strings::params) + .getElement(strings::correlation_id) + .asInt()); } int32_t Event::smart_object_type() const { @@ -223,21 +223,21 @@ const smart_objects::SmartObject& MobileEvent::smart_object() const { } int32_t MobileEvent::smart_object_function_id() const { - return response_so_.getElement(strings::params) - .getElement(strings::function_id) - .asInt(); + return static_cast<int32_t>(response_so_.getElement(strings::params) + .getElement(strings::function_id) + .asInt()); } int32_t MobileEvent::smart_object_correlation_id() const { - return response_so_.getElement(strings::params) - .getElement(strings::correlation_id) - .asInt(); + return static_cast<int32_t>(response_so_.getElement(strings::params) + .getElement(strings::correlation_id) + .asInt()); } int32_t MobileEvent::smart_object_type() const { - return response_so_.getElement(strings::params) - .getElement(strings::message_type) - .asInt(); + return static_cast<int32_t>(response_so_.getElement(strings::params) + .getElement(strings::message_type) + .asInt()); } } // namespace event_engine diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc index 8a8671c167..51c10f6cc5 100644 --- a/src/components/application_manager/src/application_manager_impl.cc +++ b/src/components/application_manager/src/application_manager_impl.cc @@ -2942,9 +2942,9 @@ void ApplicationManagerImpl::UnregisterApplication( auto it_app = applications_.begin(); while (applications_.end() != it_app) { if (app_id == (*it_app)->app_id()) { - connection_handler().GetDeviceID((*it_app)->mac_address(), &handle); app_to_remove = *it_app; applications_.erase(it_app++); + break; } else { ++it_app; } @@ -2968,15 +2968,23 @@ void ApplicationManagerImpl::UnregisterApplication( (hmi_capabilities_->get_hmi_language_handler()) .OnUnregisterApplication(app_id); - AppV4DevicePredicate finder(handle); - ApplicationSharedPtr app = FindApp(applications(), finder); - if (!app) { - LOG4CXX_DEBUG( - logger_, "There is no more SDL4 apps with device handle: " << handle); - RemoveAppsWaitingForRegistration(handle); - RefreshCloudAppInformation(); - SendUpdateAppList(); + if (connection_handler().GetDeviceID(app_to_remove->mac_address(), + &handle)) { + AppV4DevicePredicate finder(handle); + ApplicationSharedPtr app = FindApp(applications(), finder); + if (!app) { + LOG4CXX_DEBUG( + logger_, + "There is no more SDL4 apps with device handle: " << handle); + + RemoveAppsWaitingForRegistration(handle); + RefreshCloudAppInformation(); + SendUpdateAppList(); + } else if (app_to_remove->is_cloud_app()) { + RefreshCloudAppInformation(); + SendUpdateAppList(); + } } } diff --git a/src/components/include/test/transport_manager/mock_transport_manager.h b/src/components/include/test/transport_manager/mock_transport_manager.h index 0581d4f375..2ef79f930c 100644 --- a/src/components/include/test/transport_manager/mock_transport_manager.h +++ b/src/components/include/test/transport_manager/mock_transport_manager.h @@ -61,7 +61,7 @@ class MockTransportManager : public ::transport_manager::TransportManager, MOCK_METHOD0(SearchDevices, int()); MOCK_METHOD1( AddCloudDevice, - void(const transport_manager::transport_adapter::CloudAppProperties)); + void(const transport_manager::transport_adapter::CloudAppProperties&)); MOCK_METHOD1(RemoveCloudDevice, void(const DeviceHandle device_id)); MOCK_METHOD1(ConnectDevice, int(const DeviceHandle)); MOCK_CONST_METHOD1( diff --git a/src/components/include/transport_manager/transport_manager.h b/src/components/include/transport_manager/transport_manager.h index 4ccc78cd1b..eabb4f7028 100644 --- a/src/components/include/transport_manager/transport_manager.h +++ b/src/components/include/transport_manager/transport_manager.h @@ -76,7 +76,7 @@ class TransportManager { virtual int SearchDevices() = 0; virtual void AddCloudDevice( - const transport_manager::transport_adapter::CloudAppProperties + const transport_manager::transport_adapter::CloudAppProperties& cloud_properties) = 0; virtual void RemoveCloudDevice(const DeviceHandle device_id) = 0; diff --git a/src/components/interfaces/MOBILE_API.xml b/src/components/interfaces/MOBILE_API.xml index f51a4f8201..1090050c91 100644 --- a/src/components/interfaces/MOBILE_API.xml +++ b/src/components/interfaces/MOBILE_API.xml @@ -898,7 +898,7 @@ </enum> <enum name="TBTState" since="2.0"> - <description>Enumeration that describes possible states of turn-by-turn client or AppLink app.</description> + <description>Enumeration that describes possible states of turn-by-turn client or SmartDeviceLink app.</description> <element name="ROUTE_UPDATE_REQUEST" /> <element name="ROUTE_ACCEPTED" /> <element name="ROUTE_REFUSED" /> @@ -2585,7 +2585,7 @@ </enum> <enum name="FunctionID" internal_scope="base" since="1.0"> - <description>Enumeration linking function names with function IDs in AppLink protocol. Assumes enumeration starts at value 0.</description> + <description>Enumeration linking function names with function IDs in SmartDeviceLink protocol. Assumes enumeration starts at value 0.</description> <element name="RESERVED" value="0" since="1.0" /> <!-- Base Request / Response RPCs @@ -3916,13 +3916,13 @@ </param> </struct> - <struct name="NavigationServiceManifest"> + <struct name="NavigationServiceManifest" since="5.1"> <param name="acceptsWayPoints" type="Boolean" mandatory="false"> <description> Informs the subscriber if this service can actually accept way points. </description> </param> </struct> - <enum name="NavigationAction"> + <enum name="NavigationAction" since="5.1"> <element name="TURN"> <description> Using this action plus a supplied direction can give the type of turn. </description> </element> @@ -3934,7 +3934,7 @@ <element name="WAYPOINT"/> </enum> - <enum name="NavigationJunction"> + <enum name="NavigationJunction" since="5.1"> <element name="REGULAR"> <description> A junction that represents a standard intersection with a single road crossing another. </description> </element> @@ -3961,12 +3961,12 @@ </element> </enum> - <enum name="Direction"> + <enum name="Direction" since="5.1"> <element name="LEFT"/> <element name="RIGHT"/> </enum> - <struct name="NavigationInstruction"> + <struct name="NavigationInstruction" since="5.1"> <param name="locationDetails" type="LocationDetails" mandatory="true"/> <param name="action" type="NavigationAction" mandatory="true"/> @@ -3992,7 +3992,7 @@ </param> </struct> - <struct name="NavigationServiceData"> + <struct name="NavigationServiceData" since="5.1"> <description> This data is related to what a navigation service would provide.</description> <param name="timeStamp" type="DateTime" mandatory="true"> @@ -4138,7 +4138,7 @@ <param name="remoteControlCapability" type="RemoteControlCapabilities" mandatory="false"> <description>Describes extended capabilities of the module's phone feature</description> </param> - <param name="appServicesCapabilities" type="AppServicesCapabilities" mandatory="false"> + <param name="appServicesCapabilities" type="AppServicesCapabilities" mandatory="false" since="5.1"> <description>An array of currently available services. If this is an update to the capability the affected services will include an update reason in that item</description> </param> </struct> @@ -4419,7 +4419,7 @@ <param name="vrHelp" type="VrHelpItem" minsize="1" maxsize="100" array="true" mandatory="false" since="2.0"> <description> VR Help Items. - If omitted on supported displays, the default AppLink VR help / What Can I Say? screen shall be used. + If omitted on supported displays, the default SmartDeviceLink VR help / What Can I Say? screen shall be used. If the list of VR Help Items contains nonsequential positions (e.g. [1,2,4]), the RPC shall be rejected. If omitted and a vrHelpTitle is provided, the request will be rejected. </description> @@ -6475,7 +6475,7 @@ </param> </function> - <function name ="GetFile" functionID="GetFileID" messagetype="request"> + <function name="GetFile" functionID="GetFileID" messagetype="request" since="5.1"> <description>This request is sent to the module to retrieve a file</description> <param name="fileName" type="String" maxlength="255" mandatory="true"> <description>File name that should be retrieved</description> @@ -6497,7 +6497,7 @@ </param> </function> - <function name="GetFile" functionID="GetFileID" messagetype="response"> + <function name="GetFile" functionID="GetFileID" messagetype="response" since="5.1"> <description>This response includes the data that is requested from the specific service</description> <param name="success" type="Boolean" platform="documentation" mandatory="true"> <description> true, if successful; false, if failed </description> diff --git a/src/components/policy/policy_regular/src/sql_pt_representation.cc b/src/components/policy/policy_regular/src/sql_pt_representation.cc index 19133a45f8..604e69f6fa 100644 --- a/src/components/policy/policy_regular/src/sql_pt_representation.cc +++ b/src/components/policy/policy_regular/src/sql_pt_representation.cc @@ -1800,8 +1800,14 @@ bool SQLPTRepresentation::GatherAppServiceParameters( handled_rpc); } - service_name_query.Reset(); - handled_rpcs_query.Reset(); + if (!service_name_query.Reset()) { + LOG4CXX_ERROR(logger_, "Could not reset service_name query"); + return false; + } + if (!handled_rpcs_query.Reset()) { + LOG4CXX_ERROR(logger_, "Could not reset handled_rpcs query"); + return false; + } } return true; diff --git a/src/components/transport_manager/include/transport_manager/transport_manager_impl.h b/src/components/transport_manager/include/transport_manager/transport_manager_impl.h index 118439bd4a..60303c1bca 100644 --- a/src/components/transport_manager/include/transport_manager/transport_manager_impl.h +++ b/src/components/transport_manager/include/transport_manager/transport_manager_impl.h @@ -140,7 +140,7 @@ class TransportManagerImpl int SearchDevices() OVERRIDE; void AddCloudDevice( - const transport_manager::transport_adapter::CloudAppProperties + const transport_manager::transport_adapter::CloudAppProperties& cloud_properties) OVERRIDE; void RemoveCloudDevice(const DeviceHandle device_id) OVERRIDE; diff --git a/src/components/transport_manager/src/cloud/cloud_device.cc b/src/components/transport_manager/src/cloud/cloud_device.cc index 184fcc10cc..35510f4cf8 100644 --- a/src/components/transport_manager/src/cloud/cloud_device.cc +++ b/src/components/transport_manager/src/cloud/cloud_device.cc @@ -50,6 +50,10 @@ bool CloudDevice::IsSameAs(const Device* other) const { const CloudDevice* other_cloud_device = dynamic_cast<const CloudDevice*>(other); + if (!other_cloud_device) { + return false; + } + if (host_ != other_cloud_device->GetHost()) { return false; } diff --git a/src/components/transport_manager/src/transport_manager_impl.cc b/src/components/transport_manager/src/transport_manager_impl.cc index d197882120..a74ddb700e 100644 --- a/src/components/transport_manager/src/transport_manager_impl.cc +++ b/src/components/transport_manager/src/transport_manager_impl.cc @@ -131,7 +131,7 @@ void TransportManagerImpl::ReconnectionTimeout() { } void TransportManagerImpl::AddCloudDevice( - const transport_manager::transport_adapter::CloudAppProperties + const transport_manager::transport_adapter::CloudAppProperties& cloud_properties) { transport_adapter::DeviceType type = transport_adapter::DeviceType::UNKNOWN; if ((cloud_properties.cloud_transport_type == "WS") || |