Top |
gnome-vfs-standard-callbacksgnome-vfs-standard-callbacks — standard callbacks for use by gnome-vfs module writers |
#define GNOME_VFS_MODULE_CALLBACK_FILL_AUTHENTICATION "fill-authentication"
A module callback name used together with gnome_vfs_module_callback_invoke()
to
ask the keyring manager for login data. It is expected to return stored or cached
login data, but may not query the user.
The login data consists of a username, a password and a domain, and is used to access a resource. If the data is not suitable for accessing the resource, the GnomeVFSModule typically issues a GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION module callback to query the user right after the authentication failed.
|
A GnomeVFSModuleCallbackFillAuthenticationIn * passed to the application, specifying the authentication request. The application will usually proxy this request to the keyring manager of the desktop environment, but it can also handle the request itself. |
|
A GnomeVFSModuleCallbackFillAuthenticationOut * passing the cached keyring data (i.e. username/password etc.) back to the module. Usually, this is data that was stored using GNOME_VFS_MODULE_CALLBACK_SAVE_AUTHENTICATION, and is either stored permanently on disk or cached. |
typedef struct { char *uri; char *protocol; char *server; char *object; int port; char *authtype; char *username; char *domain; } GnomeVFSModuleCallbackFillAuthenticationIn;
A pointer to a GnomeVFSModuleCallbackFillAuthenticationIn structure is passed to the GNOME_VFS_MODULE_CALLBACK_FILL_AUTHENTICATION callback, and informs the application about the authentication parameters that should be requested from the user.
The GNOME_VFS_MODULE_CALLBACK_FILL_AUTHENTICATION application callback will then set the members of a pointer to a GnomeVFSModuleCallbackFillAuthenticationOut structure according to the stored or cached data.
The textual URI of the resource that requires authentication. |
||
One of the protocols supported by the invoking module.
Typically matches |
||
The server that contains the resource that requires authentication.
Typically matches |
||
The type of the resource that requires authentication. |
||
The port that was used to connect to |
||
The type of authentication that was requested. For the HTTP method, this may be "basic" or "proxy". For the SFTP method, this may be "publickey" or "password". |
||
The username that was used to connect to |
||
The domain that |
typedef struct { gboolean valid; char *username; char *domain; char *password; } GnomeVFSModuleCallbackFillAuthenticationOut;
A pointer to a GnomeVFSModuleCallbackFillAuthenticationOut structure is passed to the GNOME_VFS_MODULE_CALLBACK_FILL_AUTHENTICATION callback, and informs the module about the authentication parameters that were found in the cache or permanently stored.
The login data returned by GNOME_VFS_MODULE_CALLBACK_FILL_AUTHENTICATION was usually previously stored using #GNOME_VFS_MODULE_CALLBACK_SAVE_AUTHENTICATION.
gboolean |
Whether stored or cached login data was found for the resource referenced by the GnomeVFSModuleCallbackFillAuthenticationIn structure. |
|
The cached username that should be used to access the resource.
This will be freed by the module when it isn't needed any longer. May only
be set if |
||
The cached domain that should be used to access the resource.
This will be freed by the module when it isn't needed any longer. May only
be set if |
||
The cached password that should be used to access the resource.
This will be freed by the module when it isn't needed any longer. May only
be set if |
#define GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION "full-authentication"
A module callback name used together with gnome_vfs_module_callback_invoke()
to
ask the user for login data. This includes username and password, but also
special login choices like anonymous login.
|
A GnomeVFSModuleCallbackFullAuthenticationIn * passed to the application, specifying the authentication request. |
|
A GnomeVFSModuleCallbackFullAuthenticationOut * passing the user's provided authentication data (i.e. his username/password etc.) back to the module. |
These flags will be passed to the GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION callback, as part of the GnomeVFSModuleCallbackFullAuthenticationIn structure. The output data will be stored in a GnomeVFSModuleCallbackFullAuthenticationOut structure.
GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION_PREVIOUS_ATTEMPT_FAILED |
This is not the first login attempt, i.e. this callback was already invoked but the provided login data was not suitable for a successful login. |
|
The application should ask the user for
a password and set the |
||
The application should ask the user for
a username and set the |
||
The application should ask the user for
a domain and set the |
||
GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION_SAVING_SUPPORTED |
The application may ask the user
whether he wants to save the password. If this flag is not present, or the user does not want to
save the password, the application must set the |
|
GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION_ANON_SUPPORTED |
The application
should offer the user a choice to login anonymously (used for example by the FTP module).
If the user requests anonymous login, GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION_OUT_ANON_SELECTED
must be set in the |
typedef struct { GnomeVFSModuleCallbackFullAuthenticationFlags flags; char *uri; char *protocol; char *server; char *object; int port; char *authtype; char *username; char *domain; /* for pre-filling the dialog */ char *default_user; char *default_domain; } GnomeVFSModuleCallbackFullAuthenticationIn;
A pointer to a GnomeVFSModuleCallbackFullAuthenticationIn structure is passed to the GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION callback, and informs the application about the authentication parameters that should be requested from the user.
The GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION application callback will then set the members of a pointer to a GnomeVFSModuleCallbackFullAuthenticationOut structure according to the user input.
GnomeVFSModuleCallbackFullAuthenticationFlags influencing the user query. |
||
The textual URI of the resource that requires authentication. |
||
One of the protocols supported by the invoking module. Typically matches |
||
The server that contains the resource that requires authentication. Typically matches |
||
The type of the resource that requires authentication. |
||
The port that was used to connect to |
||
The type of authentication that was requested. For the HTTP method, this may be "basic" or "proxy". For the SFTP method, this may be "publickey" or "password". |
||
The username that was used to connect to |
||
The domain that |
||
The username that should be provided to the user by default.
Typically matches |
||
The domain that should be provided to the user by default.
Typically matches |
typedef struct { gboolean abort_auth; char *username; char *domain; char *password; gboolean save_password; char *keyring; gsize out_flags; } GnomeVFSModuleCallbackFullAuthenticationOut;
A pointer to a GnomeVFSModuleCallbackFullAuthenticationOut structure is passed to the GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION callback, and informs the module about the authentication parameters that the user provided by setting the respective fields according to the user input and the passed-in GnomeVFSModuleCallbackFullAuthenticationIn pointer.
gboolean |
Whether the user somehow cancelled the login process. The application is expected to offer the user a cancellation point during the authentication query. In a graphical user interface, this is typically achieved by providing a "Cancel" button. |
|
The user-provided username that should be used to access the resource referenced by GnomeVFSModuleCallbackFullAuthenticationIn. This will be freed by the module when it isn't needed any longer. Must not be set if the GnomeVFSModuleCallbackFullAuthenticationFlags don't contain GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION_NEED_USERNAME. |
||
The user-provided domain that should be used to access the resource referenced by GnomeVFSModuleCallbackFullAuthenticationIn. This will be freed by the module when it isn't needed any longer. Must not be set if the GnomeVFSModuleCallbackFullAuthenticationFlags don't contain GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION_NEED_DOMAIN. |
||
The user-provided password that should be used to access the resource referenced by GnomeVFSModuleCallbackFullAuthenticationIn. This will be freed by the module when it isn't needed any longer. Must not be set if the GnomeVFSModuleCallbackFullAuthenticationFlags don't contain GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION_NEED_PASSOWRD. |
||
gboolean |
Flags whether the user requested to save the provided login
data. Must be |
|
Flags which keyring should be used to save the password. This will
later be passed to the GNOME_VFS_MODULE_CALLBACK_SAVE_AUTHENTICATION callback
if the login attempt was successful with the specified |
||
GnomeVFSModuleCallbackFullAuthenticationOutFlags signalling a special request, for instance anonymous access to an FTP server. |
These flags will be passed from a GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION callback back to the module, as part of the GnomeVFSModuleCallbackFullAuthenticationOut structure.
GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION_OUT_ANON_SELECTED |
Anonymous login requested. May only be set if the GnomeVFSModuleCallbackFullAuthenticationIn's GnomeVFSModuleCallbackFullAuthenticationFlags contain GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION_ANON_SUPPORTED. |
#define GNOME_VFS_MODULE_CALLBACK_SAVE_AUTHENTICATION "save-authentication"
A module callback name used together with gnome_vfs_module_callback_invoke()
to
request permanent or temporary storage of login data. The storage is typically
done using a keyring manager.
Called after a successfull authentication, to allow the client to e.g. store the password for future use. It may be queried again within the current session (temporary storage) or in future sessions (permanent storage) using GNOME_VFS_MODULE_CALLBACK_FILL_AUTHENTICATION.
This is typically called after the user provided login data with GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION.
|
A GnomeVFSModuleCallbackSaveAuthenticationIn * specifying the login data. |
|
A GnomeVFSModuleCallbackSaveAuthenticationOut * (unused). |
typedef struct { char *keyring; char *uri; char *protocol; char *server; char *object; int port; char *authtype; char *username; char *domain; char *password; } GnomeVFSModuleCallbackSaveAuthenticationIn;
A GnomeVFSModuleCallbackSaveAuthenticatioIn pointer is passed to a GNOME_VFS_MODULE_CALLBACK_SAVE_AUTHENTICATION application callback, and specifies the login data that should be stored permanently on disk or temporarily cached.
This data may be queried in future sessions (permanent storage) or within the current session (temporary storage) using GNOME_VFS_MODULE_CALLBACK_FILL_AUTHENTICATION.
Keyring provided by GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION callback. |
||
The textual URI of the resource that is accessed. |
||
One of the protocols supported by the invoking module.
Typically matches |
||
The server that contains the resource that is accessed.
Typically matches |
||
The type of the resource that is accessed. |
||
The port that was used to connect to |
||
The type of authentication that was requested. For the HTTP method, this may be "basic" or "proxy". For the SFTP method, this may be "publickey" or "password". |
||
The username that was used to connect to |
||
The domain that |
||
The password that was used to connect to |
typedef struct { } GnomeVFSModuleCallbackSaveAuthenticationOut;
A GnomeVFSModuleCallbackSaveAuthenticationOut pointer is passed to a GNOME_VFS_MODULE_CALLBACK_SAVE_AUTHENTICATION application callback, and is reserved for future use. Applications are not expected to modify this data, because its interpretation might change in the future.
#define GNOME_VFS_MODULE_CALLBACK_QUESTION "ask-question"
GNOME_VFS_MODULE_CALLBACK_QUESTION
is deprecated and should not be used in newly-written code.
A module callback name used together with gnome_vfs_module_callback_invoke()
to
ask the user a question.
Called when access to a URI requires the user to make a choice.
|
A GnomeVFSModuleCallbackFullAuthenticationIn * passed to the application, |
|
specifying the proxy authentication request. A GnomeVFSModuleCallbackFullAuthenticationOut * passing the user's provided proxy authentication data (i.e. his username/password) back to the module. |
typedef struct { char *primary_message; char *secondary_message; char **choices; } GnomeVFSModuleCallbackQuestionIn;
A GnomeVFSModuleCallbackQuestionIn pointer is passed to a GNOME_VFS_MODULE_CALLBACK_QUESTION application callback. Applications are expected to request a decision from the user, and store the answer in a GnomeVFSModuleCallbackQuestionOut structure.
A short message explaining the question to the user,
or |
||
The long version of the message, containing more
details, or |
||
|
typedef struct { int answer; } GnomeVFSModuleCallbackQuestionOut;
A GnomeVFSModuleCallbackQuestionOut pointer is passed to a GNOME_VFS_MODULE_CALLBACK_QUESTION application callback, and is used by applications to store the user's decision.
The index of the answer the user picked. Matches the base
pointer address of the user's choice in GnomeVFSModuleCallbackQuestionIn,
i.e. its index in choices, where the first choice has index |
#define GNOME_VFS_MODULE_CALLBACK_STATUS_MESSAGE "status-message"
A module callback name used together with gnome_vfs_module_callback_invoke()
to
inform the user about an ongoing operation.
Called when a GnomeVFSModule has a status message to return to the user.
|
A GnomeVFSModuleCallbackStatusMessageIn * containing the message to present to the user. |
|
A GnomeVFSModuleCallbackStatusMessageOut * (not used). |
typedef struct { char *uri; char *message; int percentage; } GnomeVFSModuleCallbackStatusMessageIn;
A GnomeVFSModuleCallbackStatusMessageIn pointer is passed to a GNOME_VFS_MODULE_CALLBACK_STATUS_MESSAGE application callback, to inform it about the progress and/or status of an ongoing operation.
The textual URI the status message refers to. |
||
The message the application should display to the user,
indicating the current state, or it is |
||
The percentage indicating the completeness of
a currently pending operation on |
typedef struct { /* empty structs not allowed */ int dummy; } GnomeVFSModuleCallbackStatusMessageOut;
A GnomeVFSModuleCallbackStatusMessageOut pointer is passed to a GNOME_VFS_MODULE_CALLBACK_STATUS_MESSAGE application callback, and is reserved for future use. Applications are not expected to modify this data, because its interpretation might change in the future.
#define GNOME_VFS_MODULE_CALLBACK_HTTP_SEND_ADDITIONAL_HEADERS "http:send-additional-headers"
GNOME_VFS_MODULE_CALLBACK_HTTP_SEND_ADDITIONAL_HEADERS
is deprecated and should not be used in newly-written code.
A module callback name used together with gnome_vfs_module_callback_invoke()
to
request additional HTTP headers.
Called before sending headers to an HTTP server. Client applications can add additional headers.
|
A GnomeVFSModuleCallbackAdditionalHeadersIn * identifying the resource. |
|
A GnomeVFSModuleCallbackAdditionalHeadersOut * allowing to add headers to the request. |
typedef struct { GnomeVFSURI *uri; } GnomeVFSModuleCallbackAdditionalHeadersIn;
A GnomeVFSModuleCallbackAdditionalHeadersIn pointer is passed to a GNOME_VFS_MODULE_CALLBACK_HTTP_SEND_ADDITIONAL_HEADERS application callback, to inform it about a pending HTTP request and allow it to add additional headers.
typedef struct { GList *headers; } GnomeVFSModuleCallbackAdditionalHeadersOut;
A GnomeVFSModuleCallbackAdditionalHeadersOut pointer is passed to a GNOME_VFS_MODULE_CALLBACK_HTTP_SEND_ADDITIONAL_HEADERS application callback, to store the headers the application wants to add to a pending HTTP request.
#define GNOME_VFS_MODULE_CALLBACK_HTTP_RECEIVED_HEADERS "http:received-headers"
A module callback name used together with gnome_vfs_module_callback_invoke()
to
inform an application about the delivery of a HTTP request.
GNOME_VFS_MODULE_CALLBACK_HTTP_RECEIVED_HEADERS is called after receiving HTTP headers from a server that belonged to a HTTP request that was issued by the application and allows the application to analyze the returned headers.
|
A GnomeVFSModuleCallbackReceivedHeadersIn *. |
|
A GnomeVFSModuleCallbackReceivedHeadersOut * (not used). |
typedef struct { GnomeVFSURI *uri; GList *headers; } GnomeVFSModuleCallbackReceivedHeadersIn;
A GnomeVFSModuleCallbackReceivedHeadersIn pointer is passed to a GNOME_VFS_MODULE_CALLBACK_HTTP_RECEIVED_HEADERS application callback, to inform it about a delivered HTTP request and allow it to analyze the returned headers.
GnomeVFSURI * |
A GnomeVFSURI identifying the resource of the currently delivered request. |
|
GList * |
A GList of strings, each of them is a header that was received when
delivering the HTTP request. |
typedef struct { int dummy; } GnomeVFSModuleCallbackReceivedHeadersOut;
A GnomeVFSModuleCallbackReceivedHeadersOut pointer is passed to a GNOME_VFS_MODULE_CALLBACK_HTTP_RECEIVED_HEADERS application callback, and is reserved for future use. Applications are not expected to modify this data, because its interpretation might change in the future.
#define GNOME_VFS_MODULE_CALLBACK_AUTHENTICATION "simple-authentication"
GNOME_VFS_MODULE_CALLBACK_AUTHENTICATION
is deprecated and should not be used in newly-written code.
Modules should use GNOME_VFS_MODULE_CALLBACK_FILL_AUTHENTICATION and GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION.
A module callback name formerly used together with gnome_vfs_module_callback_invoke()
.
Formerly called when access to a URI requires a username/password.
|
A GnomeVFSModuleCallbackAuthenticationIn *. |
|
A GnomeVFSModuleCallbackAuthenticationOut *. |
#define GNOME_VFS_MODULE_CALLBACK_HTTP_PROXY_AUTHENTICATION "http:proxy-authentication"
GNOME_VFS_MODULE_CALLBACK_HTTP_PROXY_AUTHENTICATION
is deprecated and should not be used in newly-written code.
Proxy authentication now works desktop-wide through GConf.
A module callback name formerly used together with gnome_vfs_module_callback_invoke()
to ask the user for HTTP proxy login data. It works exactly like
GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION, and used to be kept separate to
allow applications to distinguish proxy authentication from actual server
authentication, so that the wording of the interface could be adapted.
Formerly called when access to an HTTP proxy required a username/password.
|
A GnomeVFSModuleCallbackAuthenticationIn *. |
|
A GnomeVFSModuleCallbackAuthenticationOut *. |
GnomeVFSModuleCallbackAuthenticationAuthType
is deprecated and should not be used in newly-written code.
Modules should use GNOME_VFS_MODULE_CALLBACK_FILL_AUTHENTICATION and GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION.
This defines the possible values of the GnomeVFSModuleCallbackAuthenticationIn's
auth_type
field.
typedef struct { char *uri; char *realm; gboolean previous_attempt_failed; GnomeVFSModuleCallbackAuthenticationAuthType auth_type; } GnomeVFSModuleCallbackAuthenticationIn;
GnomeVFSModuleCallbackAuthenticationIn
is deprecated and should not be used in newly-written code.
Modules should use GNOME_VFS_MODULE_CALLBACK_FILL_AUTHENTICATION and GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION.
A pointer to a GnomeVFSModuleCallbackAuthenticationIn structure that used to be passed to the GNOME_VFS_MODULE_CALLBACK_AUTHENTICATION callback, and informed the application about the authentication parameters that should be requested.
The textual URI of the resource that requires authentication. |
||
"auth" for HTTP, |
||
gboolean |
|
|
GnomeVFSModuleCallbackAuthenticationAuthType |
Whether the login data will be transmitted in plaintext or encrypted. |
typedef struct { char *username; char *password; } GnomeVFSModuleCallbackAuthenticationOut;
GnomeVFSModuleCallbackAuthenticationOut
is deprecated and should not be used in newly-written code.
Modules should use GNOME_VFS_MODULE_CALLBACK_FILL_AUTHENTICATION and GNOME_VFS_MODULE_CALLBACK_FULL_AUTHENTICATION.
A pointer to a GnomeVFSModuleCallbackAuthenticationOut structure that used to be passed to the GNOME_VFS_MODULE_CALLBACK_AUTHENTICATION callback, and was used to pass the login data back to the module.
The username that should be used to access the resource
referenced by GnomeVFSModuleCallbackFullAuthenticationIn, or |
||
The password that should be used to access the resource referenced by GnomeVFSModuleCallbackFullAuthenticationIn. This will be freed by the module when it isn't needed any longer. |