Line data Source code
1 0 : /* 2 : * Copyright (c) 2023 Nordic Semiconductor ASA 3 : * 4 : * SPDX-License-Identifier: Apache-2.0 5 : */ 6 : 7 : #ifndef H_MCUMGR_OS_MGMT_CALLBACKS_ 8 : #define H_MCUMGR_OS_MGMT_CALLBACKS_ 9 : 10 : #ifdef __cplusplus 11 : extern "C" { 12 : #endif 13 : 14 : /** 15 : * @brief MCUmgr os_mgmt callback API 16 : * @defgroup mcumgr_callback_api_os_mgmt MCUmgr os_mgmt callback API 17 : * @ingroup mcumgr_callback_api 18 : * @{ 19 : */ 20 : 21 : /** 22 : * Structure provided in the #MGMT_EVT_OP_OS_MGMT_RESET notification callback: This callback 23 : * function is used to notify the application about a pending device reboot request and to 24 : * authorise or deny it. 25 : */ 26 1 : struct os_mgmt_reset_data { 27 : /** Contains the value of the force parameter. */ 28 1 : bool force; 29 : }; 30 : 31 : /** 32 : * Structure provided in the #MGMT_EVT_OP_OS_MGMT_BOOTLOADER_INFO notification callback: This 33 : * callback function is used to add new fields to the bootloader info response. 34 : */ 35 1 : struct os_mgmt_bootloader_info_data { 36 : /** 37 : * The zcbor encoder which is currently being used to output group information, additional 38 : * fields to the group can be added using this. 39 : */ 40 1 : zcbor_state_t *zse; 41 : 42 : /** Contains the number of decoded parameters. */ 43 1 : const size_t *decoded; 44 : 45 : /** Contains the value of the query parameter. */ 46 1 : struct zcbor_string *query; 47 : 48 : /** 49 : * Must be set to true to indicate a response has been added, otherwise will return the 50 : * #OS_MGMT_ERR_QUERY_YIELDS_NO_ANSWER error. 51 : */ 52 1 : bool *has_output; 53 : }; 54 : 55 : /** 56 : * @} 57 : */ 58 : 59 : #ifdef __cplusplus 60 : } 61 : #endif 62 : 63 : #endif