Mercurial > pidgin
comparison libpurple/connection.h @ 21424:ba061949650c
I don't think that incorrect passwords can be helpfully distinguished from
other authentication errors (other than invalid usernames, for instance). For
example, if you typo the username but enter the correct password, it's not the
password that's wrong.
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Sun, 11 Nov 2007 21:37:39 +0000 |
parents | 56a608b80fda |
children | 8ffb65f3c0e9 |
comparison
equal
deleted
inserted
replaced
21423:375d10e84c4b | 21424:ba061949650c |
---|---|
64 * data). | 64 * data). |
65 */ | 65 */ |
66 PURPLE_CONNECTION_ERROR_NETWORK_ERROR = 0, | 66 PURPLE_CONNECTION_ERROR_NETWORK_ERROR = 0, |
67 /** The username supplied was not valid. */ | 67 /** The username supplied was not valid. */ |
68 PURPLE_CONNECTION_ERROR_INVALID_USERNAME = 1, | 68 PURPLE_CONNECTION_ERROR_INVALID_USERNAME = 1, |
69 /** The password was incorrect. */ | |
70 PURPLE_CONNECTION_ERROR_INCORRECT_PASSWORD = 2, | |
71 /** The username, password or some other credential was incorrect. Use | 69 /** The username, password or some other credential was incorrect. Use |
72 * the above two errors if the username or password in particular are | 70 * the above errors if the username is known to be invalid. |
73 * known to be incorrect. | 71 */ |
74 */ | 72 PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED = 2, |
75 PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED = 3, | |
76 /** libpurple doesn't speak any of the authentication methods the | 73 /** libpurple doesn't speak any of the authentication methods the |
77 * server offered. | 74 * server offered. |
78 */ | 75 */ |
79 PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE = 4, | 76 PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE = 3, |
80 /** libpurple was built without SSL support, and the connection needs | 77 /** libpurple was built without SSL support, and the connection needs |
81 * SSL. | 78 * SSL. |
82 */ | 79 */ |
83 PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT = 5, | 80 PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT = 4, |
84 /** There was an error negotiating SSL on this connection, or the | 81 /** There was an error negotiating SSL on this connection, or the |
85 * server does not support encryption but an account option was set to | 82 * server does not support encryption but an account option was set to |
86 * require it. | 83 * require it. |
87 */ | 84 */ |
88 PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR = 6, | 85 PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR = 5, |
89 /** Someone is already connected to the server using the name you are | 86 /** Someone is already connected to the server using the name you are |
90 * trying to connect with. | 87 * trying to connect with. |
91 */ | 88 */ |
92 PURPLE_CONNECTION_ERROR_NAME_IN_USE = 7, | 89 PURPLE_CONNECTION_ERROR_NAME_IN_USE = 6, |
93 | 90 |
94 /** The username/server/other preference for the account isn't valid. | 91 /** The username/server/other preference for the account isn't valid. |
95 * For instance, on IRC the screen name cannot contain white space. | 92 * For instance, on IRC the screen name cannot contain white space. |
96 * This reason should not be used for incorrect passwords etc: use | 93 * This reason should not be used for incorrect passwords etc: use |
97 * #PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED for that. | 94 * #PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED for that. |
98 * | 95 * |
99 * @todo This reason really shouldn't be necessary. Usernames and | 96 * @todo This reason really shouldn't be necessary. Usernames and |
100 * other account preferences should be validated when the | 97 * other account preferences should be validated when the |
101 * account is created. | 98 * account is created. |
102 */ | 99 */ |
103 PURPLE_CONNECTION_ERROR_INVALID_SETTINGS = 8, | 100 PURPLE_CONNECTION_ERROR_INVALID_SETTINGS = 7, |
104 | 101 |
105 /** The server did not provide a SSL certificate. */ | 102 /** The server did not provide a SSL certificate. */ |
106 PURPLE_CONNECTION_ERROR_CERT_NOT_PROVIDED = 9, | 103 PURPLE_CONNECTION_ERROR_CERT_NOT_PROVIDED = 8, |
107 /** The server's SSL certificate could not be trusted. */ | 104 /** The server's SSL certificate could not be trusted. */ |
108 PURPLE_CONNECTION_ERROR_CERT_UNTRUSTED = 10, | 105 PURPLE_CONNECTION_ERROR_CERT_UNTRUSTED = 9, |
109 /** The server's SSL certificate has expired. */ | 106 /** The server's SSL certificate has expired. */ |
110 PURPLE_CONNECTION_ERROR_CERT_EXPIRED = 11, | 107 PURPLE_CONNECTION_ERROR_CERT_EXPIRED = 10, |
111 /** The server's SSL certificate is not yet valid. */ | 108 /** The server's SSL certificate is not yet valid. */ |
112 PURPLE_CONNECTION_ERROR_CERT_NOT_ACTIVATED = 12, | 109 PURPLE_CONNECTION_ERROR_CERT_NOT_ACTIVATED = 11, |
113 /** The server's SSL certificate did not match its hostname. */ | 110 /** The server's SSL certificate did not match its hostname. */ |
114 PURPLE_CONNECTION_ERROR_CERT_HOSTNAME_MISMATCH = 13, | 111 PURPLE_CONNECTION_ERROR_CERT_HOSTNAME_MISMATCH = 12, |
115 /** The server's SSL certificate does not have the expected | 112 /** The server's SSL certificate does not have the expected |
116 * fingerprint. | 113 * fingerprint. |
117 */ | 114 */ |
118 PURPLE_CONNECTION_ERROR_CERT_FINGERPRINT_MISMATCH = 14, | 115 PURPLE_CONNECTION_ERROR_CERT_FINGERPRINT_MISMATCH = 13, |
119 /** The server's SSL certificate is self-signed. */ | 116 /** The server's SSL certificate is self-signed. */ |
120 PURPLE_CONNECTION_ERROR_CERT_SELF_SIGNED = 15, | 117 PURPLE_CONNECTION_ERROR_CERT_SELF_SIGNED = 14, |
121 /** There was some other error validating the server's SSL certificate. | 118 /** There was some other error validating the server's SSL certificate. |
122 */ | 119 */ |
123 PURPLE_CONNECTION_ERROR_CERT_OTHER_ERROR = 16, | 120 PURPLE_CONNECTION_ERROR_CERT_OTHER_ERROR = 15, |
124 | 121 |
125 /** Some other error occured which fits into none of the other | 122 /** Some other error occured which fits into none of the other |
126 * categories. | 123 * categories. |
127 */ | 124 */ |
128 /* purple_connection_error_reason() in connection.c uses the fact that | 125 /* purple_connection_error_reason() in connection.c uses the fact that |
129 * this is the last member of the enum when sanity-checking; if other | 126 * this is the last member of the enum when sanity-checking; if other |
130 * reasons are added after it, the check must be updated. | 127 * reasons are added after it, the check must be updated. |
131 */ | 128 */ |
132 PURPLE_CONNECTION_ERROR_OTHER_ERROR = 17 | 129 PURPLE_CONNECTION_ERROR_OTHER_ERROR = 16 |
133 } PurpleConnectionError; | 130 } PurpleConnectionError; |
134 | 131 |
135 /** Holds the type of an error along with its description. */ | 132 /** Holds the type of an error along with its description. */ |
136 typedef struct | 133 typedef struct |
137 { | 134 { |