source: trunk/third/gnome-vfs/libgnomevfs/gnome-vfs-standard-callbacks.h @ 17128

Revision 17128, 3.3 KB checked in by ghudson, 23 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r17127, which included commits to RCS files with non-trunk default branches.
Line 
1/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
2/*
3
4   Copyright (C) 2001 Eazel, Inc
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: Michael Fleming <mfleming@eazel.com>
22*/
23
24#ifndef GNOME_VFS_STANDARD_CALLBACKS_H
25#define GNOME_VFS_STANDARD_CALLBACKS_H
26
27#include <glib.h>
28
29/*
30 * defined callback structures
31 */
32
33/*
34 * hook name: "simple-authentication"
35 * In arg: GnomeVFSModuleCallbackAuthenticationIn *
36 * Out arg: GnomeVFSModuleCallbacAuthenticationOut *
37 *
38 * Called when access to a URI requires a username/password
39 */
40#define GNOME_VFS_MODULE_CALLBACK_AUTHENTICATION "simple-authentication"
41
42/*
43 * hook name: "http:proxy-authentication"
44 * In arg: GnomeVFSModuleCallbackAuthenticationIn *
45 * Out arg: GnomeVFSModuleCallbackAuthenticationOut *
46 *
47 * Called when access to an HTTP proxy requires a username/password
48 */
49#define GNOME_VFS_MODULE_CALLBACK_HTTP_PROXY_AUTHENTICATION "http:proxy-authentication"
50
51typedef struct {
52        char *uri;              /* Full URI of operation */
53        char *realm;            /* for HTTP auth, NULL for others */
54        gboolean previous_attempt_failed;
55                                /* TRUE if there were credentials specified
56                                 * for this request, but they resulted in
57                                 * an authorization error.
58                                 * ("you gave me the wrong pw!")
59                                 *
60                                 * FALSE if there were no credentials specified
61                                 * but they are required to continue
62                                 *
63                                 */
64        enum {
65                AuthTypeBasic,  /* Password will be transmitted unencrypted */
66                AuthTypeDigest  /* Digest is transferred, not plaintext credentials */         
67        } auth_type;
68} GnomeVFSModuleCallbackAuthenticationIn;
69
70typedef struct {
71        char *username;         /* will be freed by g_free,
72                                 * NULL indicates no auth should be provided;
73                                 * if the request requires authn, the operation
74                                 * will fail with a GNOME_VFS_ERROR_ACCESS_DENIED
75                                 * code
76                                 */
77        char *password;         /* will be freed by g_free */
78} GnomeVFSModuleCallbackAuthenticationOut;
79
80/*
81 * hook name: "status-message"
82 * In arg: GnomeVFSModuleCallbackStatusMessageIn *
83 * Out arg: GnomeVFSModuleCallbackStatusMessageOut *
84 *
85 * Called when a GnomeVFS API or module has a status message to return to
86 * the user.
87 */
88
89#define GNOME_VFS_MODULE_CALLBACK_STATUS_MESSAGE "status-message"
90
91typedef struct {
92        char *uri;              /* Full URI of operation */
93        char *message;          /* A message indicating the current state or
94                                 * NULL if there is no message */
95        int percentage;         /* Percentage indicating completeness 0-100 or
96                                 * -1 if there is no progress percentage to
97                                 * report */
98} GnomeVFSModuleCallbackStatusMessageIn;
99
100typedef struct {
101        int dummy; /* empty structs not allowed */
102} GnomeVFSModuleCallbackStatusMessageOut;
103
104#endif /* GNOME_VFS_STANDARD_CALLBACKS_H */
Note: See TracBrowser for help on using the repository browser.