Golioth Zephyr SDK
req.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2022 Golioth, Inc.
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
#ifndef GOLIOTH_INCLUDE_NET_GOLIOTH_REQ_H_
8
#define GOLIOTH_INCLUDE_NET_GOLIOTH_REQ_H_
9
10
#include <stddef.h>
11
#include <stdint.h>
12
18
typedef
int (*
golioth_get_next_cb_t
)(
void
*get_next_data,
int
status);
19
30
struct
golioth_req_rsp
{
31
const
uint8_t *
data
;
32
size_t
len
;
33
size_t
off
;
34
35
size_t
total
;
36
37
/* TODO: provide more user-friendly helper function */
38
golioth_get_next_cb_t
get_next
;
39
void
*
get_next_data
;
40
41
void
*
user_data
;
42
43
int
err
;
44
};
45
51
typedef
int (*
golioth_req_cb_t
)(
struct
golioth_req_rsp
*rsp);
52
53
#endif
/* GOLIOTH_INCLUDE_NET_GOLIOTH_REQ_H_ */
golioth_req_cb_t
int(* golioth_req_cb_t)(struct golioth_req_rsp *rsp)
User callback for handling valid response from server or error condition.
Definition:
req.h:51
golioth_get_next_cb_t
int(* golioth_get_next_cb_t)(void *get_next_data, int status)
Callback function for requesting more data to be received.
Definition:
req.h:18
golioth_req_rsp
Information about response to user request.
Definition:
req.h:30
golioth_req_rsp::get_next_data
void * get_next_data
Definition:
req.h:39
golioth_req_rsp::data
const uint8_t * data
Definition:
req.h:31
golioth_req_rsp::len
size_t len
Definition:
req.h:32
golioth_req_rsp::total
size_t total
Definition:
req.h:35
golioth_req_rsp::get_next
golioth_get_next_cb_t get_next
Definition:
req.h:38
golioth_req_rsp::off
size_t off
Definition:
req.h:33
golioth_req_rsp::user_data
void * user_data
Definition:
req.h:41
golioth_req_rsp::err
int err
Definition:
req.h:43
include
net
golioth
req.h
Generated on Wed Mar 27 2024 14:34:44 for Golioth Zephyr SDK by
1.9.1