1 | /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ |
---|
2 | /* gnome-vfs-context.h - context VFS modules can use to communicate with gnome-vfs proper |
---|
3 | |
---|
4 | Copyright (C) 1999 Free Software Foundation |
---|
5 | |
---|
6 | The Gnome Library is free software; you can redistribute it and/or |
---|
7 | modify it under the terms of the GNU Library General Public License as |
---|
8 | published by the Free Software Foundation; either version 2 of the |
---|
9 | License, or (at your option) any later version. |
---|
10 | |
---|
11 | The Gnome Library is distributed in the hope that it will be useful, |
---|
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
14 | Library General Public License for more details. |
---|
15 | |
---|
16 | You should have received a copy of the GNU Library General Public |
---|
17 | License along with the Gnome Library; see the file COPYING.LIB. If not, |
---|
18 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
---|
19 | Boston, MA 02111-1307, USA. |
---|
20 | |
---|
21 | Author: Havoc Pennington <hp@redhat.com> */ |
---|
22 | |
---|
23 | #ifndef GNOME_VFS_CONTEXT_H |
---|
24 | #define GNOME_VFS_CONTEXT_H |
---|
25 | |
---|
26 | #include "gnome-vfs.h" |
---|
27 | #include "gnome-vfs-private.h" |
---|
28 | |
---|
29 | GnomeVFSContext* gnome_vfs_context_new (void); |
---|
30 | void gnome_vfs_context_ref (GnomeVFSContext *ctx); |
---|
31 | void gnome_vfs_context_unref (GnomeVFSContext *ctx); |
---|
32 | |
---|
33 | /* To be really thread-safe, these need to return objects with an increased |
---|
34 | refcount; however they don't, only one thread at a time |
---|
35 | can use GnomeVFSContext */ |
---|
36 | GnomeVFSMessageCallbacks* |
---|
37 | gnome_vfs_context_get_message_callbacks (GnomeVFSContext *ctx); |
---|
38 | |
---|
39 | GnomeVFSCancellation* |
---|
40 | gnome_vfs_context_get_cancellation (GnomeVFSContext *ctx); |
---|
41 | |
---|
42 | /* returns NULL if no redirection occurred */ |
---|
43 | const gchar* gnome_vfs_context_get_redirect_uri (GnomeVFSContext *ctx); |
---|
44 | void gnome_vfs_context_set_redirect_uri (GnomeVFSContext *ctx, |
---|
45 | const gchar *uri); |
---|
46 | |
---|
47 | /* Convenience - both of these accept a NULL context object */ |
---|
48 | #define gnome_vfs_context_check_cancellation(x) (gnome_vfs_cancellation_check((x) ? gnome_vfs_context_get_cancellation((x)) : NULL)) |
---|
49 | |
---|
50 | void gnome_vfs_context_emit_message (GnomeVFSContext *ctx, |
---|
51 | const gchar* message); |
---|
52 | |
---|
53 | #endif /* GNOME_VFS_CONTEXT_H */ |
---|