| Top | Description |
#include <gsignond/gsignond-error.h> #define GSIGNOND_ERROR enum GSignondError; GError * gsignond_error_new_from_variant (GVariant *var); GQuark gsignond_error_quark (void); GVariant * gsignond_error_to_variant (GError *error); #define gsignond_get_gerror_for_id (err, message, ...)
This file provides GSignond error definitions and utilities. When creating an error, use GSIGNOND_ERROR for the error domain and errors from GSignondError for the error code.
1 2 |
GError* err = g_error_new(GSIGNOND_ERROR, GSIGNOND_ERROR_MISSING_DATA,
"Not enough data"); |
#define GSIGNOND_ERROR (gsignond_error_quark())
This macro should be used when creating a GError in GSignond plugins and extensions.
(for example with g_error_new() )
typedef enum {
GSIGNOND_ERROR_NONE,
GSIGNOND_ERROR_UNKNOWN = 1,
GSIGNOND_ERROR_INTERNAL_SERVER = 2,
GSIGNOND_ERROR_INTERNAL_COMMUNICATION = 3,
GSIGNOND_ERROR_PERMISSION_DENIED = 4,
GSIGNOND_ERROR_ENCRYPTION_FAILURE,
GSIGNOND_ERROR_AUTH_SERVICE_ERR = 100, /* Placeholder to rearrange enumeration - AuthService specific */
GSIGNOND_ERROR_METHOD_NOT_KNOWN,
GSIGNOND_ERROR_SERVICE_NOT_AVAILABLE,
GSIGNOND_ERROR_INVALID_QUERY,
GSIGNOND_ERROR_IDENTITY_ERR = 200, /* Placeholder to rearrange enumeration - Identity specific */
GSIGNOND_ERROR_METHOD_NOT_AVAILABLE,
GSIGNOND_ERROR_IDENTITY_NOT_FOUND,
GSIGNOND_ERROR_STORE_FAILED,
GSIGNOND_ERROR_REMOVE_FAILED,
GSIGNOND_ERROR_SIGN_OUT_FAILED,
GSIGNOND_ERROR_IDENTITY_OPERATION_CANCELED,
GSIGNOND_ERROR_CREDENTIALS_NOT_AVAILABLE,
GSIGNOND_ERROR_REFERENCE_NOT_FOUND,
GSIGNOND_ERROR_AUTH_SESSION_ERR = 300, /* Placeholder to rearrange enumeration - AuthSession/PluginInterface specific */
GSIGNOND_ERROR_MECHANISM_NOT_AVAILABLE,
GSIGNOND_ERROR_MISSING_DATA,
GSIGNOND_ERROR_INVALID_CREDENTIALS,
GSIGNOND_ERROR_NOT_AUTHORIZED,
GSIGNOND_ERROR_WRONG_STATE,
GSIGNOND_ERROR_OPERATION_NOT_SUPPORTED,
GSIGNOND_ERROR_NO_CONNECTION,
GSIGNOND_ERROR_NETWORK,
GSIGNOND_ERROR_SSL,
GSIGNOND_ERROR_RUNTIME,
GSIGNOND_ERROR_SESSION_CANCELED,
GSIGNOND_ERROR_TIMED_OUT,
GSIGNOND_ERROR_USER_INTERACTION,
GSIGNOND_ERROR_OPERATION_FAILED,
GSIGNOND_ERROR_ENCRYPTION_FAILED,
GSIGNOND_ERROR_TOS_NOT_ACCEPTED,
GSIGNOND_ERROR_FORGOT_PASSWORD,
GSIGNOND_ERROR_METHOD_OR_MECHANISM_NOT_ALLOWED,
GSIGNOND_ERROR_INCORRECT_DATE,
GSIGNOND_ERROR_USER_ERR = 400
} GSignondError;
This enum provides a list of errors that plugins and extensions can use.
| No error | |
| Catch-all for errors not distinguished by another code. | |
| Signon Daemon internal error. | |
| Communication with Signon Daemon error. | |
| The operation cannot be performed due to insufficient client permissions. | |
| Failure during data encryption/decryption. | |
| Placeholder to rearrange enumeration - AuthService specific | |
| The method with this name is not found. | |
| The service is temporarily unavailable. | |
| Parameters for the query are invalid. | |
| Placeholder to rearrange enumeration - Identity specific | |
| The requested method is not available. | |
| The identity matching this Identity object was not found on the service. | |
| Storing credentials failed. | |
| Removing credentials failed. | |
| SignOut failed. | |
| Identity operation was canceled by user. | |
| Query failed. | |
| Trying to remove nonexistent reference. | |
| Placeholder to rearrange enumeration - AuthSession/PluginInterface specific | |
| The requested mechanism is not available. | |
| The SessionData object does not contain necessary information. | |
| The supplied credentials are invalid for the mechanism implementation. | |
| Authorization failed. | |
| An operation method has been called in a wrong state. | |
| The operation is not supported by the mechanism implementation. | |
| No Network connetion. | |
| Network connetion failed. | |
| Ssl connection failed. | |
| Casting SessionData into subclass failed | |
| Challenge was cancelled. | |
| Challenge was timed out. | |
| User interaction dialog failed | |
| Temporary failure in authentication. | |
| Failure during data encryption/decryption. | |
| User declined Terms of Service. | |
| User requested reset password sequence. | |
| Method or mechanism not allowed for this identity. | |
| Date time incorrect on device. | |
| Placeholder to rearrange enumeration - User space specific |
GError * gsignond_error_new_from_variant (GVariant *var);
Converts the GVariant to GError.
GQuark gsignond_error_quark (void);
Creates and returns a domain for GSignond errors.
GVariant * gsignond_error_to_variant (GError *error);
Converts the GError to GVariant.
#define gsignond_get_gerror_for_id(err, message, args...)
A helper macro that creates a GError with the proper gsignond domain
|
A GSignondError specifying the error |
|
Format string for the error message |
|
parameters for the error string |