summaryrefslogtreecommitdiff
path: root/src/components/policy/policy_external
Commit message (Collapse)AuthorAgeFilesLines
* Policy changes for Web Engine supportAlexander Kutsan2020-02-0510-128/+280
| | | | Issue : #3197
* Feature/HMI Policy Table Update using vehicle modem (#3201)Ira Lytvynenko (GitHub)2020-02-056-1/+27
| | | | | | | | | | | | | | | | * Send UPDATING state after receiving a successful SDL.PolicyUpdate response * Restart the timeout in case SDL received BC.OnSystemRequest with type PROPRIETARY or HTTP from HMI in UPDATING state * Fix UPDATE_NEEDED - UPDATING sequence in case of second app register * Add unit tests * fixup! Send UPDATING state after receiving a successful SDL.PolicyUpdate response * fixup! Restart the timeout in case SDL received BC.OnSystemRequest with type PROPRIETARY or HTTP from HMI in UPDATING state Co-authored-by: Yaroslav Mamykin (GitHub) <33784535+YarikMamykin@users.noreply.github.com>
* Fix build witj external proprietary after update new jsoncpp lib (#3224)Yevhenii Dementieiev (GitHub)2020-01-303-5/+4
|
* Update jsoncpp library (#3155)Yevhenii Dementieiev (GitHub)2020-01-298-53/+65
| | | | | | | | * Delete old version of jsoncpp lib and add new like submodule, change deprecated interface for new. * Logs output without extra special symbols * fixup! Delete old version of jsoncpp lib and add new like submodule, change deprecated interface for new.
* fixup! Add new update_pending statusfix/BC.PolicyUpdate_twiceLitvinenkoIra2020-01-143-1/+7
|
* Add new update_pending statusLitvinenkoIra2019-11-295-2/+81
|
* Merge pull request #3099 from ↵Jacob Keeler2019-10-282-0/+40
|\ | | | | | | | | smartdevicelink/fix/fix_synchronize_backup_and_reset_functions_in_cache Synchronize backup and reset policy functions
| * fixup! Synchronize backup and reset policy functionsfix/fix_synchronize_backup_and_reset_functions_in_cacheAndrii Kalinich2019-10-241-8/+6
| |
| * Synchronize backup and reset policy functionsAndrii Kalinich2019-10-222-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an issue specific for EXTERNAL_PROPRIETARY flow only. This issue is exposed by PolicyHandlerTest unit test: ResetPolicyTable_WithPreloadedFile_ExpectPolicyTableReset which sometimes is failing. The main problem was that database reset(drop) and backup can be done simultaneously in different threads which were not synchronized. In that case, database drop often may be failed because another thread is trying to write something into the DB table which is going to be dropped. This causes above unit test to fail sometimes. To make that unit test and policy component more stable, these two threads were synchronized by additing a waiting function, so one thread will be able to wait for another thread to finish its own staff.
* | Fix VD items subscriptions after PTU (#3081)Andrii Kalinich (GitHub)2019-10-235-1/+97
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Check if there are any registered app before sending UPDATE_NEEDED (#3090)Ira Lytvynenko (GitHub)2019-10-212-1/+3
|
* Add handling for unknown enum values in vehicle data schema (#3062)6.0.0_RCJacob Keeler2019-10-031-7/+2
|
* Fix PTU notifications order (#3051)Andrii Kalinich (GitHub)2019-10-015-99/+192
| | | | | | | | | | | | | * Fix order of actions taken during PTU The existing order of actions were changed to make it more obvious for external systems like HMI and mobile apps. The main concern was that SDL is sending OnStatusUpdate(UP_TO_DATE) when policy table update was not actually done. The order of actions done during PTU was updated to perform sending of UP_TO_DATE only when all policy actions were actually done. Related unit tests were updated respectively.
* Merge pull request #3025 from smartdevicelink/fix/gather_consumer_messagesJacob Keeler2019-09-232-12/+33
|\ | | | | Fix reading of Consumer Friendly Messages in PROPRIETARY mode
| * Address commentsfix/gather_consumer_messagesjacobkeeler2019-09-202-12/+33
| |
* | Add condition check for policy ResetRetrySequence (#3035)Jacob Keeler2019-09-231-2/+3
| |
* | Make usage logger stabilization (#3022)Serhii Niukalov (GitHub)2019-09-191-8/+10
| | | | | | | | | | | | | | | | 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-192-1/+2
| | | | | | | | | | | | | | | | * Fix coverity issues Fixes CIDs 203808, 203807, 203806, 203804, 203803, 203802, 203800, 203798, 203797, 203795, and 203793 * Add virtual destructor
* | Fix SDL's core crash during retry sequence (#3020)Igor Gapchuk (GitHub)2019-09-122-0/+8
|/ | | | | | | | | | | | | | * 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 redundant OnPermissionChanged notification (#3007)Mykola Korniichuk (GitHub)2019-09-051-11/+11
| | | | | | * Fix redundant OnPermissionChanged notification * fixup! Fix redundant OnPermissionChanged notification
* Add check for already stored vehicle data item paramsfix/PTU_trigger_on_ignition_cycles_doesnt_work_properlyMykola Korniichuk2019-09-021-0/+8
|
* [SDL 0173] - Read Generic Network Signal Data Implementation (#2977)Alexander Kutsan (GitHub)2019-08-3028-2202/+1893
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-2910-61/+244
| | | | | | | | | | | | | | | | | | | | | | | | | * 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-2916-52/+632
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-262-0/+20
|\ | | | | Feature/widget support
| * Implement CreateWindow and DeleteWindow RPCsAndriy Byzhynar2019-08-202-0/+20
| | | | | | | | | | | | | | | | * Implemented new RPCs: CreateWindow & DeleteWindow * UTs for CreateWindow RPC. * UTs for DeleteWindow RPC.
* | Fix shutdown crash static var colission (#2939)Alexander Kutsan (GitHub)2019-08-223-11/+16
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Removed DEPRECATED methods.sniukalov2019-08-145-463/+10
|
* Adaptation UTs.sniukalov2019-08-145-286/+414
|
* Add using device id for external proprietary mode.sniukalov2019-08-142-52/+496
|
* Adjustment of external policy component for multiple devices.sniukalov2019-08-142-8/+86
|
* add Cancel Interaction RPC (#2963)Collin2019-08-122-0/+10
| | | | | | | | | | | | | | | | | | | | | | * 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 #2967 from smartdevicelink/feature/open_menu_rpcShobhit Adlakha2019-07-312-0/+10
|\ | | | | ShowAppMenu RPC
| * Add ShowAppMenu to policy table enumsfeature/open_menu_rpcShobhit Adlakha2019-07-252-0/+10
| |
* | Merge pull request #2944 from ↵JackLivio2019-07-242-0/+10
|\ \ | | | | | | | | | | | | smartdevicelink/feature/update_and_unpublish_app_service Update and delete published app services
| * \ Merge branch 'develop' into feature/update_and_unpublish_app_serviceJacob Keeler2019-07-192-0/+10
| |\ \ | | |/
| * | Apply suggestions from code reviewJackLivio2019-07-171-1/+1
| | | | | | | | | Co-Authored-By: Jacob Keeler <jacob.keeler@livioradio.com>
| * | Unpublish and Update App ServicesJackLivio2019-06-102-0/+10
| | |
* | | Add lock_screen_dismissal_warning to Policy Interfaceigapchuck2019-07-245-3/+47
| | |
* | | Send OnDriverDistraction notification in case if LockScreenDismissal state ↵Alexander2019-07-242-0/+24
| | | | | | | | | | | | was changes after policy update.
* | | Add lock_screen_dismissal_enabled to Policy InterfaceAlexander2019-07-245-0/+33
| | | | | | | | | | | | Removed redundant comments of overridden functions
* | | Add lock_screen_dismissal_enabled to Policy databseAlexander2019-07-244-6/+32
| |/ |/| | | | | Removed debug logs
* | Apply suggestions from code reviewJacob Keeler2019-07-111-1/+1
| | | | | | | | Co-Authored-By: JackLivio <jack@livio.io>
* | Add CloseApplication RPCjacobkeeler2019-06-172-0/+10
|/
* Merge remote-tracking branch 'origin/release/5.1.1' into ↵feature/update_style_scriptjacobkeeler2019-04-301-0/+5
|\ | | | | | | | | | | | | feature/update_style_script # Conflicts: # src/components/transport_manager/src/transport_manager_impl.cc
| * Addressed review commentsfix/building_without_cloudapp_supportShobhit Adlakha2019-04-291-1/+2
| |
| * Set return values for cloud app functions if CLOUD_APP_SUPPORT=OFFShobhit Adlakha2019-04-251-0/+4
| |
* | Run updated style scriptjacobkeeler2019-04-2935-299/+302
|/
* Address commentsJackLivio2019-04-091-1/+1
|
* Add missing comma in pt query stringsJackLivio2019-04-091-1/+1
|