[270] | 1 | /*
|
---|
| 2 | * TOPPERS ECHONET Lite Communication Middleware
|
---|
| 3 | *
|
---|
| 4 | * Copyright (C) 2017 Cores Co., Ltd. Japan
|
---|
| 5 | *
|
---|
| 6 | * ãLì ÒÍCȺÌ(1)`(4)Ìðð½·êÉÀèC{\tgEF
|
---|
| 7 | * Ai{\tgEFAðüϵ½àÌðÜÞDȺ¯¶jðgpE¡»Eü
|
---|
| 8 | * ÏEÄzziȺCpÆÄÔj·é±Æð³Åø·éD
|
---|
| 9 | * (1) {\tgEFAð\[XR[hÌ`Åp·éêÉÍCãLÌì
|
---|
| 10 | * \¦C±Ìpð¨æѺL̳ÛØKèªC»ÌÜÜÌ`Å\[
|
---|
| 11 | * XR[hÉÜÜêÄ¢é±ÆD
|
---|
| 12 | * (2) {\tgEFAðCCu`®ÈÇC¼Ì\tgEFAJÉg
|
---|
| 13 | * pÅ«é`ÅÄzz·éêÉÍCÄzzɺ¤hL
|
---|
| 14 | gip
|
---|
| 15 | * Ò}j
|
---|
| 16 | AÈÇjÉCãLÌì \¦C±Ìpð¨æѺL
|
---|
| 17 | * ̳ÛØKèðfÚ·é±ÆD
|
---|
| 18 | * (3) {\tgEFAðC@íÉgÝÞÈÇC¼Ì\tgEFAJÉg
|
---|
| 19 | * pÅ«È¢`ÅÄzz·éêÉÍCÌ¢¸ê©Ìðð½·±
|
---|
| 20 | * ÆD
|
---|
| 21 | * (a) Äzzɺ¤hL
|
---|
| 22 | gipÒ}j
|
---|
| 23 | AÈÇjÉCãLÌ
|
---|
| 24 | * ì \¦C±Ìpð¨æѺL̳ÛØKèðfÚ·é±ÆD
|
---|
| 25 | * (b) ÄzzÌ`ÔðCÊÉèßéû@ÉæÁÄCTOPPERSvWFNgÉ
|
---|
| 26 | * ñ·é±ÆD
|
---|
| 27 | * (4) {\tgEFAÌpÉæè¼ÚIܽÍÔÚIɶ¶é¢©Èé¹
|
---|
| 28 | * Q©çàCãLì Ò¨æÑTOPPERSvWFNgðÆÓ·é±ÆD
|
---|
| 29 | * ܽC{\tgEFAÌ[UܽÍGh[U©çÌ¢©Èé
|
---|
| 30 | * RÉîÿ©çàCãLì Ò¨æÑTOPPERSvWFNgð
|
---|
| 31 | * ÆÓ·é±ÆD
|
---|
| 32 | *
|
---|
| 33 | * {\tgEFAÍC³ÛØÅñ³êÄ¢éàÌÅ éDãLì Ò¨
|
---|
| 34 | * æÑTOPPERSvWFNgÍC{\tgEFAÉÖµÄCÁèÌgpÚI
|
---|
| 35 | * ÉηéK«àÜßÄC¢©ÈéÛØàsíÈ¢DܽC{\tgEF
|
---|
| 36 | * AÌpÉæè¼ÚIܽÍÔÚIɶ¶½¢©Èé¹QÉÖµÄàC»
|
---|
| 37 | * ÌÓCðíÈ¢D
|
---|
| 38 | *
|
---|
| 39 | * @(#) $Id: httpd-fs.h 270 2017-02-09 04:03:47Z coas-nagasima $
|
---|
| 40 | */
|
---|
| 41 | #ifndef __HTTPD_FS_H__
|
---|
| 42 | #define __HTTPD_FS_H__
|
---|
| 43 |
|
---|
| 44 | #define HTTPD_FS_STATISTICS 0
|
---|
| 45 |
|
---|
| 46 | struct httpd_fs_file {
|
---|
| 47 | int pos;
|
---|
| 48 | int len;
|
---|
| 49 | const char *name;
|
---|
| 50 | int redirect;
|
---|
| 51 | char fd[64/*sizeof(FIL)*/];
|
---|
| 52 | };
|
---|
| 53 |
|
---|
| 54 | /* file must be allocated by caller and will be filled in
|
---|
| 55 | by the function. */
|
---|
| 56 | int httpd_fs_open(char *name, int len, struct httpd_fs_file *file);
|
---|
| 57 | int httpd_fs_create(char *name, struct httpd_fs_file *file);
|
---|
| 58 | int httpd_fs_read(struct httpd_fs_file *file, void *dst, int len);
|
---|
| 59 | int httpd_fs_write(struct httpd_fs_file *file, const void *src, int len);
|
---|
| 60 | int httpd_fs_close(struct httpd_fs_file *file);
|
---|
| 61 |
|
---|
| 62 | #ifdef HTTPD_FS_STATISTICS
|
---|
| 63 | #if HTTPD_FS_STATISTICS == 1
|
---|
| 64 | uint16_t httpd_fs_count(char *name);
|
---|
| 65 | #endif /* HTTPD_FS_STATISTICS */
|
---|
| 66 | #endif /* HTTPD_FS_STATISTICS */
|
---|
| 67 |
|
---|
| 68 | void httpd_fs_init(void);
|
---|
| 69 |
|
---|
| 70 | #endif /* __HTTPD_FS_H__ */
|
---|