Loading...
Searching...
No Matches
nanocoap_vfs.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2022 ML!PA Consulting GmbH
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
20#ifndef NET_NANOCOAP_VFS_H
21#define NET_NANOCOAP_VFS_H
22
23#include "net/nanocoap_sock.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
39int nanocoap_vfs_get_url(const char *url, const char *dst);
40
52int nanocoap_vfs_get(nanocoap_sock_t *sock, const char *path, const char *dst);
53
66int nanocoap_vfs_put_url(const char *url, const char *src,
67 void *work_buf, size_t work_buf_len);
68
82int nanocoap_vfs_put(nanocoap_sock_t *sock, const char *path, const char *src,
83 void *work_buf, size_t work_buf_len);
84
85#ifdef __cplusplus
86}
87#endif
88#endif /* NET_NANOCOAP_VFS_H */
nanocoap high-level API
int nanocoap_vfs_put(nanocoap_sock_t *sock, const char *path, const char *src, void *work_buf, size_t work_buf_len)
Uploads the file to path via blockwise PUT.
int nanocoap_vfs_put_url(const char *url, const char *src, void *work_buf, size_t work_buf_len)
Uploads the file to url via blockwise PUT.
int nanocoap_vfs_get(nanocoap_sock_t *sock, const char *path, const char *dst)
Downloads the resource behind path via blockwise GET and stores it in the file dst.
int nanocoap_vfs_get_url(const char *url, const char *dst)
Downloads the resource behind url via blockwise GET and stores it in the file dst.
NanoCoAP socket struct.