src/simple.h
author Tero Marttila <terom@fixme.fi>
Sat, 13 Dec 2008 20:58:27 +0200
branchnew-evsql
changeset 55 0b92d553400a
parent 6 d2036d7799fd
permissions -rw-r--r--
evsql: more improvements
terom@6
     1
#ifndef SIMPLE_H
terom@6
     2
#define SIMPLE_H
terom@6
     3
terom@6
     4
/*
terom@6
     5
 * A simple static in-memory filesystem structure.
terom@6
     6
 */
terom@6
     7
terom@8
     8
#include "evfuse.h"
terom@6
     9
terom@6
    10
/*
terom@6
    11
 * A simple file/dir.
terom@6
    12
 */
terom@6
    13
struct simple_node {
terom@6
    14
    // inode number
terom@6
    15
    fuse_ino_t inode;
terom@6
    16
terom@6
    17
    // mode
terom@6
    18
    mode_t mode_type;
terom@6
    19
    mode_t mode_perm;
terom@6
    20
terom@6
    21
    // parent node
terom@6
    22
    fuse_ino_t parent;
terom@6
    23
terom@6
    24
    // name
terom@6
    25
    const char *name;
terom@6
    26
    
terom@6
    27
    // data
terom@6
    28
    const char *data;
terom@6
    29
};
terom@6
    30
terom@6
    31
/*
terom@6
    32
 * General information.
terom@6
    33
 */
terom@6
    34
struct simple_fs;
terom@6
    35
terom@6
    36
/*
terom@6
    37
 * Initialize simple, and get the fuse_lowlevel_ops.
terom@6
    38
 */
terom@6
    39
struct fuse_lowlevel_ops *simple_init ();
terom@6
    40
terom@6
    41
/*
terom@6
    42
 * Create a new simple_fs.
terom@6
    43
 */
terom@6
    44
struct simple_fs *simple_new (const struct simple_node *node_list);
terom@6
    45
terom@6
    46
#endif /* SIMPLE_H */