ftp://ftp.redhat.com/pub/redhat/linux/rawhide/SRPMS/SRPMS/gnome-vfs2-2.3.8-1.src.rpm
[gnome-vfs-httpcaptive.git] / libgnomevfs / gnome-vfs-module.h
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2 /* gnome-vfs-method.h - All the VFS bits a module needs to include in one
3    place.
4
5    Copyright (C) 1999 Free Software Foundation
6
7    The Gnome Library is free software; you can redistribute it and/or
8    modify it under the terms of the GNU Library General Public License as
9    published by the Free Software Foundation; either version 2 of the
10    License, or (at your option) any later version.
11
12    The Gnome Library is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15    Library General Public License for more details.
16
17    You should have received a copy of the GNU Library General Public
18    License along with the Gnome Library; see the file COPYING.LIB.  If not,
19    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20    Boston, MA 02111-1307, USA.
21
22    Author: Michael Meeks <michael@imaginator.com> */
23
24 #ifndef GNOME_VFS_MODULE_H
25 #define GNOME_VFS_MODULE_H
26
27 #include <libgnomevfs/gnome-vfs-method.h>
28
29 G_BEGIN_DECLS
30
31
32 /**
33  * vfs_module_init:
34  * @method_name: name of the method that invoked this module (e.g. "http", "ftp", "file").
35  * @args: not used by most modules, but potential arguments for creating the module (could
36  * be a file to point at, for example)
37  *
38  * Standard extern call implemented by each filesystem module. This is called
39  * to initialize the module and setup any basic structures / connections the
40  * method requires. It also allows the module to identify the URI method it is
41  * associated with in this instance.
42  *
43  * Return value: the module symbol table, pointing to the appropriate calls for
44  * this module.
45  **/
46 extern GnomeVFSMethod    *vfs_module_init       (const char *method_name, const char *args);
47
48 /**
49  * vfs_module_transform:
50  * @method_name: name of the method that invoked this module (e.g. "http", "ftp", "file").
51  * @args: not used by most modules, but potential arguments for creating the module (could
52  * be a file to point at, for example)
53  *
54  * Shift an already instanced module to a new method name. This call is not implemented
55  * by most modules and is optional.
56  *
57  * Return value: the module symbol table, pointing to the appropriate calls for
58  * this module.
59  **/
60 extern GnomeVFSTransform *vfs_module_transform  (const char *method_name, const char *args);
61
62 /**
63  * vfs_module_shutdown:
64  * @method: the symbol table of the module being shut down
65  *
66  * Called to tell a module to end any active operations, free all used memory,
67  * and close any connections (as appropriate) or resources.
68  *
69  **/
70 extern void               vfs_module_shutdown   (GnomeVFSMethod *method);
71
72 G_END_DECLS
73
74 #endif /* GNOME_VFS_MODULE_H */