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 
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 */
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_ */
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
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
Information about response to user request.
Definition: req.h:30
void * get_next_data
Definition: req.h:39
const uint8_t * data
Definition: req.h:31
size_t len
Definition: req.h:32
size_t total
Definition: req.h:35
golioth_get_next_cb_t get_next
Definition: req.h:38
size_t off
Definition: req.h:33
void * user_data
Definition: req.h:41
int err
Definition: req.h:43