libpurple/purpleconnectionerrorinfo.h

Sun, 14 Apr 2024 01:14:59 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Sun, 14 Apr 2024 01:14:59 -0500
changeset 42725
ceb13f1de2d2
parent 42656
df9aafbae930
permissions
-rw-r--r--

Remove PurpleBuddy

PurpleContactInfo was created long ago to replace this, it is now its time!

Testing Done:
Ran the turtles.

Reviewed at https://reviews.imfreedom.org/r/3123/

41714
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * Purple - Internet Messaging Library
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42398
diff changeset
5 * Purple is the legal property of its developers, whose names are too numerous
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42398
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42398
diff changeset
7 * source distribution.
41714
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 *
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42398
diff changeset
9 * This library is free software; you can redistribute it and/or modify it
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42398
diff changeset
10 * under the terms of the GNU General Public License as published by the Free
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42398
diff changeset
11 * Software Foundation; either version 2 of the License, or (at your option)
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42398
diff changeset
12 * any later version.
41714
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 *
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42398
diff changeset
14 * This library is distributed in the hope that it will be useful, but WITHOUT
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42398
diff changeset
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42398
diff changeset
16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42398
diff changeset
17 * more details.
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42398
diff changeset
18 *
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42398
diff changeset
19 * You should have received a copy of the GNU General Public License along with
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42398
diff changeset
20 * this library; if not, see <https://www.gnu.org/licenses/>.
41714
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION)
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 # error "only <purple.h> may be included directly"
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 #endif
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 #ifndef PURPLE_CONNECTION_ERROR_INFO_H
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 #define PURPLE_CONNECTION_ERROR_INFO_H
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 #include <glib.h>
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 #include <glib-object.h>
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41714
diff changeset
33 #include "purpleversion.h"
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41714
diff changeset
34
41714
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35 G_BEGIN_DECLS
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37 /**
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 * PurpleConnectionError:
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39 * @PURPLE_CONNECTION_ERROR_NETWORK_ERROR: There was an error sending or
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 * receiving on the network socket, or there was some protocol error
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 * (such as the server sending malformed data).
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42 * @PURPLE_CONNECTION_ERROR_INVALID_USERNAME: The username supplied was not
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43 * valid.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44 * @PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED: The username, password or
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45 * some other credential was incorrect. Use
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 * #PURPLE_CONNECTION_ERROR_INVALID_USERNAME instead if the username
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47 * is known to be invalid.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48 * @PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE: libpurple doesn't speak
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49 * any of the authentication methods the server offered.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 * @PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT: libpurple was built without SSL
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 * support, and the connection needs SSL.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 * @PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR: There was an error negotiating
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53 * SSL on this connection, or the server does not support encryption
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54 * but an account option was set to require it.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 * @PURPLE_CONNECTION_ERROR_NAME_IN_USE: Someone is already connected to the
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 * server using the name you are trying to connect with.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 * @PURPLE_CONNECTION_ERROR_INVALID_SETTINGS: The username/server/other
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 * preference for the account isn't valid. For instance, on IRC the
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59 * username cannot contain white space. This reason should not be used
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
60 * for incorrect passwords etc: use
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 * #PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED for that.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
62 * @PURPLE_CONNECTION_ERROR_CERT_NOT_PROVIDED: The server did not provide a
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
63 * SSL certificate.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64 * @PURPLE_CONNECTION_ERROR_CERT_UNTRUSTED: The server's SSL certificate could
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
65 * not be trusted.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
66 * @PURPLE_CONNECTION_ERROR_CERT_EXPIRED: The server's SSL certificate has
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
67 * expired.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
68 * @PURPLE_CONNECTION_ERROR_CERT_NOT_ACTIVATED: The server's SSL certificate is
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
69 * not yet valid.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
70 * @PURPLE_CONNECTION_ERROR_CERT_HOSTNAME_MISMATCH: The server's SSL
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
71 * certificate did not match its hostname.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
72 * @PURPLE_CONNECTION_ERROR_CERT_FINGERPRINT_MISMATCH: The server's SSL
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
73 * certificate does not have the expected fingerprint.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
74 * @PURPLE_CONNECTION_ERROR_CERT_SELF_SIGNED: The server's SSL certificate is
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
75 * self-signed.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
76 * @PURPLE_CONNECTION_ERROR_CERT_OTHER_ERROR: There was some other error
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77 * validating the server's SSL certificate.
42656
df9aafbae930 Add a doc-check unit test to libpurple and fix the issues it has found
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
78 * @PURPLE_CONNECTION_ERROR_CUSTOM_TEMPORARY: A custom error that is temporary.
df9aafbae930 Add a doc-check unit test to libpurple and fix the issues it has found
Gary Kramlich <grim@reaperworld.com>
parents: 42613
diff changeset
79 * @PURPLE_CONNECTION_ERROR_CUSTOM_FATAL: A custom error that is fatal.
41714
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80 * @PURPLE_CONNECTION_ERROR_OTHER_ERROR: Some other error occurred which fits
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81 * into none of the other categories.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
82 *
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
83 * Possible errors that can cause a connection to be closed.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
84 */
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85 typedef enum
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
86 {
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
87 PURPLE_CONNECTION_ERROR_NETWORK_ERROR = 0,
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
88 PURPLE_CONNECTION_ERROR_INVALID_USERNAME = 1,
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
89 PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED = 2,
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
90 PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE = 3,
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
91 PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT = 4,
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
92 PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR = 5,
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
93 PURPLE_CONNECTION_ERROR_NAME_IN_USE = 6,
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
94
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
95 /* TODO This reason really shouldn't be necessary. Usernames and
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
96 * other account preferences should be validated when the
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
97 * account is created. */
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
98 PURPLE_CONNECTION_ERROR_INVALID_SETTINGS = 7,
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
99
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
100 PURPLE_CONNECTION_ERROR_CERT_NOT_PROVIDED = 8,
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
101 PURPLE_CONNECTION_ERROR_CERT_UNTRUSTED = 9,
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
102 PURPLE_CONNECTION_ERROR_CERT_EXPIRED = 10,
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
103 PURPLE_CONNECTION_ERROR_CERT_NOT_ACTIVATED = 11,
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
104 PURPLE_CONNECTION_ERROR_CERT_HOSTNAME_MISMATCH = 12,
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
105 PURPLE_CONNECTION_ERROR_CERT_FINGERPRINT_MISMATCH = 13,
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
106 PURPLE_CONNECTION_ERROR_CERT_SELF_SIGNED = 14,
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
107 PURPLE_CONNECTION_ERROR_CERT_OTHER_ERROR = 15,
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
108
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
109 PURPLE_CONNECTION_ERROR_CUSTOM_TEMPORARY = 16,
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
110 PURPLE_CONNECTION_ERROR_CUSTOM_FATAL = 17,
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
111
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
112 /* purple_connection_error() in connection.c uses the fact that
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
113 * this is the last member of the enum when sanity-checking; if other
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
114 * reasons are added after it, the check must be updated.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
115 */
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
116 PURPLE_CONNECTION_ERROR_OTHER_ERROR = 18
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
117 } PurpleConnectionError;
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
118
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
119 /**
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
120 * PurpleConnectionErrorInfo:
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
121 * @type: The type of error.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
122 * @description: A localised, human-readable description of the error.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
123 *
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
124 * Holds the type of an error along with its description.
42398
00178e755de6 Export symbols and add Since tags for 2.3 API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42391
diff changeset
125 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
126 * Since: 2.3
41714
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
127 */
42398
00178e755de6 Export symbols and add Since tags for 2.3 API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42391
diff changeset
128 PURPLE_AVAILABLE_TYPE_IN_2_3
41714
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
129 typedef struct
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
130 {
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
131 PurpleConnectionError type;
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
132 char *description;
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
133 } PurpleConnectionErrorInfo;
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
134
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
135
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
136 #define PURPLE_TYPE_CONNECTION_ERROR_INFO (purple_connection_error_info_get_type())
42391
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
137
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
138 PURPLE_AVAILABLE_IN_3_0
41714
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
139 GType purple_connection_error_info_get_type(void);
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
140
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
141 /**
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
142 * purple_connection_error_info_new:
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
143 * @type: The [enum@Purple.ConnectionError] of the error.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
144 * @description: The description of the error.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
145 *
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
146 * Creates a new error info with the given properties.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
147 *
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
148 * Returns: (transfer full): The new instance.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
149 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
150 * Since: 3.0
41714
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
151 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41714
diff changeset
152 PURPLE_AVAILABLE_IN_3_0
41714
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
153 PurpleConnectionErrorInfo *purple_connection_error_info_new(PurpleConnectionError type, const gchar *description);
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
154
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
155 /**
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
156 * purple_connection_error_info_copy:
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
157 * @info: The instance to copy.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
158 *
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
159 * Creates a copy of @info.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
160 *
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
161 * Returns: (transfer full): A new copy of @info.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
162 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
163 * Since: 3.0
41714
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
164 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41714
diff changeset
165 PURPLE_AVAILABLE_IN_3_0
41714
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
166 PurpleConnectionErrorInfo *purple_connection_error_info_copy(PurpleConnectionErrorInfo *info);
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
167
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
168 /**
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
169 * purple_connection_error_info_free:
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
170 * @info: The instance to free.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
171 *
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
172 * Frees the memory associated with @info.
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
173 *
42613
780d7efe37c2 Remove the micro version from since tags for libpurple part 2
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
174 * Since: 3.0
41714
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
175 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41714
diff changeset
176 PURPLE_AVAILABLE_IN_3_0
41714
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
177 void purple_connection_error_info_free(PurpleConnectionErrorInfo *info);
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
178
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
179 G_END_DECLS
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
180
318204db6284 Split PurpleConnectionErrorInfo out to its own file
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
181 #endif /* PURPLE_CONNECTION_ERROR_INFO_H */

mercurial