#ifndef _VFS_H_
#define _VFS_H_

typedef struct _VFSHandle VFSHandle;
struct _VFSHandle {
    gchar          *uri;
    gchar	   *filename;

    GList          *uri_list;
    gchar	   *buffer;

    gboolean	    valid;	/* We may invalidate the VFSHandle on particular occasions and refuse to process an invalid handle */
    gboolean	    need_container; /* Some transports don't need an additional container, e.g. cdda */
};

#if 0
typedef struct _VFSFileHandle VFSFileHandle;
struct _VFSFileHandle {

    gchar *uri_origin;
    gchar *uri_handle;
};
#endif

typedef gboolean (*ProcessHandleFunc) (VFSHandle *handle);
typedef void     (*HandleFreeFunc)    (VFSHandle *handle);

void
vfs_init(void);

void
vfs_stop(void);

VFSHandle*
vfs_handle_new (void);

gboolean
vfs_handle_read (VFSHandle *handle);

gboolean
vfs_handle_write (VFSHandle *handle, const gchar* container);

void
vfs_handle_free (VFSHandle *handle);

#if 0
/* URI access functions */
VFSFileHandle*
vfs_file_handle_new (const gchar *uri);
#endif

#define VFS_HANDLE_PATH(handle) (const(handle->filename_handle))
#define VFS_HANDLE_VALID(handle) (handle->valid)

#endif /* _VFS_H */
