1 /* 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 struct os_mgmt_reset_data { 27 /** Contains the value of the force parameter. */ 28 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 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 zcbor_state_t *zse; 41 42 /** Contains the number of decoded parameters. */ 43 const size_t *decoded; 44 45 /** Contains the value of the query parameter. */ 46 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 bool *has_output; 53 }; 54 55 /** 56 * @} 57 */ 58 59 #ifdef __cplusplus 60 } 61 #endif 62 63 #endif 64