1 /******************************************************************************
2 Copyright 2006 Palmsource, Inc (an ACCESS company).
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with this library; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 *****************************************************************************/
22 * @brief File public header for file system on top of a SQL database library
25 *****************************************************************************/
37 #include <sys/types.h>
39 #include <sys/statvfs.h>
49 /* the following struct derived from the FUSE header file
51 FUSE: Filesystem in Userspace
52 Copyright (C) 2001-2006 Miklos Szeredi <miklos@szeredi.hu>
54 This program can be distributed under the terms of the GNU LGPL.
58 * Information about open files
60 * Changed in version 2.5
62 struct fuse_file_info {
63 /** Open flags. Available in open() and release() */
66 /** Old file handle, don't use */
69 /** In case of a write operation indicates if this was caused by a
73 /** Can be filled in by open, to use direct I/O on this file.
74 Introduced in version 2.4 */
75 unsigned int direct_io : 1;
77 /** Can be filled in by open, to indicate, that cached file data
78 need not be invalidated. Introduced in version 2.4 */
79 unsigned int keep_cache : 1;
81 /** Padding. Do not use*/
82 unsigned int padding : 30;
84 /** File handle. May be filled in by filesystem in open().
85 Available in all other file operations */
90 /** Function to add an entry in a readdir() operation
92 * @param buf the buffer passed to the readdir() operation
93 * @param name the file name of the directory entry
94 * @param stat file attributes, can be NULL
95 * @param off offset of the next entry or zero
96 * @return 1 if buffer is full, zero otherwise
98 typedef int (*fuse_fill_dir_t) (void *buf, const char *name,
99 const struct stat *stbuf, off_t off);
108 #include "sqlfs_internal.h"
110 int sqlfs_init(const char *);
113 int sqlfs_fuse_main(int argc, char **argv);