Golioth Firmware SDK
Loading...
Searching...
No Matches
gateway.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2025 Golioth, Inc.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifdef __cplusplus
8extern "C"
9{
10#endif
11
12#pragma once
13
15#include <golioth/client.h>
16#include <stdlib.h>
17
22struct blockwise_transfer *golioth_gateway_uplink_start(struct golioth_client *client);
23
43enum golioth_status golioth_gateway_uplink_block(struct blockwise_transfer *ctx,
44 uint32_t block_idx,
45 const uint8_t *buf,
46 size_t buf_len,
47 bool is_last,
49 void *callback_arg);
50
54void golioth_gateway_uplink_finish(struct blockwise_transfer *ctx);
55
56#ifdef __cplusplus
57}
58#endif
void golioth_gateway_uplink_finish(struct blockwise_transfer *ctx)
struct blockwise_transfer * golioth_gateway_uplink_start(struct golioth_client *client)
enum golioth_status golioth_gateway_uplink_block(struct blockwise_transfer *ctx, uint32_t block_idx, const uint8_t *buf, size_t buf_len, bool is_last, golioth_set_block_cb_fn set_cb, void *callback_arg)
golioth_status
void(* golioth_set_block_cb_fn)(struct golioth_client *client, enum golioth_status status, const struct golioth_coap_rsp_code *coap_rsp_code, const char *path, size_t block_size, void *arg)
Definition client.h:174