Name
Standard Callbacks -- module callbacks pre-defined by gnome-vfs
Description
Some standard module callbacks are predefined. They include callbacks
for authentication, http proxy authentication, and status
messages. For each standard callback, a macro provides the name, and
structures are defined for the in and out argument.
Details
GNOME_VFS_MODULE_CALLBACK_AUTHENTICATION
#define GNOME_VFS_MODULE_CALLBACK_AUTHENTICATION "simple-authentication" |
This callback is called when access to a URI requires a username and
password.
GNOME_VFS_MODULE_CALLBACK_HTTP_PROXY_AUTHENTICATION
#define GNOME_VFS_MODULE_CALLBACK_HTTP_PROXY_AUTHENTICATION "http:proxy-authentication" |
This callback is called when access to an HTTP proxy requires a
username and password.
GnomeVFSModuleCallbackAuthenticationIn
typedef struct {
char *uri; /* Full URI of operation */
char *realm; /* for HTTP auth, NULL for others */
gboolean previous_attempt_failed;
/* TRUE if there were credentials specified
* for this request, but they resulted in
* an authorization error.
* ("you gave me the wrong pw!")
*
* FALSE if there were no credentials specified
* but they are required to continue
*
*/
enum {
AuthTypeBasic, /* Password will be transmitted unencrypted */
AuthTypeDigest /* Digest is transferred, not plaintext credentials */
} auth_type;
} GnomeVFSModuleCallbackAuthenticationIn; |
GnomeVFSModuleCallbackAuthenticationOut
typedef struct {
char *username; /* will be freed by g_free,
* NULL indicates no auth should be provided;
* if the request requires authn, the operation
* will fail with a GNOME_VFS_ERROR_ACCESS_DENIED
* code
*/
char *password; /* will be freed by g_free */
} GnomeVFSModuleCallbackAuthenticationOut; |
GNOME_VFS_MODULE_CALLBACK_STATUS_MESSAGE
#define GNOME_VFS_MODULE_CALLBACK_STATUS_MESSAGE "status-message" |
This callback is called when a GnomeVFS module operation has a status
message to return to the application.
GnomeVFSModuleCallbackStatusMessageIn
typedef struct {
char *uri; /* Full URI of operation */
char *message; /* A message indicating the current state or
* NULL if there is no message */
int percentage; /* Percentage indicating completeness 0-100 or
* -1 if there is no progress percentage to
* report */
} GnomeVFSModuleCallbackStatusMessageIn; |
GnomeVFSModuleCallbackStatusMessageOut
typedef struct {
int dummy; /* empty structs not allowed */
} GnomeVFSModuleCallbackStatusMessageOut; |