]> git.sur5r.net Git - freertos/blob - Demo/uIP_Demo_Rowley_ARM7/uip/fs.h
First version under SVN is V4.0.1
[freertos] / Demo / uIP_Demo_Rowley_ARM7 / uip / fs.h
1 /**\r
2  * \addtogroup httpd\r
3  * @{\r
4  */\r
5 \r
6 /**\r
7  * \file\r
8  * HTTP server read-only file system header file.\r
9  * \author Adam Dunkels <adam@dunkels.com>\r
10  */\r
11  \r
12 /*\r
13  * Copyright (c) 2001, Swedish Institute of Computer Science.\r
14  * All rights reserved. \r
15  *\r
16  * Redistribution and use in source and binary forms, with or without \r
17  * modification, are permitted provided that the following conditions \r
18  * are met: \r
19  * 1. Redistributions of source code must retain the above copyright \r
20  *    notice, this list of conditions and the following disclaimer. \r
21  * 2. Redistributions in binary form must reproduce the above copyright \r
22  *    notice, this list of conditions and the following disclaimer in the \r
23  *    documentation and/or other materials provided with the distribution. \r
24  * 3. Neither the name of the Institute nor the names of its contributors \r
25  *    may be used to endorse or promote products derived from this software \r
26  *    without specific prior written permission. \r
27  *\r
28  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND \r
29  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE \r
30  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE \r
31  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE \r
32  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL \r
33  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS \r
34  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) \r
35  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT \r
36  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY \r
37  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \r
38  * SUCH DAMAGE. \r
39  *\r
40  * This file is part of the lwIP TCP/IP stack.\r
41  * \r
42  * Author: Adam Dunkels <adam@sics.se>\r
43  *\r
44  * $Id: fs.h,v 1.6.2.3 2003/10/07 13:22:27 adam Exp $\r
45  */\r
46 #ifndef __FS_H__\r
47 #define __FS_H__\r
48 \r
49 #include "uip.h"\r
50 \r
51 /**\r
52  * An open file in the read-only file system.\r
53  */\r
54 struct fs_file {\r
55   char *data;  /**< The actual file data. */\r
56   int len;     /**< The length of the file data. */\r
57 };\r
58 \r
59 /**\r
60  * Open a file in the read-only file system.\r
61  *\r
62  * \param name The name of the file.\r
63  *\r
64  * \param file The file pointer, which must be allocated by caller and\r
65  * will be filled in by the function.\r
66  */\r
67 int fs_open(const char *name, struct fs_file *file);\r
68 \r
69 #ifdef FS_STATISTICS\r
70 #if FS_STATISTICS == 1  \r
71 u16_t fs_count(char *name);\r
72 #endif /* FS_STATISTICS */\r
73 #endif /* FS_STATISTICS */\r
74 \r
75 /**\r
76  * Initialize the read-only file system.\r
77  */\r
78 void fs_init(void);\r
79 \r
80 #endif /* __FS_H__ */\r