Golioth Zephyr SDK
stream.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_STREAM_H_
8 #define GOLIOTH_INCLUDE_NET_GOLIOTH_STREAM_H_
9 
10 #include <stdint.h>
11 #include <zephyr/net/coap.h>
12 #include <net/golioth/req.h>
13 
40 int golioth_stream_push_cb(struct golioth_client *client, const uint8_t *path,
41  enum golioth_content_format format,
42  const uint8_t *data, size_t data_len,
43  golioth_req_cb_t cb, void *user_data);
44 
59 int golioth_stream_push(struct golioth_client *client, const uint8_t *path,
60  enum golioth_content_format format,
61  const uint8_t *data, size_t data_len);
62 
65 #endif /* GOLIOTH_INCLUDE_NET_GOLIOTH_STREAM_H_ */
int golioth_stream_push_cb(struct golioth_client *client, const uint8_t *path, enum golioth_content_format format, const uint8_t *data, size_t data_len, golioth_req_cb_t cb, void *user_data)
Push value to Golioth's LightDB Stream (callback based)
int golioth_stream_push(struct golioth_client *client, const uint8_t *path, enum golioth_content_format format, const uint8_t *data, size_t data_len)
Push value to Golioth's LightDB Stream (synchronously)
golioth_content_format
Set of Content-Format option values for Golioth APIs.
Definition: net/golioth.h:33
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
Represents a Golioth client instance.
Definition: net/golioth.h:50