summaryrefslogtreecommitdiff
path: root/src/components/application_manager/include/application_manager
Commit message (Collapse)AuthorAgeFilesLines
* fixup! Fix versioning appliance for vehicle dataYaroslav Mamykin (GitHub)2019-11-151-11/+0
|
* fixup! Fix versioning appliance for vehicle dataYaroslav Mamykin (GitHub)2019-11-151-0/+11
|
* Fix/fix log severity level in on vehicle data notification cc (#2776)Stanislav Kobziev (GitHub)2019-10-281-1/+1
| | | | | | | | | | | | | | * Fix log severity level in on_vehicle_data_notification.cc Fixed log severity level in on_vehicle_data_notification.cc: LOG4CXX_ERROR is changed on LOG4CXX_DEBUG and corrected a mistake in string. * Resolve merge conflict * Fix Connection Typo * Revert disabled unit test
* Fix SDL does not set the app to NONE HMI level after a rejecting of ↵Igor Gapchuk (GitHub)2019-10-251-0/+8
| | | | | | | | StartService (#3082) * Fix HMI level on StartServiceNAck * fixup! Fix HMI level on StartServiceNAck
* Fix VD items subscriptions after PTU (#3081)Andrii Kalinich (GitHub)2019-10-232-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix revoked VD items subscription after PTU There was found an issue that SDL still kept subscriptions for custom vehicle data items even for case when they were removed during PTU. By that reason, SDL was crashing with DCHECK on attempt to unsubscribe from non existing custom data. There was added missing logic of internal unsubscribe in case some custom vehicle data was removed by policies. * Fix sending of UnsubscribeVehicleData Was added a missing part of logic of subscriptions control - cache manager was updated to keep the vehicle data which was removed by last PTU. Custom vehicle data manager was updated to consider the removed vehicle data and also prepare and send unsubscribe requests to HMI for case when some vehicle data was removed and some application was subscribed on it. * fixup! Fix sending of UnsubscribeVehicleData * fixup! Fix sending of UnsubscribeVehicleData * fixup! Fix sending of UnsubscribeVehicleData * fixup! Fix sending of UnsubscribeVehicleData
* [WIP] initial fix of socket streaming by guessing playback time (#3057)Collin2019-10-012-2/+5
| | | | | | | | | | | | | | | | | | | | * initial fix of socket streaming by guessing playback time * isolate custom timer logic to socket audio streaming * add half second latency compensation * add mocks for changed and new methods * make DataSizeToMilliseconds const method * fix unit tests * update server_type checks * address review comments * fix namespace of ServiceType
* Add HMICapabilities Params (#3058)JackLivio2019-10-011-0/+2
| | | | | | * Add appServices param to HMICapabilities * Add hmiCapabilities params
* Fix/crash on ign off (#3048)Maksym Ked (GitHub)2019-09-261-0/+2
| | | | | | * Shutdown message queues in rpc service on sdl close * fixup! Shutdown message queues in rpc service on sdl close
* Fix IAP device transport switching sequence (#3034)Andrii Kalinich (GitHub)2019-09-254-11/+33
| | | | | | | | | | | | | | | | | | | | | | * Add reregister wait list accessor and fix IsApplicationSwitched in RAI * Update CommandHolder class After introduction CommandSource enum there was possible to specify any different source for HMI and mobile commands. However, CommandHolder class logic was not updated to reflect these changes and still working with the hardcoded values. As a result commands factory of plugins may not able to create commands which were suspended during device transport switching and then restored back. This commit contains updated CommandHolder impl which reflects changes done and properly handles initial command source. * Fix affected UT * Fix style
* move MenuLayoutsAvailable to WindowCapability (#3043)Collin2019-09-243-8/+15
| | | | | | | | | | | | | | | | * move MenuLayoutsAvailable to WindowCapability * cleanup style script + make is_supported function const * reverse comparables rvalue on left side is good practice * cleanup2 * main window can have window_id = 0
* Remove deprecated methods from projectjacobkeeler2019-09-233-16/+0
|
* Make usage logger stabilization (#3022)Serhii Niukalov (GitHub)2019-09-191-1/+0
| | | | | | | | Added custom deleter for logger Added flush logger during each handle deleting Added deleting logger thread during destroy each plugin This changes are necessary to avoid deadlock during work with log4cxx.
* Fix coverity issues (#3036)Jacob Keeler2019-09-191-12/+12
| | | | | | | | * Fix coverity issues Fixes CIDs 203808, 203807, 203806, 203804, 203803, 203802, 203800, 203798, 203797, 203795, and 203793 * Add virtual destructor
* Error message processing from HMI (#3016)Mykola Korniichuk (GitHub)2019-09-131-8/+18
| | | | | | | | * git error message processing from HMI * Fix comments and signed-unsigned conversion * fixup! Fix comments and signed-unsigned conversion
* Fix SDL's core crash during retry sequence (#3020)Igor Gapchuk (GitHub)2019-09-121-0/+2
| | | | | | | | | | | | | | * Fix SDL crash during retry sequence In case, when lust application is unregistered, SDL has to stop retry sequence, because doesn't exist any mobile connection and these actions are redundant. Also SDL should check if exist registered applications before sending PolicySnapshotNotification. * fixup! Fix SDL crash during retry sequence * fixup! Fix SDL crash during retry sequence
* Fix failing build with enable_security=off (#3006)Maksym Ked (GitHub)2019-09-031-0/+2
|
* Feature/Remote Control - Allow Multiple Modules per Module Type (#2984)Ira Lytvynenko (GitHub)2019-08-307-3/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add new functionality to the interfaces * Add moduleId processing to the resource allocation manager Add GetResources function to helpers to get a list of resources Update unit tests with moduleID param Update command tests after updating the resource allocation manager * Add GetAcquiredModuleTypes and ReleaseModuleType functions for policy checking * Remove redundant SetResourceState call and fix UTs SetResourceState is called in RCCommandRequest::on_event function so it makes no sense to call it again RCCommandRequest::on_event * Add moduleInfo to default capabilities * Add ModuleId method to RCCommandRequest Add ModuleId method to RCCommandRequest for extracting module_id from command message. Update all inherited commands from RCCommandRequest. * Add ReleaseInteriorVehicleDataModule RPC Add ReleaseInteriorVehicleDataModuleRequest. Add ReleaseInteriorVehicleDataModuleResponse. Update ResourceAllocationManager interface: - add method ReleaseResource(); Update ResourceAllocationManagerImpl: - move ReleaseResource() from private section to public for implementing interface; * Add GetInteriorVehicleDataConsentRequest RPC Add GetInteriorVehicleDataConsentRequest without logic. Add GetInteriorVehicleDataConsentResponse. Update RCCommandFactory. * Refactor RC capabilities checking Create RCCapabilities manager, move all functions related to capabilities checking from commands into it. Move auxiliary functions to the rc_helpers. Create mock for RC capabilities manager Update UTs after RC capabilities manager adding * Use range based loop for smart objects with array type * Add ModuleId() function implementation Add const to the ModuleType() function Add function to get the moduleId from hmi capabilities Process missing moduleId param in HMI response In case if HMI doesn't provide the moduleId in response SDL will consider such response as invalid and send generic error response to the mobile Add moduleId to the hmi request * Add moduleId validation by capabilities and button_name for ButtonPress * Add moduleId validation by capabilities for GetIVD and SetIVD Add capabilities check to the rc_command_request * Add const to the capabilities check functions * Add function to get list of all available resources from hmi capabilities * Fix UTs after updating the capabilities check Update unit tests after obtaining available resources from capabilities * Add new HMI RPC SetGlobalProperties and save user_location of application Update SetGlobalPropertiesRequest - update PrepareResponseParameters method according to third new parameter "rc_properties"; * Add new parameter to ini file Add period for module_id consent expiring * Update interior vehicle data caching with moduleId processing Update unit tests that are related to caching with moduleId processing * Add separate file for RCRpcTypes * Add RCConsentManager - add interface RCConsetnManager - add implementation RCConsentManagerImpl - add new rc constants - add mock class for RCConsentManager Remove all consents after RC disabling Add checking ModuleConsent to RCCommandRequest Add logic for GetInteriorVehicleDataConsentRequest from Mobile Save the driver's decision when SDL sends the GIVDConsent request * Define Grid, add functions for getting moduleServiceArea and allowMultipleAccess values Add Seat Location capabilities checking and function for getting driver's location Check if the user location area and the service area has something in common, or the user location is driver, otherwise - reject the module reallocation request Fix UTs after adding the location check * Update SEAT module type processing Add converting id to moduleId: If the vehicle support at least one seat control, seat control capability includes at least two items. 1st for driver’s seat. 2nd for front passenger’s seat * Add SetGlobalProperties Unit tests Add Unit test for PrepareResultCodeForResponse method Add Unit test for PrepareResultForMobileResponse method * Add ReleaseInteriorVehicleDataModuleRequest Unit tests * Set resource to free if SIVD request is invalid * Add Grid Unit tests * Add ResourceAllocationManager Unit tests * Add MockRCHelpers. * Add ResourceAllocationManager Unit tests * Allocate resource after receiving successful response from HMI Send OnRCStatus notification only in case resource allocation state was changed * Rename function to indicate that it returns a list of module types * Rename typedef to indicate that it defines a pair moduleType and capabilitiesStatus * Fix functions descriptions * Rename function to indicate that it returns data related to the module type * Fix CheckIfModuleExistsInCapabilities function name * Update cached consents logic for GIVDC Behavior for cache consents has been updated according to the following comment: 1. If accessMode=AUTO_ALLOW, return true by default 2. If accessMode=AUTO_DENY, check if another app is using the resource a. If the resource is IN_USE, return false b. If the resource is FREE, return true 3. If accessMode=ASK_DRIVER, check if the consent is cached a. If it is cached, return that result b. If it is NOT cached, then prompt the driver for consent * Update logic for allowMultipleAccess=false
* [SDL 0173] - Read Generic Network Signal Data Implementation (#2977)Alexander Kutsan (GitHub)2019-08-307-16/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Generate policy enums from MOBILE_API Policy manager HMI level enum reorder * Add RPC vehicle data and endpoint_properties to sdl_preloaded_pt Set default version of custom vehicle data mapping * Add VehicleDataItem to policy table SQL storage implementation for VehicleDataItems Fix validation of double values in policy table Change isDouble to isNumeric during validation double values "0" should be validated as correct double value Add validation vehicle data during PTU Send in PT snapshot only version of custom VDI - During snapshot generation remove vehicle data items section - Add validation for Policy table depended on PT type Fix wrong check for vehicle data snapshot Allow empty vehicle data in PTU Change max value of string for URL from 255 to INT_MAX * Make Policy Handler forward declared to avoid high coupling * Add vehicle_info_command_params for vehicle info plugin Vehicle info params added to hmi commands * Process CustomVehicleData in GetVehicleData request * CustomVehicleDataManager implementation * Process Custom vehicle data subscriptions Refactored code. Extracted CheckFrequency to separate method in class * Check update of content of functional groups Fixes https://github.com/smartdevicelink/sdl_core/issues/2962 Add additional check for functional group content before OnPermissionChangeNotification. * rename comparing functions to make more clear their return value sense * change variable names * extra check for null values in HasNewGroups() New unit test to cover changes within functional group * Add GetPolicyConfigurationData GetPolicyCOnfigurationData Implementation * Add CustomVehicleData functionality for POLICY_EXTERNAL flow Change max value url for external policy fixes for external flow * since unti validation for the database * empty vehicle data validation * Convert data_type to VehicleDataType enum value * Validation of VehicleDataItem name and key Introduces validation of vehicle_data_item name and key validation: * they should not contain spaces; * they should not be empty or consist only spaces; * they should not contain invalid chars like '!@#$%^&*'. * Add engineOilLife to HMI_API * Remove deprecated RPC GetUrls due to major version update * Add ability to extend Smart schema with parameters Extract SMember from CObjectSchemaItem Add methods to ISchemaItem (Using composite pattern) - GetMemberSchemaItem - AddMemberSchemaItem Add implementation of VehicleDataItemSchema class Add appropriate unit tests Add creation of vehicle_data items schemes on policy event
* Feature/service status update to hmi (#2921)Maksym Ked (GitHub)2019-08-296-8/+84
| | | | | | | | | | | | | | | | | | | | | | | | | * Added OnServiceUpdate notification * Added handling of service status update - introduced ServiceStatusUpdateHandler and ServiceStatusUpdateHandlerListener interfaces - added lacking interface functions to corresponding entities - added notification of listeners - introduced ServiceStatusUpdateNotificationBuilder - replaced shared_ptr with unique_ptr - moved SERVICE_RECEIVED * Add UT's for service status update to HMI feature * Added ServiceStatusUpdateDocumentation * Added sending error on PTU retries exceed allowed count * Fix OnServiceUpdate for unsecure force protected service * Updates according to proposal changes Added new result codes for ServiceStatusUpdateReasonStructure
* Feature/rpc message protection (#2951)Maksym Ked (GitHub)2019-08-297-2/+269
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added encryption required flag to policy table. Also added RPC Encryption Manager Interface for comfortable access to policy table. * Added logic for processing RPC according to the proposal. * The permission change notification has been expanded. * Fixed UTs after implementation feature RPC message protection. * Fix multiframe issue * Fix style * Added storage of encryption required rpcs * Fix CI build * Extended logic adding encryption flag in message helper * Added permission check of encryption required for PROP * Added permission check of encryption required for EXT * Fixes after rebase * Answer PR comments - fixed typos - fixed 3rd party cmake * fixup! Added logic for processing RPC according to the proposal. * fixup! The permission change notification has been expanded. * Answer PR comments - renamed functions - added encryption_required flag to sql_pt_ext* source files - added condition and logging to CacheManager::GetApplicationParams * fixup! Added logic for processing RPC according to the proposal. * fixup! Added encryption required flag to policy table. * fixup! Added permission check of encryption required for EXT * fixup! Added permission check of encryption required for PROP * Fixes after rebase
* Merge pull request #2980 from smartdevicelink/feature/widget_supportJackLivio2019-08-2617-206/+781
|\ | | | | Feature/widget support
| * fixup! Implement Resumption for widgetsfeature/widget_supportAndriy Byzhynar (GitHub)2019-08-252-0/+18
| |
| * Add app version check to SetDisplayLayout RPCAndriy Byzhynar (GitHub)2019-08-211-1/+3
| | | | | | | | | | Added app version check and appropriate result code generation Updated old/added new unit tests
| * Add validation to CreateWindow requestmked-luxoft2019-08-201-0/+2
| |
| * Add accumulating window capabilitiesmked-luxoft2019-08-203-2/+20
| | | | | | | | | | | | | | | | Accumulating window capabilities is needed so SDL can send mobile a full list of window capabilities in response to GetSystemCapabilities. At the same time, a new function display_capabilities(window_id) is introduced, so SDL can send window capabilities of only affected window to mobile.
| * fixup! Implement Resumption for widgetsmked-luxoft2019-08-202-2/+2
| |
| * Check hmi level of relevant window on button notificationsmked-luxoft2019-08-203-1/+27
| |
| * Send one OnSystemCapabilitiesUpdated on resumptionmked-luxoft2019-08-207-2/+137
| |
| * Implement Resumption for widgetsAndriy Byzhynar2019-08-204-2/+93
| | | | | | | | | | Implemented resumption for widget support Updated unit tests for data resumption
| * Implement hmi capabilties handlingAndriy Byzhynar2019-08-202-0/+21
| | | | | | | | | | | | | | Added handling of hmi capablities Updated related RPCs Updated unit tests Added unit tests for new RPCs
| * Implement Policies changes and dependenciesAndriy Byzhynar2019-08-202-1/+3
| | | | | | | | | | | | | | | | | | Implemented policies for wodgets Fixed depenedencies Updated unit tests Fixed existing Uts, which have relation to CheckPermissions & CheckPolicyPermissions functions.
| * Implement StateController changesAndriy Byzhynar2019-08-201-129/+103
| | | | | | | | | | | | Implemented changes in State Controller Fixed related dependencies Fixed unit tests
| * Add window_id() method to Command classAndriy Byzhynar2019-08-202-0/+11
| |
| * Update OnHMIStatus notificationAndriy Byzhynar2019-08-202-5/+5
| |
| * Update application and its dependenciesAndriy Byzhynar2019-08-207-65/+340
| | | | | | | | | | | | Updated application interface and its implementation Updated application state and its implementation Updated Smart object keys
* | Fix shutdown crash static var colission (#2939)Alexander Kutsan (GitHub)2019-08-224-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add apropriate destruction of plugins Add Delete exported function to each rpc plugin library Delete funciton will destroy Plugin instance. Move type defenition of PluginPtr to Plugin manager, because other components should use olugins only by referance. Add custom destructor for PluginPtr. custom destructor will call `Delete` function from shared library for plugin instance and unload plugin dl_handle. Deprecate GetPlugins method because it not used (and actualy shouldnt) by other components. Refactored LoadPlugin function, make it more readable, make this function as private RPCPluginManagerImpl private method. * Fix components dependencies after hiding libraries symbols * Add `-fvisibility=hidden` to avoid collision of static variables Remove from ABI all shared objects members except functions that needed. Fixes double destruction crash on shutdown. For the case if dynamically linked library contains same static variables as binary. System allocates the same memory for both static variables (in shared object and in binary). But during exit both binary and shared object destroying this memory. Mostly is a specific for binaries generated by gcc compiler. Inspired by https://stackoverflow.com/questions/3570355/c-fvisibility-hidden-fvisibility-inlines-hidden http://gcc.gnu.org/wiki/Visibility * Link Policy code statically SDL components like Application manager Connection Handler, etc ... requires symbols from policy library. Also policy library loaded by SDL in run-time as shared library. Having same library loaded as dynamic and shared library is definitely bad idea. This commit link extract static policy component and link policy component statically to other components. * Static linkage of plugins code un plugins unit tests Unit tests need to be portable and should not depend from dynamic libraries * Put logs_enabled_ "default" visibility attribute Logs enables is static variable and it should be shared across libraries. On SDL start if set_enabled_logs should put value shared across libraries * Changed the order of destruction of objects Changed the order of destruction of objects to avoid the crash during destruction of the RequestController. * Change the order of the waiting and finishing thread Applications using hotplug support should stop the thread at program exit and wait finishing thread after calling libusb_hotplug_deregister_callback. This call wakes up libusb_handle_events () http://libusb.sourceforge.net/api-1.0/group__libusb__asyncio.html * fixup! Add apropriate destruction of plugins * Make saftly usage of logger Added usage unique_ptr for LogMessageLoopThread to avoid the crash when delete_log_message_loop_thread was not fired.
* | Feature/Pixel density and scale (#2757)Igor Gapchuk (GitHub)2019-08-211-0/+3
|/ | | | | | | | | | | | | | | | | | | | * Feature/Pixel density and scale Add new parameters to VideoStreamingCapability structure: - diagonalScreenSize - diagonal screen size of the screen; - pixelPerInch - Pixel per inch (PPI) of the screen; - scale - Scale value to determine how the app should scale the captured view. Add new parameters with default values to hmi_capabilities.json: - diagonalScreenSize - pixelPerInch - scale * Add min and max value for "scale" parameter. Add min and max values for parameter scale in Structs index for VideoStreamingCapabilities struct.
* Merge pull request #2034 from shoamano83/feat/sdl-0138_audio_pass_thru_arrayJackLivio2019-08-202-0/+13
|\ | | | | Feat/sdl 0138 audio pass thru array
| * Update audioPassThruCapabilities in hmi_capabilities.json to arraySho Amano2019-07-251-0/+12
| | | | | | | | | | Also, hmi_capabilities_impl.cc is updated to support both old and new formats of the json file.
| * Update HMI_API.xml to add audioPassThruCapabilitiesListSho Amano2019-07-251-0/+1
| |
* | Merge pull request #2960 from ↵Shobhit Adlakha2019-08-162-34/+28
|\ \ | | | | | | | | | | | | smartdevicelink/feature/same_app_from_multiple_devices Support running the same app from multiple devices at the same time
| * | Removed DEPRECATED methods.sniukalov2019-08-142-88/+0
| | |
| * | Add using device id for external proprietary mode.sniukalov2019-08-141-4/+76
| | |
| * | Adjustment of proprietary policy component for multiple devices.sniukalov2019-08-141-3/+26
| | |
| * | Adjustment application_manager for multiple devices.sniukalov2019-08-141-27/+14
| | |
* | | support tiled menus and submenus (#2968)Collin2019-08-152-0/+10
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * support tiled menus and submenus * with style script * SendResponse in on_event * style script * fix compiling with unit tests * append warnings info * append response info when sending warnings * load menuLayoutsAvailable in hmi_capabilities.json * add to hmi_capabilities in RAI response * case unsupported menuLayout only SGP param * Update warning message for invalid data * proposal revisions
* | add Cancel Interaction RPC (#2963)Collin2019-08-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add Cancel Interaction RPC * Update src/components/interfaces/MOBILE_API.xml Co-Authored-By: Jacob Keeler <jacob.keeler@livioradio.com> * Update src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/cancel_interaction_request.cc Co-Authored-By: Jacob Keeler <jacob.keeler@livioradio.com> * omit cancelID when not used * use helpers::Compare * remove unnecessary app registered check * add scrollableMessage::cancelID * VRPerformInteraction.cancelID
* | Merge pull request #2964 from smartdevicelink/feature/template_titlesShobhit Adlakha2019-07-301-0/+1
|\ \ | | | | | | Template Titles
| * | Implemented templateTitle paramater for Show RPCShobhitAd2019-07-101-0/+1
| | |
* | | Merge pull request #2965 from smartdevicelink/feature/alert_iconCollin2019-07-261-0/+1
|\ \ \ | | | | | | | | implement alert icon parameter to alert rpc