typedef enum {
GSIGNOND_ERROR_NONE,
- GSIGNOND_ERROR_UNKNOWN = 1, /**< Catch-all for errors not distinguished
- by another code. */
+ GSIGNOND_ERROR_UNKNOWN = 1, /**< Catch-all for errors not distinguished by another code. */
GSIGNOND_ERROR_INTERNAL_SERVER = 2, /**< Signon Daemon internal error. */
- GSIGNOND_ERROR_INTERNAL_COMMUNICATION = 3, /**< Communication with Signon Daemon
- error. */
- GSIGNOND_ERROR_PERMISSION_DENIED = 4, /**< The operation cannot be performed due to
- insufficient client permissions. */
- GSIGNOND_ERROR_ENCRYPTION_FAILURE, /**< Failure during data
- encryption/decryption. */
- GSIGNOND_ERROR_AUTH_SERVICE_ERR = 100, /* 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 = 200, /* Placeholder to rearrange enumeration
- - Identity specific */
+ GSIGNOND_ERROR_INTERNAL_COMMUNICATION = 3, /**< Communication with Signon Daemon error. */
+ GSIGNOND_ERROR_PERMISSION_DENIED = 4, /**< The operation cannot be performed due to insufficient client permissions. */
+ GSIGNOND_ERROR_ENCRYPTION_FAILURE, /**< Failure during data encryption/decryption. */
+
+ GSIGNOND_ERROR_AUTH_SERVICE_ERR = 100, /* 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 = 200, /* 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_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_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 = 300, /* Placeholder to rearrange enumeration
- - AuthSession/AuthPluginInterface
- 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_REFERENCE_NOT_FOUND, /**< Trying to remove nonexistent reference. */
+
+ GSIGNOND_ERROR_AUTH_SESSION_ERR = 300, /* 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_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_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, /**< @deprecated 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_ENCRYPTION_FAILED, /**< @deprecated 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 = 400 /* Placeholder to rearrange enumeration
- - User space specific */
+
+ GSIGNOND_ERROR_USER_ERR = 400 /* Placeholder to rearrange enumeration - User space specific */
} GSignondError;
GString*
gsignond_prepend_domain_to_error_msg (const GError *err);
+#define gsignond_get_gerror_for_id(err, message, args...) \
+ g_error_new (gsignond_error_quark(), err, message, ##args);
+
G_END_DECLS
#endif /* __GSIGNOND_ERROR_H__ */
* 02110-1301 USA
*/
+#include "gsignond/gsignond-error.h"
#include <string.h>
+#include <gio/gio.h>
-#include "gsignond/gsignond-error.h"
+#define _ERROR_PREFIX "com.google.code.AccountsSSO.gSingleSignOn.Error"
+
+GDBusErrorEntry _gsignond_errors[] =
+{
+ {GSIGNOND_ERROR_UNKNOWN, _ERROR_PREFIX".Unknown"},
+ {GSIGNOND_ERROR_INTERNAL_SERVER, _ERROR_PREFIX".InternalServerError"},
+ {GSIGNOND_ERROR_INTERNAL_COMMUNICATION, _ERROR_PREFIX".InternalCommunicationError"},
+ {GSIGNOND_ERROR_PERMISSION_DENIED, _ERROR_PREFIX".PermissionDenied"},
+ {GSIGNOND_ERROR_ENCRYPTION_FAILURE, _ERROR_PREFIX".EncryptionFailure"},
+
+ {GSIGNOND_ERROR_METHOD_NOT_KNOWN, _ERROR_PREFIX".MethodNotKnown"},
+ {GSIGNOND_ERROR_SERVICE_NOT_AVAILABLE, _ERROR_PREFIX".ServiceNotAvailable"},
+ {GSIGNOND_ERROR_INVALID_QUERY, _ERROR_PREFIX".InvalidQuery"},
+
+ {GSIGNOND_ERROR_METHOD_NOT_AVAILABLE, _ERROR_PREFIX".MethodNotAvailable"},
+ {GSIGNOND_ERROR_IDENTITY_NOT_FOUND, _ERROR_PREFIX".IdentityNotFound"},
+ {GSIGNOND_ERROR_STORE_FAILED, _ERROR_PREFIX".IdentityStoreFailed"},
+ {GSIGNOND_ERROR_REMOVE_FAILED, _ERROR_PREFIX".IdentityRemoveFailed"},
+ {GSIGNOND_ERROR_SIGN_OUT_FAILED, _ERROR_PREFIX".SignOutFailed"},
+ {GSIGNOND_ERROR_IDENTITY_OPERATION_CANCELED, _ERROR_PREFIX".OperationCancled"},
+ {GSIGNOND_ERROR_CREDENTIALS_NOT_AVAILABLE, _ERROR_PREFIX".CredentialsNotAvailable"},
+ {GSIGNOND_ERROR_REFERENCE_NOT_FOUND, _ERROR_PREFIX".ReferenceNotFound"},
+
+ {GSIGNOND_ERROR_MECHANISM_NOT_AVAILABLE, _ERROR_PREFIX".MechanismNotAvailable"},
+ {GSIGNOND_ERROR_MISSING_DATA, _ERROR_PREFIX".MissingData"},
+ {GSIGNOND_ERROR_INVALID_CREDENTIALS, _ERROR_PREFIX".InvalidCredentials"},
+ {GSIGNOND_ERROR_NOT_AUTHORIZED, _ERROR_PREFIX".NotAutherized"},
+ {GSIGNOND_ERROR_WRONG_STATE, _ERROR_PREFIX".WrongState"},
+ {GSIGNOND_ERROR_OPERATION_NOT_SUPPORTED, _ERROR_PREFIX".OperationNotSupported"},
+ {GSIGNOND_ERROR_NO_CONNECTION, _ERROR_PREFIX".NoConnection"},
+ {GSIGNOND_ERROR_NETWORK, _ERROR_PREFIX".NoNetwork"},
+ {GSIGNOND_ERROR_SSL, _ERROR_PREFIX".SSLError"},
+ {GSIGNOND_ERROR_RUNTIME, _ERROR_PREFIX".RuntimeError"},
+ {GSIGNOND_ERROR_SESSION_CANCELED, _ERROR_PREFIX".Cancled"},
+ {GSIGNOND_ERROR_TIMED_OUT, _ERROR_PREFIX".TimedOut"},
+ {GSIGNOND_ERROR_USER_INTERACTION, _ERROR_PREFIX".UserInteractionFailed"},
+ {GSIGNOND_ERROR_OPERATION_FAILED, _ERROR_PREFIX".OperationFailed"},
+ {GSIGNOND_ERROR_ENCRYPTION_FAILED, _ERROR_PREFIX".EncryptionFailed"},
+ {GSIGNOND_ERROR_TOS_NOT_ACCEPTED, _ERROR_PREFIX".TOSNotAccepted"},
+
+ {GSIGNOND_ERROR_FORGOT_PASSWORD, _ERROR_PREFIX".ForgotPassword"},
+ {GSIGNOND_ERROR_METHOD_OR_MECHANISM_NOT_ALLOWED, _ERROR_PREFIX".MethodOrMechanismNotAllowed"},
+ {GSIGNOND_ERROR_INCORRECT_DATE, _ERROR_PREFIX".IncorrectDate"},
+} ;
GQuark
gsignond_error_quark (void)
{
- static GQuark quark = 0;
- if (quark == 0) {
- quark = g_quark_from_static_string (GSIGNOND_ERROR_DOMAIN);
- }
- return quark;
+ static volatile gsize quark_volatile = 0;
+
+ g_dbus_error_register_error_domain (GSIGNOND_ERROR_DOMAIN,
+ &quark_volatile,
+ _gsignond_errors,
+ G_N_ELEMENTS (_gsignond_errors));
+
+ return (GQuark) quark_volatile;
}
GString*
return ctx;
}
+const GError *
+gsignond_db_credentials_database_get_last_error (
+ GSignondDbCredentialsDatabase *self)
+{
+ g_return_val_if_fail (self && GSIGNOND_DB_IS_CREDENTIALS_DATABASE (self), NULL);
+
+ return gsignond_db_sql_database_get_last_error (
+ GSIGNOND_DB_SQL_DATABASE (self->priv->metadata_db));
+}
+
GSignondDbCredentialsDatabase *self,
const guint32 identity_id);
+const GError *
+gsignond_db_credentials_database_get_last_error (
+ GSignondDbCredentialsDatabase *self);
+
G_END_DECLS
#endif /* __GSIGNOND_DB_CREDENTIALS_DATABASE_H__ */
g_return_val_if_fail (GSIGNOND_DB_IS_METADATA_DATABASE (self), FALSE);
g_return_val_if_fail (identity != NULL, FALSE);
- methods = gsignond_identity_info_get_methods (identity);
-
if (!methods || g_hash_table_size (methods) <=0) {
+ DBG ("no authentication methods found to store identity");
return FALSE;
}
if (!_gsignond_db_metadata_database_insert_methods (self, identity,
methods)) {
DBG ("Update methods failed");
- gsignond_db_sql_database_rollback_transaction (sql);
- goto finished;
}
/* realms */
*/
#include "gsignond/gsignond-log.h"
-#include "gsignond/gsignond-error.h"
#include "gsignond-dbus-auth-service-adapter.h"
#include "gsignond-dbus.h"
GSignondAccessControlManager *acm = gsignond_auth_service_iface_get_acm (self->priv->parent);
GSignondSecurityContext sec_context = {0, 0};
const gchar *object_path = NULL;
+ GError *error = NULL;
gsignond_access_control_manager_security_context_of_peer(
acm,
sender,
app_context);
- object_path = gsignond_auth_service_iface_register_new_identity (self->priv->parent, &sec_context);
+ object_path = gsignond_auth_service_iface_register_new_identity (self->priv->parent, &sec_context, &error);
if (object_path) {
g_bus_watch_name_on_connection (connection,
gsignond_dbus_auth_service_complete_register_new_identity (iface, invocation, object_path);
}
else {
- /*
- * TODO: Prepare error
- * GError *err = g_error_new ();
- * g_dbus_method_invocation_return_gerror (invocation, err);
- * g_error_free (err);
- */
+ g_dbus_method_invocation_return_gerror (invocation, error);
+ g_error_free (error);
}
return TRUE;
GSignondAccessControlManager *acm = gsignond_auth_service_iface_get_acm (self->priv->parent);
GSignondSecurityContext sec_context = {0, 0};
const gchar *object_path = NULL;
+ GError *error = NULL;
gsignond_access_control_manager_security_context_of_peer(
acm,
sender,
app_context);
- object_path = gsignond_auth_service_iface_get_identity (self->priv->parent, id, &sec_context, &identity_data);
+ object_path = gsignond_auth_service_iface_get_identity (self->priv->parent, id, &sec_context, &identity_data, &error);
if (object_path) {
g_bus_watch_name_on_connection (connection,
gsignond_dbus_auth_service_complete_get_identity (iface, invocation, object_path, identity_data);
}
else {
- /*
- * TODO: Prepare error
- * GError *err = g_error_new ();
- * g_dbus_method_invocation_return_gerror (invocation, err);
- * g_error_free (err);
- */
+ g_dbus_method_invocation_return_gerror (invocation, error);
+ g_error_free (error);
}
return TRUE;
gpointer user_data)
{
GSignondDbusAuthService *iface = GSIGNOND_DBUS_AUTH_SERVICE (self);
- const gchar **methods = gsignond_auth_service_iface_query_methods (self->priv->parent);
+ const gchar **methods = NULL;
+ GError *error = NULL;
+
+ methods = gsignond_auth_service_iface_query_methods (self->priv->parent, &error);
if (methods)
gsignond_dbus_auth_service_complete_query_methods (iface, invocation, (const gchar * const*)methods);
else {
- g_dbus_method_invocation_return_error (invocation,
- GSIGNOND_ERROR,
- GSIGNOND_ERROR_METHOD_NOT_AVAILABLE,
- "no authentication methods available");
-
+ g_dbus_method_invocation_return_gerror (invocation, error);
+ g_error_free (error);
}
return TRUE;
const gchar *method,
gpointer user_data)
{
+ GSignondDbusAuthService *iface = GSIGNOND_DBUS_AUTH_SERVICE (self);
const gchar **mechanisms = 0;
- GSignondDbusAuthService *iface = GSIGNOND_DBUS_AUTH_SERVICE (self);
+ GError *error = NULL;
- mechanisms = gsignond_auth_service_iface_query_mechanisms (self->priv->parent, method);
+ mechanisms = gsignond_auth_service_iface_query_mechanisms (self->priv->parent, method, &error);
if (mechanisms)
gsignond_dbus_auth_service_complete_query_mechanisms (iface, invocation, (const gchar* const*)mechanisms);
else {
- g_dbus_method_invocation_return_error (invocation, GSIGNOND_ERROR,
- GSIGNOND_ERROR_MECHANISM_NOT_AVAILABLE,
- "no mechanisms available");
+ g_dbus_method_invocation_return_gerror (invocation, error);
+ g_error_free (error);
}
return TRUE;
gpointer user_data)
{
GSignondDbusAuthService *iface = GSIGNOND_DBUS_AUTH_SERVICE (self);
- GVariant *identities = gsignond_auth_service_iface_query_identities (self->priv->parent, filter);
+ GVariant *identities = NULL;
+ GError *error = NULL;
+
+ identities = gsignond_auth_service_iface_query_identities (self->priv->parent, filter, &error);
- gsignond_dbus_auth_service_complete_query_identities (iface, invocation, identities);
+ if (!error) gsignond_dbus_auth_service_complete_query_identities (iface, invocation, identities);
+ else {
+ g_dbus_method_invocation_return_gerror (invocation, error);
+ g_error_free (error);
+ }
return TRUE;
}
GDBusMethodInvocation *invocation,
gpointer user_data)
{
- gboolean res ;
GSignondDbusAuthService *iface = GSIGNOND_DBUS_AUTH_SERVICE (self);
+ gboolean res ;
+ GError *error = NULL;
- res = gsignond_auth_service_iface_clear (self->priv->parent);
+ res = gsignond_auth_service_iface_clear (self->priv->parent, &error);
- gsignond_dbus_auth_service_complete_clear (iface, invocation, res);
+ if (!error) gsignond_dbus_auth_service_complete_clear (iface, invocation, res);
+ else {
+ g_dbus_method_invocation_return_gerror (invocation, error);
+ g_error_free (error);
+ }
return TRUE;
}
gpointer user_data)
{
GSignondDbusAuthSession *iface = GSIGNOND_DBUS_AUTH_SESSION (self);
- gchar **mechanisms = gsignond_auth_session_iface_query_available_mechanisms (self->priv->parent, wanted_mechanisms);
+ gchar **mechanisms = NULL;
+ GError *error = NULL;
+
+ mechanisms = gsignond_auth_session_iface_query_available_mechanisms (self->priv->parent, wanted_mechanisms, &error);
if (mechanisms) {
gsignond_dbus_auth_session_complete_query_available_mechanisms (iface, invocation, (const gchar * const *)mechanisms);
g_strfreev (mechanisms);
}
else {
- /*
- * TODO: Prepare error
- * GError *err = g_error_new ();
- * g_dbus_method_invocation_return_gerror (invocation, err);
- * g_error_free (err);
- */
+ g_dbus_method_invocation_return_gerror (invocation, error);
+ g_error_free (error);
}
}
_on_process_result (GSignondAuthSessionIface *auth_session, const GSignondSessionData *data, gpointer user_data)
{
_AuthSessionDbusInfo *info = (_AuthSessionDbusInfo *) user_data;
- g_assert (info && info->adapter);
- GSignondDbusAuthSessionAdapter *self = info->adapter;
+ GSignondDbusAuthSessionAdapter *self = NULL;
+ GVariant *result = NULL;
+
+ if (!info) return ;
- GVariant *result = gsignond_dictionary_to_variant ((GSignondDictionary *)data);
+ self = info->adapter;
+ result = gsignond_dictionary_to_variant ((GSignondDictionary *)data);
gsignond_dbus_auth_session_complete_process (
GSIGNOND_DBUS_AUTH_SESSION(self),
_on_process_error (GSignondAuthSessionIface *auth_session, const GError *error, gpointer user_data)
{
_AuthSessionDbusInfo *info = (_AuthSessionDbusInfo *) user_data;
- GSignondDbusAuthSessionAdapter *self = info->adapter;
+ GSignondDbusAuthSessionAdapter *self = NULL;
+
+ if (!info) return ;
+
+ self = info->adapter;
g_dbus_method_invocation_return_gerror (info->invocation, error);
gpointer user_data)
{
_AuthSessionDbusInfo *info = 0;
-
+ GError *error = NULL;
GSignondSessionData *data = (GSignondSessionData *)gsignond_dictionary_new_from_variant ((GVariant *)session_data);
info = g_new0 (_AuthSessionDbusInfo, 1);
self->priv->process_result_handler_id =
g_signal_connect (self->priv->parent, "process-result", G_CALLBACK (_on_process_result), info);
- gsignond_auth_session_iface_process (self->priv->parent, data, mechanisms);
+ if (!gsignond_auth_session_iface_process (self->priv->parent, data, mechanisms, &error)) {
+ g_dbus_method_invocation_return_gerror (invocation, error);
+ g_error_free (error);
+
+ g_signal_handler_disconnect (self->priv->parent, self->priv->process_error_handler_id);
+ g_signal_handler_disconnect (self->priv->parent, self->priv->process_result_handler_id);
+
+ self->priv->process_error_handler_id = self->priv->process_result_handler_id = 0;
+ }
gsignond_dictionary_free (data);
}
gpointer user_data)
{
GSignondDbusAuthSession *iface = GSIGNOND_DBUS_AUTH_SESSION (self);
+ GError *error = NULL;
- gsignond_auth_session_iface_cancel (self->priv->parent);
-
- gsignond_dbus_auth_session_complete_cancel (iface, invocation);
+ if (gsignond_auth_session_iface_cancel (self->priv->parent, &error))
+ gsignond_dbus_auth_session_complete_cancel (iface, invocation);
+ else {
+ g_dbus_method_invocation_return_gerror (invocation, error);
+ g_error_free (error);
+ }
}
static void
*/
#include "gsignond/gsignond-log.h"
-#include "gsignond/gsignond-error.h"
#include "gsignond-dbus-identity-adapter.h"
#include "gsignond-dbus.h"
static GParamSpec *properties[N_PROPERTIES];
+typedef struct {
+ GSignondDbusIdentityAdapter *adapter;
+ GDBusMethodInvocation *invocation;
+ gpointer user_data;
+} _IdentityDbusInfo;
+
struct _GSignondDbusIdentityAdapterPrivate
{
GDBusConnection *connection;
gchar *object_path;
gchar *app_context;
GSignondSecurityContext sec_context;
+ /* signal handler ids */
+ guint info_updated_handler_id;
+ guint verify_user_handler_id;
+ guint verify_secret_handler_id;
};
G_DEFINE_TYPE (GSignondDbusIdentityAdapter, gsignond_dbus_identity_adapter, GSIGNOND_DBUS_TYPE_IDENTITY_SKELETON)
gpointer iface = g_value_peek_pointer (value);
if (iface) {
if (self->priv->identity) {
- g_signal_handlers_disconnect_by_func (self->priv->identity, _emit_info_updated, self);
+ if (self->priv->info_updated_handler_id) {
+ g_signal_handler_disconnect (self->priv->identity, self->priv->info_updated_handler_id);
+ self->priv->info_updated_handler_id = 0;
+ }
+ if (self->priv->verify_user_handler_id) {
+ g_signal_handler_disconnect (self->priv->identity, self->priv->verify_user_handler_id);
+ self->priv->verify_user_handler_id = 0;
+ }
+ if (self->priv->verify_secret_handler_id) {
+ g_signal_handler_disconnect (self->priv->identity, self->priv->verify_secret_handler_id);
+ self->priv->verify_secret_handler_id = 0;
+ }
}
self->priv->identity = GSIGNOND_IDENTITY_IFACE (iface);
- g_signal_connect (self->priv->identity, "info-updated", G_CALLBACK (_emit_info_updated), self);
+ self->priv->info_updated_handler_id = g_signal_connect (
+ self->priv->identity, "info-updated", G_CALLBACK (_emit_info_updated), self);
}
break;
}
g_object_unref (self->priv->connection);
self->priv->connection = NULL;
}
+
+ if (self->priv->identity) {
+ if (self->priv->info_updated_handler_id) {
+ g_signal_handler_disconnect (self->priv->identity, self->priv->info_updated_handler_id);
+ self->priv->info_updated_handler_id = 0;
+ }
+ if (self->priv->verify_user_handler_id) {
+ g_signal_handler_disconnect (self->priv->identity, self->priv->verify_user_handler_id);
+ self->priv->verify_user_handler_id = 0;
+ }
+ if (self->priv->verify_secret_handler_id) {
+ g_signal_handler_disconnect (self->priv->identity, self->priv->verify_secret_handler_id);
+ self->priv->verify_secret_handler_id = 0;
+ }
+ }
G_OBJECT_CLASS (gsignond_dbus_identity_adapter_parent_class)->dispose (object);
}
{
GSignondDbusIdentity *iface = GSIGNOND_DBUS_IDENTITY (self);
guint32 id;
+ GError *error = NULL;
PREPARE_SECURITY_CONTEXT (self, invocation);
- id = gsignond_identity_iface_request_credentials_update (self->priv->identity, message, &self->priv->sec_context);
+ id = gsignond_identity_iface_request_credentials_update (self->priv->identity, message, &self->priv->sec_context, &error);
if (id) {
gsignond_dbus_identity_complete_request_credentials_update (iface, invocation, id);
}
else {
- /*
- * TODO: Prepare error
- * GError *err = g_error_new ();
- * g_dbus_method_invocation_return_gerror (invocation, err);
- * g_error_free (err);
- */
+ g_dbus_method_invocation_return_gerror (invocation, error);
+ g_error_free (error);
}
return TRUE;
{
GSignondDbusIdentity *iface = GSIGNOND_DBUS_IDENTITY (self);
GVariant *identity_data = 0;
+ GError *error = NULL;
PREPARE_SECURITY_CONTEXT (self, invocation);
- identity_data = gsignond_identity_iface_get_info (self->priv->identity, &self->priv->sec_context);
+ identity_data = gsignond_identity_iface_get_info (self->priv->identity, &self->priv->sec_context, &error);
if (identity_data) {
gsignond_dbus_identity_complete_get_info (iface, invocation, identity_data);
}
else {
- /*
- * TODO: Prepare error
- * GError *err = g_error_new ();
- * g_dbus_method_invocation_return_gerror (invocation, err);
- * g_error_free (err);
- */
+ g_dbus_method_invocation_return_gerror (invocation, error);
+ g_error_free (error);
}
return TRUE;
{
GSignondDbusIdentity *iface = GSIGNOND_DBUS_IDENTITY (self);
const gchar *object_path = NULL;
+ GError *error = NULL;
PREPARE_SECURITY_CONTEXT (self, invocation);
- DBG ("get auth session for method : %s", method);
- object_path = gsignond_identity_iface_get_auth_session (self->priv->identity, method, &self->priv->sec_context);
+ object_path = gsignond_identity_iface_get_auth_session (self->priv->identity, method, &self->priv->sec_context, &error);
- if (!object_path) {
- g_dbus_method_invocation_return_error (invocation,
- GSIGNOND_ERROR,
- GSIGNOND_ERROR_METHOD_NOT_KNOWN,
- "'%s' method not supported", method);
- }
- else
+ if (object_path) {
gsignond_dbus_identity_complete_get_auth_session (iface, invocation, object_path);
+ }
+ else {
+ g_dbus_method_invocation_return_gerror (invocation, error);
+ g_error_free (error);
+ }
return TRUE;
}
+static void
+_on_user_verfied (GSignondIdentityIface *identity, gboolean res, const GError *error, gpointer user_data)
+{
+ _IdentityDbusInfo *info = (_IdentityDbusInfo *)user_data;
+
+ if (G_UNLIKELY (info)) {
+ WARN ("assertion G_UNLIKELY (info) fialed");
+ return ;
+ }
+
+ g_signal_handler_disconnect (identity, info->adapter->priv->verify_user_handler_id);
+ info->adapter->priv->verify_user_handler_id = 0;
+
+ if (error) {
+ g_dbus_method_invocation_return_gerror (info->invocation, error);
+ }
+ else {
+ gsignond_dbus_identity_complete_verify_user (
+ GSIGNOND_DBUS_IDENTITY (info->adapter), info->invocation, res);
+ }
+
+ g_free (info);
+}
+
static gboolean
_handle_verify_user (GSignondDbusIdentityAdapter *self,
GDBusMethodInvocation *invocation,
const GVariant *params,
gpointer user_data)
{
- GSignondDbusIdentity *iface = GSIGNOND_DBUS_IDENTITY (self);
gboolean res = FALSE;
+ GError *error = NULL;
PREPARE_SECURITY_CONTEXT (self, invocation);
- res = gsignond_identity_iface_verify_user (self->priv->identity, params, &self->priv->sec_context);
+ res = gsignond_identity_iface_verify_user (self->priv->identity, params, &self->priv->sec_context, &error);
- gsignond_dbus_identity_complete_verify_user (iface, invocation, res);
+ if (!res) {
+ g_dbus_method_invocation_return_gerror (invocation, error);
+ g_error_free (error);
+ }
+ else {
+ _IdentityDbusInfo *info = g_new0(_IdentityDbusInfo, 1);
+
+ info->adapter = self;
+ info->invocation = invocation;
+ info->user_data = NULL;
+
+ /* FIXME: Do we allow multiple calls at a given point of time */
+ self->priv->verify_user_handler_id = g_signal_connect (self->priv->identity,
+ "user-verified", G_CALLBACK (_on_user_verfied), (gpointer)info);
+ }
return TRUE;
}
+static void
+_on_secret_verfied (GSignondIdentityIface *identity, gboolean res, const GError *error, gpointer user_data)
+{
+ _IdentityDbusInfo *info = (_IdentityDbusInfo *)user_data;
+
+ g_signal_handler_disconnect (identity, info->adapter->priv->verify_secret_handler_id);
+ info->adapter->priv->verify_secret_handler_id = 0;
+
+ if (G_UNLIKELY (info)) {
+ WARN ("assertion G_UNLIKELY (info) fialed");
+ return ;
+ }
+ if (error) {
+ g_dbus_method_invocation_return_gerror (info->invocation, error);
+ }
+ else {
+ gsignond_dbus_identity_complete_verify_secret (
+ GSIGNOND_DBUS_IDENTITY (info->adapter), info->invocation, res);
+ }
+
+ g_free (info);
+}
+
static gboolean
_handle_verify_secret (GSignondDbusIdentityAdapter *self,
GDBusMethodInvocation *invocation,
const gchar *secret,
gpointer user_data)
{
- GSignondDbusIdentity *iface = GSIGNOND_DBUS_IDENTITY (self);
gboolean res = FALSE;
+ GError *error = NULL;
PREPARE_SECURITY_CONTEXT (self, invocation);
- res = gsignond_identity_iface_verify_secret (self->priv->identity, secret, &self->priv->sec_context);
+ res = gsignond_identity_iface_verify_secret (self->priv->identity, secret, &self->priv->sec_context, &error);
+
+ if (!res) {
+ g_dbus_method_invocation_return_gerror (invocation, error);
+ g_error_free (error);
+ }
+ else {
+ _IdentityDbusInfo *info = g_new0(_IdentityDbusInfo, 1);
- gsignond_dbus_identity_complete_verify_secret (iface, invocation, res);
+ info->adapter = self;
+ info->invocation = invocation;
+ info->user_data = NULL;
+
+ /* FIXME: Do we allow multiple calls at a given point of time */
+ self->priv->verify_secret_handler_id = g_signal_connect (self->priv->identity,
+ "secret-verified", G_CALLBACK (_on_secret_verfied), (gpointer)info);
+ }
return TRUE;
}
gpointer user_data)
{
GSignondDbusIdentity *iface = GSIGNOND_DBUS_IDENTITY (self);
+ GError *error = NULL;
PREPARE_SECURITY_CONTEXT (self, invocation);
- gsignond_identity_iface_remove (self->priv->identity, &self->priv->sec_context);
-
- gsignond_dbus_identity_complete_remove (iface, invocation);
+ if (!gsignond_identity_iface_remove (self->priv->identity, &self->priv->sec_context, &error)) {
+ g_dbus_method_invocation_return_gerror (invocation, error);
+ g_error_free (error);
+ }
+ else {
+ gsignond_dbus_identity_complete_remove (iface, invocation);
+ }
return TRUE;
}
{
GSignondDbusIdentity *iface = GSIGNOND_DBUS_IDENTITY (self);
gboolean res = FALSE;
+ GError *error = NULL;
PREPARE_SECURITY_CONTEXT (self, invocation);
- res = gsignond_identity_iface_sign_out (self->priv->identity, &self->priv->sec_context);
+ res = gsignond_identity_iface_sign_out (self->priv->identity, &self->priv->sec_context, &error);
- gsignond_dbus_identity_complete_sign_out (iface, invocation, res);
+ if (res) {
+ gsignond_dbus_identity_complete_sign_out (iface, invocation, res);
+ }
+ else {
+ g_dbus_method_invocation_return_gerror (invocation, error);
+ g_error_free (error);
+ }
return TRUE;
}
{
GSignondDbusIdentity *iface = GSIGNOND_DBUS_IDENTITY (self);
guint id = 0;
+ GError *error = NULL;
PREPARE_SECURITY_CONTEXT (self, invocation);
- id = gsignond_identity_iface_store (self->priv->identity, info, &self->priv->sec_context);
+ id = gsignond_identity_iface_store (self->priv->identity, info, &self->priv->sec_context, &error);
- gsignond_dbus_identity_complete_store (iface, invocation, id);
+ if (id) {
+ gsignond_dbus_identity_complete_store (iface, invocation, id);
+ } else {
+ g_dbus_method_invocation_return_gerror (invocation, error);
+ g_error_free (error);
+ }
return TRUE;
}
{
GSignondDbusIdentity *iface = GSIGNOND_DBUS_IDENTITY (self);
gint32 id = 0;
+ GError *error = NULL;
PREPARE_SECURITY_CONTEXT (self, invocation);
- id = gsignond_identity_iface_add_reference (self->priv->identity, reference, &self->priv->sec_context);
+ id = gsignond_identity_iface_add_reference (self->priv->identity, reference, &self->priv->sec_context, &error);
- gsignond_dbus_identity_complete_add_reference (iface, invocation, id);
+ if (id) {
+ gsignond_dbus_identity_complete_add_reference (iface, invocation, id);
+ }
+ else {
+ g_dbus_method_invocation_return_gerror (invocation, error);
+ g_error_free (error);
+ }
return TRUE;
}
{
GSignondDbusIdentity *iface = GSIGNOND_DBUS_IDENTITY (self);
gint32 id = 0;
+ GError *error = NULL;
PREPARE_SECURITY_CONTEXT (self, invocation);
- id = gsignond_identity_iface_remove_reference (self->priv->identity, reference, &self->priv->sec_context);
+ id = gsignond_identity_iface_remove_reference (self->priv->identity, reference, &self->priv->sec_context, &error);
- gsignond_dbus_identity_complete_remove_reference (iface, invocation, id);
+ if (id) {
+ gsignond_dbus_identity_complete_remove_reference (iface, invocation, id);
+ } else {
+ g_dbus_method_invocation_return_gerror (invocation, error);
+ g_error_free (error);
+ }
return TRUE;
}
static const gchar *
_dummy_register_new_identity (GSignondAuthServiceIface *self,
- const GSignondSecurityContext *ctx)
+ const GSignondSecurityContext *ctx,
+ GError **error)
{
(void) self;
(void) ctx;
+ (void) error;
return NULL;
}
_dummy_get_identity (GSignondAuthServiceIface *self,
guint32 id,
const GSignondSecurityContext *ctx,
- GVariant **identity_data)
+ GVariant **identity_data,
+ GError **error)
{
(void) self;
(void) id;
(void) ctx;
(void) identity_data;
+ (void) error;
return NULL;
}
static const gchar **
-_dummy_query_methods (GSignondAuthServiceIface *self)
+_dummy_query_methods (GSignondAuthServiceIface *self,
+ GError **error)
{
(void) self;
+ (void) error;
return NULL;
}
static const gchar **
_dummy_query_mechanisms (GSignondAuthServiceIface *self,
- const gchar *method)
+ const gchar *method,
+ GError **error)
{
(void) self;
(void) method;
+ (void) error;
return NULL;
}
static GVariant *
_dummy_query_identities (GSignondAuthServiceIface *self,
- const GVariant *filter)
+ const GVariant *filter,
+ GError **error)
{
(void) self;
(void) filter;
+ (void) error;
return NULL;
}
static gboolean
-_dummy_clear (GSignondAuthServiceIface *self)
+_dummy_clear (GSignondAuthServiceIface *self,
+ GError **error)
{
(void) self;
-
+ (void) error;
return FALSE;
}
* gsignond_auth_service_iface_register_new_identity:
* @self: instance of #GSignondAuthServiceIfacea
* @ctx: security context
+ * @error: return location for error
*
*
* Returns: (transfer none) object path of newly created identity.
const gchar *
gsignond_auth_service_iface_register_new_identity (
GSignondAuthServiceIface *self,
- const GSignondSecurityContext *ctx)
+ const GSignondSecurityContext *ctx,
+ GError **error)
{
return GSIGNOND_AUTH_SERVICE_GET_INTERFACE (self)->
- register_new_identity (self, ctx);
+ register_new_identity (self, ctx, error);
}
/**
* @ctx: security context
* @object_path: return location for object path of the identity
* @identity_data: return location for identity data
+ * @error: return location for error
*
* Retrives object path and identity info stored for the given @id.
*
gsignond_auth_service_iface_get_identity (GSignondAuthServiceIface *self,
guint32 id,
const GSignondSecurityContext *ctx,
- GVariant **identity_data)
+ GVariant **identity_data,
+ GError **error)
{
return GSIGNOND_AUTH_SERVICE_GET_INTERFACE(self)->
- get_identity (self, id, ctx, identity_data);
+ get_identity (self, id, ctx, identity_data, error);
}
/**
* gsignond_auth_service_iface_query_methods:
* @self: instance of #GSignondAuthServiceIface
+ * @error: return location for error
*
* Retrieves the available authentication methods.
*
* Returns: (transfer none): list of methods
*/
const gchar **
-gsignond_auth_service_iface_query_methods (GSignondAuthServiceIface *self)
+gsignond_auth_service_iface_query_methods (GSignondAuthServiceIface *self,
+ GError **error)
{
- return GSIGNOND_AUTH_SERVICE_GET_INTERFACE (self)->query_methods (self);
+ return GSIGNOND_AUTH_SERVICE_GET_INTERFACE (self)->query_methods (self, error);
}
/**
* gsignond_auth_service_iface_query_mechanisms:
* @self: instance of #GSignondAuthServiceIface
* @method: method to query
+ * @error: return location for error
*
* Retrieves the available mechanisms for authentication method @method.
*
*/
const gchar **
gsignond_auth_service_iface_query_mechanisms (GSignondAuthServiceIface *self,
- const gchar *method)
+ const gchar *method,
+ GError **error)
{
return GSIGNOND_AUTH_SERVICE_GET_INTERFACE (self)->
- query_mechanisms (self, method);
+ query_mechanisms (self, method, error);
}
/**
* gsignond_auth_service_iface_query_identities:
* @self: instance of #GSignondAuthServiceIface
* @filter: filter should be applited
+ * @error: return location for error
*
* Retrieves the identities that satisifies the filter @filter.
*
*/
GVariant *
gsignond_auth_service_iface_query_identities (GSignondAuthServiceIface *self,
- const GVariant *filter)
+ const GVariant *filter,
+ GError **error)
{
return GSIGNOND_AUTH_SERVICE_GET_INTERFACE (self)->
- query_identities (self, filter);
+ query_identities (self, filter, error);
}
/**
* gsignond_auth_service_iface_clear:
* @self: instance of #GSignondAuthServiceIface
+ * @error: return location for error
*
* Clears the cache.
*
* Returns: TRUE on successful, FALSE otherwise
*/
gboolean
-gsignond_auth_service_iface_clear (GSignondAuthServiceIface *self)
+gsignond_auth_service_iface_clear (GSignondAuthServiceIface *self,
+ GError **error)
{
- return GSIGNOND_AUTH_SERVICE_GET_INTERFACE (self)->clear(self);
+ return GSIGNOND_AUTH_SERVICE_GET_INTERFACE (self)->clear(self, error);
}
GSignondAccessControlManager *
* register_new_identity:
* @auth_service: An instance of #GSignondAuthServiceIface
* @ctx: Security context
+ * @error: return location for error
*
* Creates new identity object and registers it on the DBus. Returns the
* dbus object of the newly created identity.
*
* Returns: (transfer null) object of the newly created identity if success, @NULL otherwise.
*/
- const gchar * (*register_new_identity) (GSignondAuthServiceIface *auth_service, const GSignondSecurityContext *ctx);
+ const gchar * (*register_new_identity) (GSignondAuthServiceIface *auth_service, const GSignondSecurityContext *ctx, GError **error);
/**
* get_identity:
* @ctx: Security context
* @object_path: (transfers full) holds the object path of the identity
* @identity_data: (transfers full) holds the identity data
+ * @error: return location for error
*
* Retrives idnetity information stored and object path on DBus with the given id @id.
*
* Returns: (transfer null) object of the newly created identity if success, @NULL otherwise.
*/
- const gchar* (*get_identity) (GSignondAuthServiceIface *auth_service, guint32 id, const GSignondSecurityContext *ctx, GVariant **identity_data);
+ const gchar* (*get_identity) (GSignondAuthServiceIface *auth_service, guint32 id, const GSignondSecurityContext *ctx, GVariant **identity_data, GError **error);
/**
* query_methods:
* @auth_service: An instance of #GSignondAuthServiceIface
+ * @error: return location for error
*
* Retrieves the supported authentication methods on this service object.
*
* Returns: (transfer none): list of authentication methods.
*/
- const gchar ** (*query_methods) (GSignondAuthServiceIface *auth_service);
+ const gchar ** (*query_methods) (GSignondAuthServiceIface *auth_service, GError **error);
/**
* query_mechanisms:
* @auth_service: An instance of #GSignondAuthServiceIface
* @method: authentication method
+ * @error: return location for error
*
* Retrieves the supported authentication mechanisms for given @method on this service object.
*
* Returns: (transfer full): list of authentication mechanisms.
*/
- const gchar ** (*query_mechanisms) (GSignondAuthServiceIface *auth_service, const gchar *method);
+ const gchar ** (*query_mechanisms) (GSignondAuthServiceIface *auth_service, const gchar *method, GError **error);
/**
* query_identities:
* @auth_service: An instance of #GSignondAuthServiceIface
* @filter: filter to be applied
+ * @error: return location for error
*
* Query for stored identities which satisifies the given filter @filter.
*
* Returns: (transfers full) identity list
*/
- GVariant * (*query_identities) (GSignondAuthServiceIface *auth_service, const GVariant *filter);
+ GVariant * (*query_identities) (GSignondAuthServiceIface *auth_service, const GVariant *filter, GError **error);
/**
* clear:
* @auth_service: An instance of #GSignondAuthServiceIface
+ * @error: return location for error
*
* Clears all the identity information stored.
*
* Retruns: @TRUE on success, @FALSE otherwise
*/
- gboolean (*clear) (GSignondAuthServiceIface *auth_service);
+ gboolean (*clear) (GSignondAuthServiceIface *auth_service, GError **error);
/**
* get_acm
const gchar *
gsignond_auth_service_iface_register_new_identity (
GSignondAuthServiceIface *self,
- const GSignondSecurityContext *ctx);
+ const GSignondSecurityContext *ctx,
+ GError **error);
const gchar *
gsignond_auth_service_iface_get_identity (GSignondAuthServiceIface *self,
guint32 id,
const GSignondSecurityContext *ctx,
- GVariant **identity_data);
+ GVariant **identity_data,
+ GError **error);
const gchar **
-gsignond_auth_service_iface_query_methods (GSignondAuthServiceIface *self);
+gsignond_auth_service_iface_query_methods (GSignondAuthServiceIface *self,
+ GError **error);
const gchar **
gsignond_auth_service_iface_query_mechanisms (GSignondAuthServiceIface *self,
- const gchar *method);
+ const gchar *method,
+ GError **error);
GVariant *
gsignond_auth_service_iface_query_identities (GSignondAuthServiceIface *self,
- const GVariant *filter);
+ const GVariant *filter,
+ GError **error);
gboolean
-gsignond_auth_service_iface_clear (GSignondAuthServiceIface *self);
+gsignond_auth_service_iface_clear (GSignondAuthServiceIface *self,
+ GError **error);
GSignondAccessControlManager *
gsignond_auth_service_iface_get_acm (GSignondAuthServiceIface *self);
gchar **
gsignond_auth_session_iface_query_available_mechanisms (
GSignondAuthSessionIface *self,
- const gchar **wanted_mechanisms)
+ const gchar **wanted_mechanisms,
+ GError **error)
{
return GSIGNOND_AUTH_SESSION_GET_INTERFACE (self)->
- query_available_mechanisms (self, wanted_mechanisms);
+ query_available_mechanisms (self, wanted_mechanisms, error);
}
gboolean
gsignond_auth_session_iface_process (GSignondAuthSessionIface *self,
GSignondSessionData *session_data,
- const gchar *mechanism)
+ const gchar *mechanism,
+ GError **error)
{
return GSIGNOND_AUTH_SESSION_GET_INTERFACE (self)->
- process (self, session_data, mechanism);
+ process (self, session_data, mechanism, error);
}
-void
-gsignond_auth_session_iface_cancel (GSignondAuthSessionIface *self)
+gboolean
+gsignond_auth_session_iface_cancel (GSignondAuthSessionIface *self,
+ GError **error)
{
- return GSIGNOND_AUTH_SESSION_GET_INTERFACE (self)->cancel (self);
+ return GSIGNOND_AUTH_SESSION_GET_INTERFACE (self)->cancel (self, error);
}
void
gsignond_auth_session_iface_user_action_finished (GSignondAuthSessionIface *self,
- GSignondSessionData *session_data)
+ GSignondSessionData *session_data)
{
return GSIGNOND_AUTH_SESSION_GET_INTERFACE (self)->
user_action_finished (self, session_data);
void
gsignond_auth_session_iface_refresh (GSignondAuthSessionIface *self,
- GSignondSessionData *session_data)
+ GSignondSessionData *session_data)
{
return GSIGNOND_AUTH_SESSION_GET_INTERFACE (self)->
refresh (self, session_data);
}
void
-gsignond_auth_session_iface_notify_process_result (
- GSignondAuthSessionIface *iface,
- GSignondSessionData *result)
+gsignond_auth_session_iface_notify_process_result (GSignondAuthSessionIface *iface,
+ GSignondSessionData *result)
{
g_signal_emit (iface, signals[SIG_PROCESS_RESULT], 0, result);
}
void
-gsignond_auth_session_iface_notify_process_error (
- GSignondAuthSessionIface *iface,
- const GError *error)
+gsignond_auth_session_iface_notify_process_error (GSignondAuthSessionIface *iface,
+ const GError *error)
{
g_signal_emit (iface, signals[SIG_PROCESS_ERROR], 0, error);
}
void
gsignond_auth_session_iface_notify_store (GSignondAuthSessionIface *self,
- GSignondSessionData *session_data)
+ GSignondSessionData *session_data)
{
g_signal_emit (self, signals[SIG_PROCESS_STORE], 0, session_data);
}
void
gsignond_auth_session_iface_notify_user_action_required (GSignondAuthSessionIface *self,
- GSignondSessionData *session_data)
+ GSignondSessionData *session_data)
{
g_signal_emit (self, signals[SIG_PROCESS_USER_ACTION_REQUIRED], 0,
session_data);
void
gsignond_auth_session_iface_notify_refreshed (GSignondAuthSessionIface *self,
- GSignondSessionData *session_data)
+ GSignondSessionData *session_data)
{
g_signal_emit (self, signals[SIG_PROCESS_REFRESHED], 0, session_data);
}
void
gsignond_auth_session_iface_notify_state_changed (GSignondAuthSessionIface *self,
- gint state,
- const gchar *message)
+ gint state,
+ const gchar *message)
{
g_signal_emit (self, signals[SIG_PROCESS_STATE_CHANGED], 0, state,
message);
}
+
* query_available_mechanisms:
* @session: instance of #GSignondAuthSessionIface
* @desired_mechanisms: desired authentication mechanisms
+ * @error: return location for error
*
* Checks for support of desired authentication mechanisms #desired_mechanisms for this
* authentication session, The result will be interseciton of desired authenticaiton mechansims
* Caller should use g_strfreev() when done with return value.
*/
gchar ** (*query_available_mechanisms) (GSignondAuthSessionIface *session,
- const gchar **desired_mechanisms);
+ const gchar **desired_mechanisms,
+ GError **error);
/**
* process:
* @session: instance of #GSignondAuthSessionIface
* @session_data: authentication session data to use
* @mechansims: authentication mechanism to use
+ * @error: return location for error
*
* Initiates authentication process on #session, On successful authentication #gsignond_auth_session_iface_notify_process_result will be called.
* In case failure occured in authentication process, the error is informed via #gsignond_auth_session_iface_notify_process_error.
*/
gboolean (*process) (GSignondAuthSessionIface *session,
GSignondSessionData *session_data,
- const gchar *mechanism);
+ const gchar *mechanism,
+ GError **error);
/**
* cancel:
* @session: instance of #GSignondAuthSessionIface
+ * @error: return location for error
*
*/
- void (*cancel) (GSignondAuthSessionIface *session);
+ gboolean (*cancel) (GSignondAuthSessionIface *session,
+ GError **error);
void (*user_action_finished) (GSignondAuthSessionIface *session,
GSignondSessionData *session_data);
GType gsignond_auth_session_iface_get_type (void);
gchar **
-gsignond_auth_session_iface_query_available_mechanisms (
- GSignondAuthSessionIface *self,
- const gchar **wanted_mechanisms);
+gsignond_auth_session_iface_query_available_mechanisms (GSignondAuthSessionIface *self,
+ const gchar **wanted_mechanisms,
+ GError **error);
gboolean
gsignond_auth_session_iface_process (GSignondAuthSessionIface *self,
- GSignondSessionData *session_data,
- const gchar *mechanism);
-void
-gsignond_auth_session_iface_cancel (GSignondAuthSessionIface *self);
+ GSignondSessionData *session_data,
+ const gchar *mechanism,
+ GError **error);
+gboolean
+gsignond_auth_session_iface_cancel (GSignondAuthSessionIface *self,
+ GError **error);
void
gsignond_auth_session_iface_user_action_finished (GSignondAuthSessionIface *self,
- GSignondSessionData *session_data);
+ GSignondSessionData *session_data);
void
gsignond_auth_session_iface_refresh (GSignondAuthSessionIface *self,
- GSignondSessionData *session_data);
+ GSignondSessionData *session_data);
/* handlers */
* Function to be called with #results on authentication process success.
*/
void
-gsignond_auth_session_iface_notify_process_result (
- GSignondAuthSessionIface *iface,
- GSignondSessionData *result);
+gsignond_auth_session_iface_notify_process_result (GSignondAuthSessionIface *iface,
+ GSignondSessionData *result);
/**
* process_error:
* Function to be called with #error on authentication process failure.
*/
void
-gsignond_auth_session_iface_notify_process_error (
- GSignondAuthSessionIface *iface,
- const GError *error);
+gsignond_auth_session_iface_notify_process_error (GSignondAuthSessionIface *iface,
+ const GError *error);
void
gsignond_auth_session_iface_notify_store (GSignondAuthSessionIface *self,
- GSignondSessionData *session_data);
+ GSignondSessionData *session_data);
void
gsignond_auth_session_iface_notify_user_action_required (GSignondAuthSessionIface *self,
- GSignondSessionData *session_data);
+ GSignondSessionData *session_data);
void
gsignond_auth_session_iface_notify_refreshed (GSignondAuthSessionIface *self,
- GSignondSessionData *session_data);
+ GSignondSessionData *session_data);
void
gsignond_auth_session_iface_notify_state_changed (GSignondAuthSessionIface *self,
- gint state,
- const gchar *message);
+ gint state,
+ const gchar *message);
G_END_DECLS
*/
#include "gsignond-auth-session-iface.h"
+#include "gsignond/gsignond-error.h"
+#include "gsignond/gsignond-log.h"
#include "dbus/gsignond-dbus.h"
#include "dbus/gsignond-dbus-auth-session-adapter.h"
#include "gsignond-auth-session.h"
static gchar **
_query_available_mechanisms (GSignondAuthSessionIface *iface,
- const gchar **wanted_mechanisms)
+ const gchar **wanted_mechanisms,
+ GError **error)
{
+ if (G_LIKELY ((iface && GSIGNOND_IS_AUTH_SESSION (iface)) == 0)) {
+ WARN ("assertion G_LIKELY ((iface && GSIGNOND_IS_AUTH_SESSION (iface)) == 0) failed");
+ if (error) *error = gsignond_get_gerror_for_id (GSIGNOND_ERROR_UNKNOWN, "Unknown error");
+ return NULL;
+ }
GSignondAuthSession *self = GSIGNOND_AUTH_SESSION (iface);
gchar** available_mechanisms;
g_object_get(self->priv->proxy,
static gboolean
_process (GSignondAuthSessionIface *iface, GSignondSessionData *session_data,
- const gchar *mechanism)
+ const gchar *mechanism,
+ GError **error)
{
+ if (G_LIKELY ((iface && GSIGNOND_IS_AUTH_SESSION (iface)) == 0)) {
+ WARN ("assertion G_LIKELY ((iface && GSIGNOND_IS_AUTH_SESSION (iface)) == 0) failed");
+ if (error) *error = gsignond_get_gerror_for_id (GSIGNOND_ERROR_UNKNOWN, "Unknown error");
+ return FALSE;
+ }
GSignondAuthSession *self = GSIGNOND_AUTH_SESSION (iface);
gsignond_plugin_proxy_process(self->priv->proxy, iface, session_data,
mechanism);
- return TRUE;
+ return TRUE;
}
-static void
-_cancel (GSignondAuthSessionIface *iface)
+static gboolean
+_cancel (GSignondAuthSessionIface *iface, GError **error)
{
+ if (G_LIKELY ((iface && GSIGNOND_IS_AUTH_SESSION (iface)) == 0)) {
+ WARN ("assertion G_LIKELY ((iface && GSIGNOND_IS_AUTH_SESSION (iface)) == 0) failed");
+ if (error) *error = gsignond_get_gerror_for_id (GSIGNOND_ERROR_UNKNOWN, "Unknown error");
+ return FALSE;
+ }
GSignondAuthSession *self = GSIGNOND_AUTH_SESSION (iface);
gsignond_plugin_proxy_cancel(self->priv->proxy, iface);
+
+ return TRUE;
}
void
}
}
-
static void
_set_property (GObject *object, guint property_id, const GValue *value,
GParamSpec *pspec)
gsignond_get_plugin_proxy_factory(), id, session->priv->proxy);
}
-
/**
* gsignond_auth_session_new:
* @owner: instance of #GSignondIdentityIface
return auth_session;
}
-
static gboolean
_dummy_request_credentials_update (GSignondIdentityIface *self,
const gchar *message,
- const GSignondSecurityContext *ctx)
+ const GSignondSecurityContext *ctx,
+ GError **error)
{
(void) self;
(void) message;
(void) ctx;
+ (void) error;
return FALSE;
}
static GVariant *
-_dummy_get_info (GSignondIdentityIface *self, const GSignondSecurityContext *ctx)
+_dummy_get_info (GSignondIdentityIface *self, const GSignondSecurityContext *ctx, GError **error)
{
(void) self;
(void) ctx;
+ (void) error;
return 0;
}
static const gchar *
-_dummy_get_auth_session (GSignondIdentityIface *self, const gchar *method, const GSignondSecurityContext *ctx)
+_dummy_get_auth_session (GSignondIdentityIface *self, const gchar *method, const GSignondSecurityContext *ctx, GError **error)
{
(void) self;
(void) method;
(void) ctx;
+ (void) error;
return NULL;
}
static gboolean
-_dummy_verify_user (GSignondIdentityIface *self, const GVariant *params, const GSignondSecurityContext *ctx)
+_dummy_verify_user (GSignondIdentityIface *self, const GVariant *params, const GSignondSecurityContext *ctx, GError **error)
{
(void) self;
(void) params;
(void) ctx;
+ (void) error;
return FALSE;
}
static gboolean
-_dummy_verify_secret (GSignondIdentityIface *self, const gchar *secret, const GSignondSecurityContext *ctx)
+_dummy_verify_secret (GSignondIdentityIface *self, const gchar *secret, const GSignondSecurityContext *ctx, GError **error)
{
(void) self;
(void) secret;
(void) ctx;
+ (void) error;
return FALSE;
}
-static void
-_dummy_remove (GSignondIdentityIface *self, const GSignondSecurityContext *ctx)
+static gboolean
+_dummy_remove (GSignondIdentityIface *self, const GSignondSecurityContext *ctx, GError **error)
{
(void) self;
(void) ctx;
+ (void) error;
+
+ return FALSE;
}
static gboolean
-_dummy_sign_out (GSignondIdentityIface *self, const GSignondSecurityContext *ctx)
+_dummy_sign_out (GSignondIdentityIface *self, const GSignondSecurityContext *ctx, GError **error)
{
(void) self;
(void) ctx;
+ (void) error;
return FALSE;
}
static guint32
-_dummy_store (GSignondIdentityIface *self, const GVariant *info, const GSignondSecurityContext *ctx)
+_dummy_store (GSignondIdentityIface *self, const GVariant *info, const GSignondSecurityContext *ctx, GError **error)
{
(void) self;
(void) info;
(void) ctx;
+ (void) error;
return 0;
}
static gint32
-_dummy_add_reference (GSignondIdentityIface *self, const gchar *reference, const GSignondSecurityContext *ctx)
+_dummy_add_reference (GSignondIdentityIface *self, const gchar *reference, const GSignondSecurityContext *ctx, GError **error)
{
(void) self;
(void) reference;
(void) ctx;
+ (void) error;
return 0;
}
static gint32
-_dummy_remove_reference (GSignondIdentityIface *self, const gchar *reference, const GSignondSecurityContext *ctx)
+_dummy_remove_reference (GSignondIdentityIface *self, const gchar *reference, const GSignondSecurityContext *ctx, GError **error)
{
(void) self;
(void) reference;
(void) ctx;
+ (void) error;
return 0;
}
* @self: instance of #GSignondIdentityIface
* @message: message to be shown to user
* @ctx: security context of the caller
+ * @error: return location for error or @NULL.
*
* Requests user to update username and password for this identity @identity.
* Once the process is done, emits "credentials-updated" signal
gboolean
gsignond_identity_iface_request_credentials_update (GSignondIdentityIface *self,
const gchar *message,
- const GSignondSecurityContext *ctx)
+ const GSignondSecurityContext *ctx,
+ GError **error)
{
return GSIGNOND_IDENTITY_IFACE_GET_INTERFACE (self)->
- request_credentials_update (self, message, ctx);
+ request_credentials_update (self, message, ctx, error);
}
/**
* @self: instance of #GSignondIdentityIface
* @message: message to be shown to user
* @ctx: security context of the caller
+ * @error: Return location for error or @NULL.
*
* Retrieves the identity information for this identity, in the form of key, value pairs.
*
* Returns: (transfers full): identity info
*/
GVariant *
-gsignond_identity_iface_get_info (GSignondIdentityIface *self, const GSignondSecurityContext *ctx)
+gsignond_identity_iface_get_info (GSignondIdentityIface *self, const GSignondSecurityContext *ctx, GError **error)
{
- return GSIGNOND_IDENTITY_IFACE_GET_INTERFACE (self)->get_info (self, ctx);
+ return GSIGNOND_IDENTITY_IFACE_GET_INTERFACE (self)->get_info (self, ctx, error);
}
/**
* @self: instance of #GSignondIdentityIface
* @method: authentication method to use
* @ctx: security context of the caller
+ * @error: Return location for error or @NULL.
*
* Creates new authentication process on #identity using #method, and returns
* dbus object path for newly created object.
const gchar *
gsignond_identity_iface_get_auth_session (GSignondIdentityIface *self,
const gchar *method,
- const GSignondSecurityContext *ctx)
+ const GSignondSecurityContext *ctx,
+ GError **error)
{
return GSIGNOND_IDENTITY_IFACE_GET_INTERFACE (self)->
- get_auth_session (self, method, ctx);
+ get_auth_session (self, method, ctx, error);
}
/**
* @self: instance of #GSignondIdentityIface
* @params: authentication parameters to be verified
* @ctx: security context of the caller
+ * @error: Return location for error or @NULL.
*
* Initiates user verification process.
*
gboolean
gsignond_identity_iface_verify_user (GSignondIdentityIface *self,
const GVariant *params,
- const GSignondSecurityContext *ctx)
+ const GSignondSecurityContext *ctx,
+ GError **error)
{
return GSIGNOND_IDENTITY_IFACE_GET_INTERFACE (self)->
- verify_user (self, params, ctx);
+ verify_user (self, params, ctx, error);
}
/**
* @self: instance of #GSignondIdentityIface
* @secret: secret to be verified
* @ctx: security context of the caller
+ * @error: Return location for error or @NULL.
*
* Initiates secret verification process.
*
gboolean
gsignond_identity_iface_verify_secret (GSignondIdentityIface *self,
const gchar *secret,
- const GSignondSecurityContext *ctx)
+ const GSignondSecurityContext *ctx,
+ GError **error)
{
return GSIGNOND_IDENTITY_IFACE_GET_INTERFACE (self)->
- verify_secret (self, secret, ctx);
+ verify_secret (self, secret, ctx, error);
}
/**
* gsignond_identity_iface_remove:
* @self: instance of #GSignondIdentityIface
* @ctx: security context of the caller
+ * @error: Return location for error or @NULL.
*
* Removes identity information from underlined database
+ *
+ * Returns: @TRUE if success, @FALSE otherwise
*/
-void
+gboolean
gsignond_identity_iface_remove (GSignondIdentityIface *self,
- const GSignondSecurityContext *ctx)
+ const GSignondSecurityContext *ctx,
+ GError **error)
{
- GSIGNOND_IDENTITY_IFACE_GET_INTERFACE (self)->remove (self, ctx);
+ return GSIGNOND_IDENTITY_IFACE_GET_INTERFACE (self)->remove (self, ctx, error);
}
/**
* gsignond_identity_iface_sign_out:
* @self: instance of #GSignondIdentityIface
* @ctx: security context of the caller
+ * @error: Return location for error or @NULL.
*
* TODO: add description
*
*/
gboolean
gsignond_identity_iface_sign_out (GSignondIdentityIface *self,
- const GSignondSecurityContext *ctx)
+ const GSignondSecurityContext *ctx,
+ GError **error)
{
- return GSIGNOND_IDENTITY_IFACE_GET_INTERFACE (self)->sign_out (self, ctx);
+ return GSIGNOND_IDENTITY_IFACE_GET_INTERFACE (self)->sign_out (self, ctx, error);
}
/**
* @self: instance of #GSignondIdentityIface
* @info: identity information to store
* @ctx: security context of the caller
+ * @error: Return location for error or @NULL.
*
* Saves given identity information #info to database
*
guint32
gsignond_identity_iface_store (GSignondIdentityIface *self,
const GVariant *info,
- const GSignondSecurityContext *ctx)
+ const GSignondSecurityContext *ctx,
+ GError **error)
{
- return GSIGNOND_IDENTITY_IFACE_GET_INTERFACE (self)->store (self, info, ctx);
+ return GSIGNOND_IDENTITY_IFACE_GET_INTERFACE (self)->store (self, info, ctx, error);
}
/**
* @self: instance of #GSignondIdentityIface
* @reference: reference name
* @ctx: security context of the caller
+ * @error: Return location for error or @NULL.
*
* Adds a named reference #reference to identity
*
gint32
gsignond_identity_iface_add_reference (GSignondIdentityIface *self,
const gchar *reference,
- const GSignondSecurityContext *ctx)
+ const GSignondSecurityContext *ctx,
+ GError **error)
{
return GSIGNOND_IDENTITY_IFACE_GET_INTERFACE (self)->
- add_reference (self, reference, ctx);
+ add_reference (self, reference, ctx, error);
}
/**
* @self: instance of #GSignondIdentityIface
* @reference: reference name
* @ctx: security context of the caller
+ * @error: Return location for error or @NULL.
*
* Removes a named reference #reference to identity
*
gint32
gsignond_identity_iface_remove_reference (GSignondIdentityIface *self,
const gchar *reference,
- const GSignondSecurityContext *ctx)
+ const GSignondSecurityContext *ctx,
+ GError **error)
{
return GSIGNOND_IDENTITY_IFACE_GET_INTERFACE (self)->
- add_reference (self, reference, ctx);
+ add_reference (self, reference, ctx, error);
}
GSignondAccessControlManager *
{
g_signal_emit (self, signals[SIG_INFO_UPDATED], 0, change);
}
-
* @identity: Instance of #GSignondIdentityIface
* @message: message to be shown to user
* @ctx: security context of the caller
+ * @error: Return location for error or @NULL.
*
* Requests user to update username and password for this identity @identity.
* Once the process is done, emits "credentials-updated" signal
*
* Returns: @TRUE on success, @FALSE otherwise
*/
- gboolean (*request_credentials_update) (GSignondIdentityIface *identity, const gchar *message, const GSignondSecurityContext *ctx);
+ gboolean (*request_credentials_update) (GSignondIdentityIface *identity, const gchar *message, const GSignondSecurityContext *ctx, GError **error);
/**
* get_info:
* @identity: Instance of #GSignondIdentityIface
* @ctx: security context of the caller
+ * @error: Return location for error or @NULL.
*
* Retrives identity information stroed for this identity.
*
* Returns: (transfer full)identity information
*/
- GVariant *(*get_info) (GSignondIdentityIface *identity, const GSignondSecurityContext *ctx);
+ GVariant *(*get_info) (GSignondIdentityIface *identity, const GSignondSecurityContext *ctx, GError **error);
/**
* get_auth_session:
* @identity: Instance of #GSignondIdentityIface
* @method: authentication method to use
* @ctx: security context of the caller
+ * @error: Return location for error or @NULL.
*
* Opens an authentication session for #identity using authentication method #method.
*
* Returns: (transfers none) Dbus object path of the session object
*/
- const gchar * (*get_auth_session) (GSignondIdentityIface *identity, const gchar *method, const GSignondSecurityContext *ctx);
+ const gchar * (*get_auth_session) (GSignondIdentityIface *identity, const gchar *method, const GSignondSecurityContext *ctx, GError **error);
/**
* verify_user:
* @identity: Instance of #GSignondIdentityIface
* @params:
* @ctx: security context of the caller
+ * @error: Return location for error or @NULL.
*
* Starts user verification process. Once the verification process completed
* that is informed via #user_verified.
*
* Returns: @TRUE on success, @FALSE otherwise
*/
- gboolean (*verify_user) (GSignondIdentityIface *identity, const GVariant *params, const GSignondSecurityContext *ctx);
+ gboolean (*verify_user) (GSignondIdentityIface *identity, const GVariant *params, const GSignondSecurityContext *ctx, GError **error);
/**
* verify_secret:
* @identity: Instance of #GSignondIdentityIface
* @secret: secret to verify
* @ctx: security context of the caller
+ * @error: Return location for error or @NULL.
*
* Starts secret verification process. Once the verification process completed
* that is informed via #secret_verified
*
* Returns: @TRUE on success, @FALSE otherwise
*/
- gboolean (*verify_secret) (GSignondIdentityIface *identity, const gchar *secret, const GSignondSecurityContext *ctx);
+ gboolean (*verify_secret) (GSignondIdentityIface *identity, const gchar *secret, const GSignondSecurityContext *ctx, GError **error);
/**
* remove:
* @identity: Instance of #GSignondIdentityIface
* @ctx: security context of the caller
+ * @error: Return location for error or @NULL.
*
* Removes identity from database
+ *
+ * Returns: @TRUE on success, @FALSE otherwise
*/
- void (*remove) (GSignondIdentityIface *identity, const GSignondSecurityContext *ctx);
+ gboolean (*remove) (GSignondIdentityIface *identity, const GSignondSecurityContext *ctx, GError **error);
/**
* store:
* @identity: Instance of #GSignondIdentityIface
* @info: information to be stored
* @ctx: security context of the caller
+ * @error: Return location for error or @NULL.
*
* Stores the given identity information @info to database.
*
* Returns: id of the identity
*/
- guint32 (*store) (GSignondIdentityIface *identity, const GVariant *info, const GSignondSecurityContext *ctx);
+ guint32 (*store) (GSignondIdentityIface *identity, const GVariant *info, const GSignondSecurityContext *ctx, GError **error);
/**
* sign_out:
* @identity: Instance of #GSignondIdentityIface
* @ctx: security context of the caller
+ * @error: Return location for error or @NULL.
*
* Returns: @TRUE on success, @FALSE otherwise.
*/
- gboolean (*sign_out) (GSignondIdentityIface *identity, const GSignondSecurityContext *ctx);
+ gboolean (*sign_out) (GSignondIdentityIface *identity, const GSignondSecurityContext *ctx, GError **error);
/**
* add_reference:
* @identity: Instance of #GSignondIdentityIface
* @reference: named referece
* @ctx: security context of the caller
+ * @error: Return location for error or @NULL.
*
* Adds a named referece to identity.
*
* Returns: identity id
*/
- gint32 (*add_reference) (GSignondIdentityIface *identity, const gchar *reference, const GSignondSecurityContext *ctx);
+ gint32 (*add_reference) (GSignondIdentityIface *identity, const gchar *reference, const GSignondSecurityContext *ctx, GError **error);
/**
* remove_reference:
* @identity: Instance of #GSignondIdentityIface
* @reference: name of the reference to be removed
* @ctx: security context of the caller
+ * @error: Return location for error or @NULL.
*
* Removes named reference @reference form list of references of identity @identity.
*
* Returns: identity id
*/
- gint32 (*remove_reference) (GSignondIdentityIface *identity, const gchar *reference, const GSignondSecurityContext *ctx);
+ gint32 (*remove_reference) (GSignondIdentityIface *identity, const gchar *reference, const GSignondSecurityContext *ctx, GError **error);
/**
* get_acm:
gsignond_identity_iface_request_credentials_update (
GSignondIdentityIface *self,
const gchar *message,
- const GSignondSecurityContext *ctx);
+ const GSignondSecurityContext *ctx,
+ GError **error);
GVariant *
gsignond_identity_iface_get_info (GSignondIdentityIface *self,
- const GSignondSecurityContext *ctx);
+ const GSignondSecurityContext *ctx,
+ GError **error);
const gchar *
gsignond_identity_iface_get_auth_session (GSignondIdentityIface *iface,
const gchar *method,
- const GSignondSecurityContext *ctx);
+ const GSignondSecurityContext *ctx,
+ GError **error);
gboolean
gsignond_identity_iface_verify_user (GSignondIdentityIface *self,
const GVariant *params,
- const GSignondSecurityContext *ctx);
+ const GSignondSecurityContext *ctx,
+ GError **error);
gboolean
gsignond_identity_iface_verify_secret (GSignondIdentityIface *self,
const gchar *secret,
- const GSignondSecurityContext *ctx);
+ const GSignondSecurityContext *ctx,
+ GError **error);
-void
+gboolean
gsignond_identity_iface_remove (GSignondIdentityIface *self,
- const GSignondSecurityContext *ctx);
+ const GSignondSecurityContext *ctx,
+ GError **error);
gboolean
gsignond_identity_iface_sign_out (GSignondIdentityIface *self,
- const GSignondSecurityContext *ctx);
+ const GSignondSecurityContext *ctx,
+ GError **error);
guint32
gsignond_identity_iface_store (GSignondIdentityIface *self,
const GVariant *info,
- const GSignondSecurityContext *ctx);
+ const GSignondSecurityContext *ctx,
+ GError **error);
gint32
gsignond_identity_iface_add_reference (GSignondIdentityIface *self,
const gchar *reference,
- const GSignondSecurityContext *ctx);
+ const GSignondSecurityContext *ctx,
+ GError **error);
gint32
gsignond_identity_iface_remove_reference (GSignondIdentityIface *self,
const gchar *reference,
- const GSignondSecurityContext *ctx);
+ const GSignondSecurityContext *ctx,
+ GError **error);
GSignondAccessControlManager *
gsignond_identity_iface_get_acm (GSignondIdentityIface *self);
NULL, NULL,
NULL,
G_TYPE_BOOLEAN,
- 1,
- GSIGNOND_TYPE_IDENTITY_INFO);
+ 0,
+ G_TYPE_NONE);
signals[SIG_STORE] = g_signal_new ("store",
GSIGNOND_TYPE_IDENTITY,
G_SIGNAL_RUN_FIRST | G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,