1 /* vi: set et sw=4 ts=4 cino=t0,(0: */
2 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
4 * This file is part of libsignon-glib
6 * Copyright (C) 2009-2010 Nokia Corporation.
8 * Contact: Alberto Mardegan <alberto.mardegan@nokia.com>
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public License
12 * version 2.1 as published by the Free Software Foundation.
14 * This library is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25 #ifndef __LIBSIGNON_ERRORS_H__
26 #define __LIBSIGNON_ERRORS_H__
29 #include <glib-object.h>
30 #include "signon-enum-types.h"
32 #define SIGNON_ERROR (signon_error_quark())
36 * @SIGNON_ERROR_UNKNOWN: Catch-all for errors not distinguished by another code.
37 * @SIGNON_ERROR_INTERNAL_SERVER: Signon daemon internal error.
38 * @SIGNON_ERROR_INTERNAL_COMMUNICATION: Error communicating with Sigon daemon.
39 * @SIGNON_ERROR_PERMISSION_DENIED: The operation cannot be performed due to
40 * insufficient client permissions.
41 * @SIGNON_ERROR_METHOD_NOT_KNOWN: The method with this name was not found.
42 * @SIGNON_ERROR_SERVICE_NOT_AVAILABLE: The service is temporarily unavailable.
43 * @SIGNON_ERROR_INVALID_QUERY: Parameters for the query are invalid.
44 * @SIGNON_ERROR_METHOD_NOT_AVAILABLE: The requested method is not available.
45 * @SIGNON_ERROR_IDENTITY_NOT_FOUND: The identity mathching the #SignonIdentity
46 * was not found on the service.
47 * @SIGNON_ERROR_STORE_FAILED: Storing credentials failed.
48 * @SIGNON_ERROR_REMOVE_FAILED: Removing credentials failed.
49 * @SIGNON_ERROR_SIGNOUT_FAILED: Signing out failed.
50 * @SIGNON_ERROR_IDENTITY_OPERATION_CANCELED: Identity operation was canceled
52 * @SIGNON_ERROR_CREDENTIALS_NOT_AVAILABLE: Query failed.
53 * @SIGNON_ERROR_REFERENCE_NOT_FOUND: Trying to remove non-existent reference.
54 * @SIGNON_ERROR_MECHANISM_NOT_AVAILABLE: The requested mechanism in not
56 * @SIGNON_ERROR_MISSING_DATA: The #SessionData does not contain the necessary
58 * @SIGNON_ERROR_INVALID_CREDENTIALS: The supplied credentials are invalid for
59 * the mechanism implementation.
60 * @SIGNON_ERROR_NOT_AUTHORIZED: Authorization failed.
61 * @SIGNON_ERROR_WRONG_STATE: An operation method has been called in an
63 * @SIGNON_ERROR_OPERATION_NOT_SUPPORTED: The operation is not supported by the
64 * mechanism implementation.
65 * @SIGNON_ERROR_NO_CONNECTION: No network connection.
66 * @SIGNON_ERROR_NETWORK: Network connection failed.
67 * @SIGNON_ERROR_SSL: SSL connection failed.
68 * @SIGNON_ERROR_RUNTIME: Casting #SessionData into subclass failed.
69 * @SIGNON_ERROR_SESSION_CANCELED: Challenge was canceled.
70 * @SIGNON_ERROR_TIMED_OUT: Challenge timed out.
71 * @SIGNON_ERROR_USER_INTERACTION: User interaction dialog failed.
72 * @SIGNON_ERROR_OPERATION_FAILED: Temporary failure in authentication.
73 * @SIGNON_ERROR_ENCRYPTION_FAILED: @deprecated: Failure during data
74 * encryption/decryption.
75 * @SIGNON_ERROR_TOS_NOT_ACCEPTED: User declined Terms of Service.
76 * @SIGNON_ERROR_FORGOT_PASSWORD: User requested password reset sequence.
77 * @SIGNON_ERROR_METHOD_OR_MECHANISM_NOT_ALLOWED: Method or mechanism not
78 * allowed for this identity.
79 * @SIGNON_ERROR_INCORRECT_DATE: Date/time incorrect on device.
80 * @SIGNON_ERROR_USER_ERROR: Placeholder to rearrange enumeration - userspace
83 * Possible Signon errors.
86 SIGNON_ERROR_UNKNOWN = 1,
87 SIGNON_ERROR_INTERNAL_SERVER = 2,
88 SIGNON_ERROR_INTERNAL_COMMUNICATION = 3,
89 SIGNON_ERROR_PERMISSION_DENIED = 4,
91 SIGNON_ERROR_METHOD_NOT_KNOWN = 101,
92 SIGNON_ERROR_SERVICE_NOT_AVAILABLE,
93 SIGNON_ERROR_INVALID_QUERY,
95 SIGNON_ERROR_METHOD_NOT_AVAILABLE = 201,
96 SIGNON_ERROR_IDENTITY_NOT_FOUND,
97 SIGNON_ERROR_STORE_FAILED,
98 SIGNON_ERROR_REMOVE_FAILED,
99 SIGNON_ERROR_SIGNOUT_FAILED,
100 SIGNON_ERROR_IDENTITY_OPERATION_CANCELED,
101 SIGNON_ERROR_CREDENTIALS_NOT_AVAILABLE,
102 SIGNON_ERROR_REFERENCE_NOT_FOUND,
104 SIGNON_ERROR_MECHANISM_NOT_AVAILABLE = 301,
105 SIGNON_ERROR_MISSING_DATA,
106 SIGNON_ERROR_INVALID_CREDENTIALS,
107 SIGNON_ERROR_NOT_AUTHORIZED,
108 SIGNON_ERROR_WRONG_STATE,
109 SIGNON_ERROR_OPERATION_NOT_SUPPORTED,
110 SIGNON_ERROR_NO_CONNECTION,
111 SIGNON_ERROR_NETWORK,
113 SIGNON_ERROR_RUNTIME,
114 SIGNON_ERROR_SESSION_CANCELED,
115 SIGNON_ERROR_TIMED_OUT,
116 SIGNON_ERROR_USER_INTERACTION,
117 SIGNON_ERROR_OPERATION_FAILED,
118 SIGNON_ERROR_ENCRYPTION_FAILED,
119 SIGNON_ERROR_TOS_NOT_ACCEPTED,
120 SIGNON_ERROR_FORGOT_PASSWORD,
121 SIGNON_ERROR_METHOD_OR_MECHANISM_NOT_ALLOWED,
122 SIGNON_ERROR_INCORRECT_DATE,
123 SIGNON_ERROR_USER_ERROR = 400
126 GQuark signon_error_quark (void);