Errors

Errors — error definitions and utilities

Functions

Types and Values

Includes

#include <gsignond/gsignond-error.h>

Description

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
GError* err = g_error_new(GSIGNOND_ERROR, GSIGNOND_ERROR_MISSING_DATA, "Not enough data");

Functions

gsignond_error_quark ()

GQuark
gsignond_error_quark (void);

Creates and returns a domain for GSignond errors.


gsignond_error_new_from_variant ()

GError *
gsignond_error_new_from_variant (GVariant *var);

Converts the GVariant to GError.

Parameters

var

instance of GVariant

 

Returns

GError object if successful, NULL otherwise.

[transfer full][nullable]


gsignond_error_to_variant ()

GVariant *
gsignond_error_to_variant (GError *error);

Converts the GError to GVariant.

Parameters

error

instance of GError

 

Returns

GVariant object if successful, NULL otherwise.

[transfer full][nullable]


gsignond_get_gerror_for_id()

#define             gsignond_get_gerror_for_id(err, message, args...)

A helper macro that creates a GError with the proper gsignond domain

Parameters

err

A GSignondError specifying the error

 

message

Format string for the error message

 

...

parameters for the error string

 

Types and Values

GSIGNOND_ERROR

#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() )


enum GSignondError

This enum provides a list of errors that plugins and extensions can use.

Members

GSIGNOND_ERROR_NONE

No error

 

GSIGNOND_ERROR_UNKNOWN

Catch-all for errors not distinguished by another code.

 

GSIGNOND_ERROR_INTERNAL_SERVER

Signon Daemon internal error.

 

GSIGNOND_ERROR_INTERNAL_COMMUNICATION

Communication with Signon Daemon error.

 

GSIGNOND_ERROR_PERMISSION_DENIED

The operation cannot be performed due to insufficient client permissions.

 

GSIGNOND_ERROR_ENCRYPTION_FAILURE

Failure during data encryption/decryption.

 

GSIGNOND_ERROR_AUTH_SERVICE_ERR

Placeholder to rearrange enumeration - AuthService specific

 

GSIGNOND_ERROR_METHOD_NOT_KNOWN

The method with this name is not found.

 

GSIGNOND_ERROR_SERVICE_NOT_AVAILABLE

The service is temporarily unavailable.

 

GSIGNOND_ERROR_INVALID_QUERY

Parameters for the query are invalid.

 

GSIGNOND_ERROR_IDENTITY_ERR

Placeholder to rearrange enumeration - Identity specific

 

GSIGNOND_ERROR_METHOD_NOT_AVAILABLE

The requested method is not available.

 

GSIGNOND_ERROR_IDENTITY_NOT_FOUND

The identity matching this Identity object was not found on the service.

 

GSIGNOND_ERROR_STORE_FAILED

Storing credentials failed.

 

GSIGNOND_ERROR_REMOVE_FAILED

Removing credentials failed.

 

GSIGNOND_ERROR_SIGN_OUT_FAILED

SignOut failed.

 

GSIGNOND_ERROR_IDENTITY_OPERATION_CANCELED

Identity operation was canceled by user.

 

GSIGNOND_ERROR_CREDENTIALS_NOT_AVAILABLE

Query failed.

 

GSIGNOND_ERROR_REFERENCE_NOT_FOUND

Trying to remove nonexistent reference.

 

GSIGNOND_ERROR_AUTH_SESSION_ERR

Placeholder to rearrange enumeration - AuthSession/PluginInterface specific

 

GSIGNOND_ERROR_MECHANISM_NOT_AVAILABLE

The requested mechanism is not available.

 

GSIGNOND_ERROR_MISSING_DATA

The SessionData object does not contain necessary information.

 

GSIGNOND_ERROR_INVALID_CREDENTIALS

The supplied credentials are invalid for the mechanism implementation.

 

GSIGNOND_ERROR_NOT_AUTHORIZED

Authorization failed.

 

GSIGNOND_ERROR_WRONG_STATE

An operation method has been called in a wrong state.

 

GSIGNOND_ERROR_OPERATION_NOT_SUPPORTED

The operation is not supported by the mechanism implementation.

 

GSIGNOND_ERROR_NO_CONNECTION

No Network connetion.

 

GSIGNOND_ERROR_NETWORK

Network connetion failed.

 

GSIGNOND_ERROR_SSL

Ssl connection failed.

 

GSIGNOND_ERROR_RUNTIME

Casting SessionData into subclass failed

 

GSIGNOND_ERROR_SESSION_CANCELED

Challenge was cancelled.

 

GSIGNOND_ERROR_TIMED_OUT

Challenge was timed out.

 

GSIGNOND_ERROR_USER_INTERACTION

User interaction dialog failed

 

GSIGNOND_ERROR_OPERATION_FAILED

Temporary failure in authentication.

 

GSIGNOND_ERROR_ENCRYPTION_FAILED

Failure during data encryption/decryption.

 

GSIGNOND_ERROR_TOS_NOT_ACCEPTED

User declined Terms of Service.

 

GSIGNOND_ERROR_FORGOT_PASSWORD

User requested reset password sequence.

 

GSIGNOND_ERROR_METHOD_OR_MECHANISM_NOT_ALLOWED

Method or mechanism not allowed for this identity.

 

GSIGNOND_ERROR_INCORRECT_DATE

Date time incorrect on device.

 

GSIGNOND_ERROR_USER_ERR

Placeholder to rearrange enumeration - User space specific