1 /* 2 * Copyright (c) 2017 Linaro Limited 3 * Copyright (c) 2018-2019 Foundries.io 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 8 #include <stdio.h> 9 #include <zephyr/net/lwm2m.h> 10 #include <zephyr/sys_clock.h> 11 12 #define LWM2M_PACKAGE_URI_LEN CONFIG_LWM2M_SWMGMT_PACKAGE_URI_LEN 13 14 struct requesting_object { 15 uint8_t obj_inst_id; 16 bool is_firmware_uri; 17 18 void (*result_cb)(uint16_t obj_inst_id, int error_code); 19 lwm2m_engine_set_data_cb_t write_cb; 20 int (*verify_cb)(void); 21 }; 22 23 /* 24 * The pull context is also used in the LWM2M's Software Management object. 25 * This means that the transfer needs to know if it's used for firmware or 26 * something else. 27 */ 28 int lwm2m_pull_context_start_transfer(char *uri, struct requesting_object req, k_timeout_t timeout); 29