/* Jungle Monkey
* Copyright (C) 1999-2001 The Regents of the University of Michigan
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/**
Jungle Monkey Multicast Search Protocol virtual file system.
This is a JMMSP handler that provides a virtual file system. It
answers queries based on files in the file system.
To use this, create a JMMSPFS and hook it up to one or more JMMSP.
Then add files to it. Remove files if they're no longer available.
*/
#ifndef _JMMSP_VFS_H
#define _JMMSP_VFS_H
#include <glib.h>
#include "jmmsp.h"
#define JMMSP_VFS_MAX_REPLIES 100
typedef struct _JMMSPVFS /* Derived from JMMSPHandler */
{
JMMSPHandler handler;
GSList* files;
} JMMSPVFS;
typedef gpointer JMMSPVFSID;
JMMSPVFS* jmmsp_vfs_new (void);
void jmmsp_vfs_delete (JMMSPVFS* vfs);
JMMSPVFSID jmmsp_vfs_add (JMMSPVFS* vfs, const gchar* name,
const GURL* url, gint length);
void jmmsp_vfs_remove (JMMSPVFS* vfs, JMMSPVFSID id);
void jmmsp_vfs_update (JMMSPVFS* vfs, JMMSPVFSID id,
const gchar* name, const GURL* url,
gint length);
/* Use jmmsp_add/remove_handler to connect/disconnect to JMMSP */
#endif /* _JMMSP_VFS_H */
syntax highlighted by Code2HTML, v. 0.9.1