From a55679224f9ce3f978393c9c19f3b12a6585a6ee Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Wed, 12 Jan 2022 22:14:41 +0100 Subject: [PATCH] fs: move prototypes required to implement custom files as fs addon to header --- src/apps/http/fs.c | 14 -------------- src/include/lwip/apps/fs.h | 13 +++++++++++++ 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/apps/http/fs.c b/src/apps/http/fs.c index c5af0769..e12e314e 100644 --- a/src/apps/http/fs.c +++ b/src/apps/http/fs.c @@ -38,20 +38,6 @@ #include HTTPD_FSDATA_FILE -/*-----------------------------------------------------------------------------------*/ - -#if LWIP_HTTPD_CUSTOM_FILES -int fs_open_custom(struct fs_file *file, const char *name); -void fs_close_custom(struct fs_file *file); -#if LWIP_HTTPD_FS_ASYNC_READ -u8_t fs_canread_custom(struct fs_file *file); -u8_t fs_wait_read_custom(struct fs_file *file, fs_wait_cb callback_fn, void *callback_arg); -int fs_read_async_custom(struct fs_file *file, char *buffer, int count, fs_wait_cb callback_fn, void *callback_arg); -#else /* LWIP_HTTPD_FS_ASYNC_READ */ -int fs_read_custom(struct fs_file *file, char *buffer, int count); -#endif /* LWIP_HTTPD_FS_ASYNC_READ */ -#endif /* LWIP_HTTPD_CUSTOM_FILES */ - /*-----------------------------------------------------------------------------------*/ err_t fs_open(struct fs_file *file, const char *name) diff --git a/src/include/lwip/apps/fs.h b/src/include/lwip/apps/fs.h index 5aa7d18f..82b219a9 100644 --- a/src/include/lwip/apps/fs.h +++ b/src/include/lwip/apps/fs.h @@ -119,6 +119,19 @@ struct fsdata_file { #endif /* HTTPD_PRECALCULATED_CHECKSUM */ }; +#if LWIP_HTTPD_CUSTOM_FILES +/* Prototypes required to implement custom files as fs addon */ +int fs_open_custom(struct fs_file *file, const char *name); +void fs_close_custom(struct fs_file *file); +#if LWIP_HTTPD_FS_ASYNC_READ +u8_t fs_canread_custom(struct fs_file *file); +u8_t fs_wait_read_custom(struct fs_file *file, fs_wait_cb callback_fn, void *callback_arg); +int fs_read_async_custom(struct fs_file *file, char *buffer, int count, fs_wait_cb callback_fn, void *callback_arg); +#else /* LWIP_HTTPD_FS_ASYNC_READ */ +int fs_read_custom(struct fs_file *file, char *buffer, int count); +#endif /* LWIP_HTTPD_FS_ASYNC_READ */ +#endif /* LWIP_HTTPD_CUSTOM_FILES */ + #ifdef __cplusplus } #endif