nanocoap_vfs.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2022 ML!PA Consulting GmbH
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
20 #include "net/nanocoap_sock.h"
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
36 int nanocoap_vfs_get_url(const char *url, const char *dst);
37 
49 int nanocoap_vfs_get(nanocoap_sock_t *sock, const char *path, const char *dst);
50 
63 int nanocoap_vfs_put_url(const char *url, const char *src,
64  void *work_buf, size_t work_buf_len);
65 
79 int nanocoap_vfs_put(nanocoap_sock_t *sock, const char *path, const char *src,
80  void *work_buf, size_t work_buf_len);
81 
82 #ifdef __cplusplus
83 }
84 #endif
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.