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 libgsignon-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"
35 * This macro is used when creating a #GError in libgsignond-glib library
37 #define SIGNON_ERROR (signon_error_quark())
39 //FIXME: reuse error definitions from libgsignond-common
42 * @SIGNON_ERROR_UNKNOWN: Catch-all for errors not distinguished by another code.
43 * @SIGNON_ERROR_INTERNAL_SERVER: Signon daemon internal error.
44 * @SIGNON_ERROR_INTERNAL_COMMUNICATION: Error communicating with Signon daemon.
45 * @SIGNON_ERROR_PERMISSION_DENIED: The operation cannot be performed due to
46 * insufficient client permissions.
47 * @SIGNON_ERROR_METHOD_NOT_KNOWN: The method with this name was not found.
48 * @SIGNON_ERROR_SERVICE_NOT_AVAILABLE: The service is temporarily unavailable.
49 * @SIGNON_ERROR_INVALID_QUERY: Parameters for the query are invalid.
50 * @SIGNON_ERROR_METHOD_NOT_AVAILABLE: The requested method is not available.
51 * @SIGNON_ERROR_IDENTITY_NOT_FOUND: The identity mathching the #SignonIdentity
52 * was not found on the service.
53 * @SIGNON_ERROR_STORE_FAILED: Storing credentials failed.
54 * @SIGNON_ERROR_REMOVE_FAILED: Removing credentials failed.
55 * @SIGNON_ERROR_SIGNOUT_FAILED: Signing out failed.
56 * @SIGNON_ERROR_IDENTITY_OPERATION_CANCELED: Identity operation was canceled
58 * @SIGNON_ERROR_CREDENTIALS_NOT_AVAILABLE: Query failed.
59 * @SIGNON_ERROR_REFERENCE_NOT_FOUND: Trying to remove non-existent reference.
60 * @SIGNON_ERROR_MECHANISM_NOT_AVAILABLE: The requested mechanism in not
62 * @SIGNON_ERROR_MISSING_DATA: The SessionData does not contain the necessary
64 * @SIGNON_ERROR_INVALID_CREDENTIALS: The supplied credentials are invalid for
65 * the mechanism implementation.
66 * @SIGNON_ERROR_NOT_AUTHORIZED: Authorization failed.
67 * @SIGNON_ERROR_WRONG_STATE: An operation method has been called in an
69 * @SIGNON_ERROR_OPERATION_NOT_SUPPORTED: The operation is not supported by the
70 * mechanism implementation.
71 * @SIGNON_ERROR_NO_CONNECTION: No network connection.
72 * @SIGNON_ERROR_NETWORK: Network connection failed.
73 * @SIGNON_ERROR_SSL: SSL connection failed.
74 * @SIGNON_ERROR_RUNTIME: Casting SessionData into subclass failed.
75 * @SIGNON_ERROR_SESSION_CANCELED: Challenge was canceled.
76 * @SIGNON_ERROR_TIMED_OUT: Challenge timed out.
77 * @SIGNON_ERROR_USER_INTERACTION: User interaction dialog failed.
78 * @SIGNON_ERROR_OPERATION_FAILED: Temporary failure in authentication.
79 * @SIGNON_ERROR_ENCRYPTION_FAILED: @deprecated: Failure during data
80 * encryption/decryption.
81 * @SIGNON_ERROR_TOS_NOT_ACCEPTED: User declined Terms of Service.
82 * @SIGNON_ERROR_FORGOT_PASSWORD: User requested password reset sequence.
83 * @SIGNON_ERROR_METHOD_OR_MECHANISM_NOT_ALLOWED: Method or mechanism not
84 * allowed for this identity.
85 * @SIGNON_ERROR_INCORRECT_DATE: Date/time incorrect on device.
86 * @SIGNON_ERROR_USER_ERROR: Placeholder to rearrange enumeration - userspace
89 * Possible Signon errors.
92 SIGNON_ERROR_UNKNOWN = 1,
93 SIGNON_ERROR_INTERNAL_SERVER = 2,
94 SIGNON_ERROR_INTERNAL_COMMUNICATION = 3,
95 SIGNON_ERROR_PERMISSION_DENIED = 4,
97 SIGNON_ERROR_METHOD_NOT_KNOWN = 101,
98 SIGNON_ERROR_SERVICE_NOT_AVAILABLE,
99 SIGNON_ERROR_INVALID_QUERY,
101 SIGNON_ERROR_METHOD_NOT_AVAILABLE = 201,
102 SIGNON_ERROR_IDENTITY_NOT_FOUND,
103 SIGNON_ERROR_STORE_FAILED,
104 SIGNON_ERROR_REMOVE_FAILED,
105 SIGNON_ERROR_SIGNOUT_FAILED,
106 SIGNON_ERROR_IDENTITY_OPERATION_CANCELED,
107 SIGNON_ERROR_CREDENTIALS_NOT_AVAILABLE,
108 SIGNON_ERROR_REFERENCE_NOT_FOUND,
110 SIGNON_ERROR_MECHANISM_NOT_AVAILABLE = 301,
111 SIGNON_ERROR_MISSING_DATA,
112 SIGNON_ERROR_INVALID_CREDENTIALS,
113 SIGNON_ERROR_NOT_AUTHORIZED,
114 SIGNON_ERROR_WRONG_STATE,
115 SIGNON_ERROR_OPERATION_NOT_SUPPORTED,
116 SIGNON_ERROR_NO_CONNECTION,
117 SIGNON_ERROR_NETWORK,
119 SIGNON_ERROR_RUNTIME,
120 SIGNON_ERROR_SESSION_CANCELED,
121 SIGNON_ERROR_TIMED_OUT,
122 SIGNON_ERROR_USER_INTERACTION,
123 SIGNON_ERROR_OPERATION_FAILED,
124 SIGNON_ERROR_ENCRYPTION_FAILED,
125 SIGNON_ERROR_TOS_NOT_ACCEPTED,
126 SIGNON_ERROR_FORGOT_PASSWORD,
127 SIGNON_ERROR_METHOD_OR_MECHANISM_NOT_ALLOWED,
128 SIGNON_ERROR_INCORRECT_DATE,
129 SIGNON_ERROR_USER_ERROR = 400
132 GQuark signon_error_quark (void);