libpurple/purpleconnection.h

Sat, 09 Aug 2025 17:37:27 +0800

author
Gong Zhile <gongzl@stu.hebust.edu.cn>
date
Sat, 09 Aug 2025 17:37:27 +0800
branch
bird-header-fix
changeset 43304
2599d35e9750
parent 43285
acde304cf24c
permissions
-rw-r--r--

Fix the birb header path

The birb header referred would only work with birb provided by wrap casuing
build to fail because of system-installed birb dependency. The commit points
it to the correct path <birb.h>.

See: https://keep.imfreedom.org/birb/birb/file/5bf00c7d7f80/birb/meson.build#l77

42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42542
diff changeset
1 /*
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42542
diff changeset
2 * Purple - Internet Messaging Library
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42542
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
5 * Purple is the legal property of its developers, whose names are too numerous
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42542
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
8046
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7122
diff changeset
7 * source distribution.
6460
fc288e7221ca [gaim-migrate @ 6969]
Christian Hammond <chipx86@chipx86.com>
parents: 6393
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: 42542
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: 42542
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: 42542
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: 42542
diff changeset
12 * any later version.
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.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: 42542
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: 42542
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: 42542
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: 42542
diff changeset
17 * more details.
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 *
42594
eddde70cedd8 Create a test for verifying license headers and correct the ones that were wrong
Gary Kramlich <grim@reaperworld.com>
parents: 42542
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: 42542
diff changeset
20 * this library; if not, see <https://www.gnu.org/licenses/>.
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 */
35487
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35486
diff changeset
22
40474
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40369
diff changeset
23 #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION)
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40369
diff changeset
24 # error "only <purple.h> may be included directly"
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40369
diff changeset
25 #endif
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40369
diff changeset
26
39659
e4dfb99b0cef Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39549
diff changeset
27 #ifndef PURPLE_CONNECTION_H
e4dfb99b0cef Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39549
diff changeset
28 #define PURPLE_CONNECTION_H
35433
8dcae6cd6628 Add section blocks for account.h to connection.h
Ankit Vani <a@nevitus.org>
parents: 35419
diff changeset
29
37961
2ee4c67768f4 connection: Support PurpleConnectionError GErrors
Mike Ruprecht <cmaiku@gmail.com>
parents: 37959
diff changeset
30 #include <glib.h>
41792
715d38814f5d Make PurpleConnection derivable, which also means adding a private structure.
Gary Kramlich <grim@reaperworld.com>
parents: 41715
diff changeset
31 #include <glib-object.h>
715d38814f5d Make PurpleConnection derivable, which also means adding a private structure.
Gary Kramlich <grim@reaperworld.com>
parents: 41715
diff changeset
32
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
33 #include "purpleversion.h"
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
34
41792
715d38814f5d Make PurpleConnection derivable, which also means adding a private structure.
Gary Kramlich <grim@reaperworld.com>
parents: 41715
diff changeset
35 G_BEGIN_DECLS
37961
2ee4c67768f4 connection: Support PurpleConnectionError GErrors
Mike Ruprecht <cmaiku@gmail.com>
parents: 37959
diff changeset
36
42989
0c386608e7a7 Modernization and random cleanup of Purple.Connection
Gary Kramlich <grim@reaperworld.com>
parents: 42949
diff changeset
37 /**
0c386608e7a7 Modernization and random cleanup of Purple.Connection
Gary Kramlich <grim@reaperworld.com>
parents: 42949
diff changeset
38 * PurpleConnection:
0c386608e7a7 Modernization and random cleanup of Purple.Connection
Gary Kramlich <grim@reaperworld.com>
parents: 42949
diff changeset
39 *
0c386608e7a7 Modernization and random cleanup of Purple.Connection
Gary Kramlich <grim@reaperworld.com>
parents: 42949
diff changeset
40 * Represents an active connection on an account.
43285
acde304cf24c Fix some Since tags
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 43237
diff changeset
41 *
acde304cf24c Fix some Since tags
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 43237
diff changeset
42 * Since: 2.0
42989
0c386608e7a7 Modernization and random cleanup of Purple.Connection
Gary Kramlich <grim@reaperworld.com>
parents: 42949
diff changeset
43 */
0c386608e7a7 Modernization and random cleanup of Purple.Connection
Gary Kramlich <grim@reaperworld.com>
parents: 42949
diff changeset
44
0c386608e7a7 Modernization and random cleanup of Purple.Connection
Gary Kramlich <grim@reaperworld.com>
parents: 42949
diff changeset
45 #define PURPLE_TYPE_CONNECTION (purple_connection_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
46
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
47 PURPLE_AVAILABLE_IN_3_0
41792
715d38814f5d Make PurpleConnection derivable, which also means adding a private structure.
Gary Kramlich <grim@reaperworld.com>
parents: 41715
diff changeset
48 G_DECLARE_DERIVABLE_TYPE(PurpleConnection, purple_connection, PURPLE,
715d38814f5d Make PurpleConnection derivable, which also means adding a private structure.
Gary Kramlich <grim@reaperworld.com>
parents: 41715
diff changeset
49 CONNECTION, GObject)
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
50
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
51 /**
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
52 * PurpleConnectionState:
41812
c3cd920261b6 Fix the namespace of the PurpleConnectionState enum constants
Gary Kramlich <grim@reaperworld.com>
parents: 41799
diff changeset
53 * @PURPLE_CONNECTION_STATE_DISCONNECTED: Disconnected
c3cd920261b6 Fix the namespace of the PurpleConnectionState enum constants
Gary Kramlich <grim@reaperworld.com>
parents: 41799
diff changeset
54 * @PURPLE_CONNECTION_STATE_DISCONNECTING: Disconnecting
c3cd920261b6 Fix the namespace of the PurpleConnectionState enum constants
Gary Kramlich <grim@reaperworld.com>
parents: 41799
diff changeset
55 * @PURPLE_CONNECTION_STATE_CONNECTED: Connected
c3cd920261b6 Fix the namespace of the PurpleConnectionState enum constants
Gary Kramlich <grim@reaperworld.com>
parents: 41799
diff changeset
56 * @PURPLE_CONNECTION_STATE_CONNECTING: Connecting
c3cd920261b6 Fix the namespace of the PurpleConnectionState enum constants
Gary Kramlich <grim@reaperworld.com>
parents: 41799
diff changeset
57 *
c3cd920261b6 Fix the namespace of the PurpleConnectionState enum constants
Gary Kramlich <grim@reaperworld.com>
parents: 41799
diff changeset
58 * A representation of the state of a [class@Purple.Connection].
42413
9ca3a03253ca Add Since and visibility tags to connections API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
59 *
42612
d905313bc732 Remove the micro version from since tags for libpurple part 1
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
60 * Since: 2.0
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
61 */
41812
c3cd920261b6 Fix the namespace of the PurpleConnectionState enum constants
Gary Kramlich <grim@reaperworld.com>
parents: 41799
diff changeset
62 typedef enum {
42413
9ca3a03253ca Add Since and visibility tags to connections API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
63 PURPLE_CONNECTION_STATE_DISCONNECTED PURPLE_AVAILABLE_ENUMERATOR_IN_3_0 = 0,
9ca3a03253ca Add Since and visibility tags to connections API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
64 PURPLE_CONNECTION_STATE_DISCONNECTING PURPLE_AVAILABLE_ENUMERATOR_IN_3_0,
9ca3a03253ca Add Since and visibility tags to connections API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
65 PURPLE_CONNECTION_STATE_CONNECTED PURPLE_AVAILABLE_ENUMERATOR_IN_3_0,
9ca3a03253ca Add Since and visibility tags to connections API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
66 PURPLE_CONNECTION_STATE_CONNECTING PURPLE_AVAILABLE_ENUMERATOR_IN_3_0
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
67 } PurpleConnectionState;
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
68
37961
2ee4c67768f4 connection: Support PurpleConnectionError GErrors
Mike Ruprecht <cmaiku@gmail.com>
parents: 37959
diff changeset
69 /**
41156
268e57363246 Remove private data from PurpleConnection and fix up PURPLE_CONNECTION_ERROR
Gary Kramlich <grim@reaperworld.com>
parents: 41155
diff changeset
70 * PURPLE_CONNECTION_ERROR:
37961
2ee4c67768f4 connection: Support PurpleConnectionError GErrors
Mike Ruprecht <cmaiku@gmail.com>
parents: 37959
diff changeset
71 *
2ee4c67768f4 connection: Support PurpleConnectionError GErrors
Mike Ruprecht <cmaiku@gmail.com>
parents: 37959
diff changeset
72 * Error domain for Purple connection errors. Errors in this domain will be
2ee4c67768f4 connection: Support PurpleConnectionError GErrors
Mike Ruprecht <cmaiku@gmail.com>
parents: 37959
diff changeset
73 * from the #PurpleConnectionError enum.
41156
268e57363246 Remove private data from PurpleConnection and fix up PURPLE_CONNECTION_ERROR
Gary Kramlich <grim@reaperworld.com>
parents: 41155
diff changeset
74 *
42612
d905313bc732 Remove the micro version from since tags for libpurple part 1
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
75 * Since: 3.0
37961
2ee4c67768f4 connection: Support PurpleConnectionError GErrors
Mike Ruprecht <cmaiku@gmail.com>
parents: 37959
diff changeset
76 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
77 #define PURPLE_CONNECTION_ERROR \
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
78 g_quark_from_static_string("purple-connection-error") \
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
79 PURPLE_AVAILABLE_MACRO_IN_3_0
37961
2ee4c67768f4 connection: Support PurpleConnectionError GErrors
Mike Ruprecht <cmaiku@gmail.com>
parents: 37959
diff changeset
80
43008
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
81 /**
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
82 * PurpleConnectionError:
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
83 * @PURPLE_CONNECTION_ERROR_NETWORK_ERROR: There was an error sending or
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
84 * receiving on the network socket, or there was some protocol error
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
85 * (such as the server sending malformed data).
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
86 * @PURPLE_CONNECTION_ERROR_INVALID_USERNAME: The username supplied was not
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
87 * valid.
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
88 * @PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED: The username, password or
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
89 * some other credential was incorrect. Use
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
90 * #PURPLE_CONNECTION_ERROR_INVALID_USERNAME instead if the username
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
91 * is known to be invalid.
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
92 * @PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE: libpurple doesn't speak
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
93 * any of the authentication methods the server offered.
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
94 * @PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT: libpurple was built without SSL
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
95 * support, and the connection needs SSL.
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
96 * @PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR: There was an error negotiating
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
97 * SSL on this connection, or the server does not support encryption
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
98 * but an account option was set to require it.
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
99 * @PURPLE_CONNECTION_ERROR_NAME_IN_USE: Someone is already connected to the
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
100 * server using the name you are trying to connect with.
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
101 * @PURPLE_CONNECTION_ERROR_INVALID_SETTINGS: The username/server/other
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
102 * preference for the account isn't valid. For instance, on IRC the
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
103 * username cannot contain white space. This reason should not be used
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
104 * for incorrect passwords etc: use
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
105 * #PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED for that.
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
106 * @PURPLE_CONNECTION_ERROR_CERT_NOT_PROVIDED: The server did not provide a
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
107 * SSL certificate.
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
108 * @PURPLE_CONNECTION_ERROR_CERT_UNTRUSTED: The server's SSL certificate could
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
109 * not be trusted.
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
110 * @PURPLE_CONNECTION_ERROR_CERT_EXPIRED: The server's SSL certificate has
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
111 * expired.
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
112 * @PURPLE_CONNECTION_ERROR_CERT_NOT_ACTIVATED: The server's SSL certificate is
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
113 * not yet valid.
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
114 * @PURPLE_CONNECTION_ERROR_CERT_HOSTNAME_MISMATCH: The server's SSL
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
115 * certificate did not match its hostname.
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
116 * @PURPLE_CONNECTION_ERROR_CERT_FINGERPRINT_MISMATCH: The server's SSL
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
117 * certificate does not have the expected fingerprint.
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
118 * @PURPLE_CONNECTION_ERROR_CERT_SELF_SIGNED: The server's SSL certificate is
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
119 * self-signed.
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
120 * @PURPLE_CONNECTION_ERROR_CERT_OTHER_ERROR: There was some other error
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
121 * validating the server's SSL certificate.
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
122 * @PURPLE_CONNECTION_ERROR_CUSTOM_TEMPORARY: A custom error that is temporary.
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
123 * @PURPLE_CONNECTION_ERROR_CUSTOM_FATAL: A custom error that is fatal.
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
124 * @PURPLE_CONNECTION_ERROR_OTHER_ERROR: Some other error occurred which fits
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
125 * into none of the other categories.
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
126 *
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
127 * Possible errors that can cause a connection to be closed.
43285
acde304cf24c Fix some Since tags
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 43237
diff changeset
128 *
acde304cf24c Fix some Since tags
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 43237
diff changeset
129 * Since: 2.0
43008
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
130 */
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
131 typedef enum
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
132 {
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
133 PURPLE_CONNECTION_ERROR_NETWORK_ERROR = 0,
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
134 PURPLE_CONNECTION_ERROR_INVALID_USERNAME = 1,
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
135 PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED = 2,
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
136 PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE = 3,
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
137 PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT = 4,
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
138 PURPLE_CONNECTION_ERROR_ENCRYPTION_ERROR = 5,
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
139 PURPLE_CONNECTION_ERROR_NAME_IN_USE = 6,
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
140
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
141 /* TODO This reason really shouldn't be necessary. Usernames and
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
142 * other account preferences should be validated when the
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
143 * account is created. */
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
144 PURPLE_CONNECTION_ERROR_INVALID_SETTINGS = 7,
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
145
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
146 PURPLE_CONNECTION_ERROR_CERT_NOT_PROVIDED = 8,
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
147 PURPLE_CONNECTION_ERROR_CERT_UNTRUSTED = 9,
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
148 PURPLE_CONNECTION_ERROR_CERT_EXPIRED = 10,
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
149 PURPLE_CONNECTION_ERROR_CERT_NOT_ACTIVATED = 11,
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
150 PURPLE_CONNECTION_ERROR_CERT_HOSTNAME_MISMATCH = 12,
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
151 PURPLE_CONNECTION_ERROR_CERT_FINGERPRINT_MISMATCH = 13,
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
152 PURPLE_CONNECTION_ERROR_CERT_SELF_SIGNED = 14,
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
153 PURPLE_CONNECTION_ERROR_CERT_OTHER_ERROR = 15,
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
154
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
155 PURPLE_CONNECTION_ERROR_CUSTOM_TEMPORARY = 16,
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
156 PURPLE_CONNECTION_ERROR_CUSTOM_FATAL = 17,
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
157
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
158 /* purple_connection_error() in connection.c uses the fact that
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
159 * this is the last member of the enum when sanity-checking; if other
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
160 * reasons are added after it, the check must be updated.
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
161 */
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
162 PURPLE_CONNECTION_ERROR_OTHER_ERROR = 18
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
163 } PurpleConnectionError;
d46e90e0757a Remove Purple.ConnectionErrorInfo
Gary Kramlich <grim@reaperworld.com>
parents: 42998
diff changeset
164
42344
c51d37734155 Rename account.[ch] to purpleaccount.[ch]
Gary Kramlich <grim@reaperworld.com>
parents: 42163
diff changeset
165 #include "purpleaccount.h"
41155
922c9e70900c Rename protocol.[ch] to purpleprotocol.[ch]
Gary Kramlich <grim@reaperworld.com>
parents: 41034
diff changeset
166 #include "purpleprotocol.h"
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
167
41792
715d38814f5d Make PurpleConnection derivable, which also means adding a private structure.
Gary Kramlich <grim@reaperworld.com>
parents: 41715
diff changeset
168 struct _PurpleConnectionClass {
715d38814f5d Make PurpleConnection derivable, which also means adding a private structure.
Gary Kramlich <grim@reaperworld.com>
parents: 41715
diff changeset
169 /*< private >*/
715d38814f5d Make PurpleConnection derivable, which also means adding a private structure.
Gary Kramlich <grim@reaperworld.com>
parents: 41715
diff changeset
170 GObjectClass parent;
715d38814f5d Make PurpleConnection derivable, which also means adding a private structure.
Gary Kramlich <grim@reaperworld.com>
parents: 41715
diff changeset
171
41869
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
172 gboolean (*connect)(PurpleConnection *connection, GError **error);
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
173 gboolean (*disconnect)(PurpleConnection *connection, GError **error);
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
174
41792
715d38814f5d Make PurpleConnection derivable, which also means adding a private structure.
Gary Kramlich <grim@reaperworld.com>
parents: 41715
diff changeset
175 /*< private >*/
715d38814f5d Make PurpleConnection derivable, which also means adding a private structure.
Gary Kramlich <grim@reaperworld.com>
parents: 41715
diff changeset
176 gpointer reserved[8];
715d38814f5d Make PurpleConnection derivable, which also means adding a private structure.
Gary Kramlich <grim@reaperworld.com>
parents: 41715
diff changeset
177 };
715d38814f5d Make PurpleConnection derivable, which also means adding a private structure.
Gary Kramlich <grim@reaperworld.com>
parents: 41715
diff changeset
178
6581
dd89eb44f0ee [gaim-migrate @ 7103]
Nathan Walp <nwalp@pidgin.im>
parents: 6488
diff changeset
179 /**
41869
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
180 * purple_connection_connect:
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
181 * @connection: The instance.
41881
7e1dd7e9efbb Fix error parameter annotations
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41869
diff changeset
182 * @error: Return address for a #GError, or %NULL.
41869
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
183 *
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
184 * Tells the connection to connect. This is done by calling the
43237
c641f6bea7dd Move the connection-state implementation to Purple.Account
Gary Kramlich <grim@reaperworld.com>
parents: 43037
diff changeset
185 * [vfunc@Purple.Connection.connect] function.
41869
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
186 *
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
187 * Due to the asynchronous nature of network connections, the return value and
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
188 * @error are to be used to do some initial validation before a connection is
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
189 * actually attempted.
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
190 *
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
191 * Returns: %TRUE if the initial connection for @account was successful,
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
192 * otherwise %FALSE with @error possibly set.
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
193 *
42612
d905313bc732 Remove the micro version from since tags for libpurple part 1
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
194 * Since: 3.0
41869
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
195 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
196 PURPLE_AVAILABLE_IN_3_0
41869
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
197 gboolean purple_connection_connect(PurpleConnection *connection, GError **error);
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
198
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
199 /**
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
200 * purple_connection_disconnect:
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
201 * @connection: The instance.
41881
7e1dd7e9efbb Fix error parameter annotations
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41869
diff changeset
202 * @error: Return address for a #GError, or %NULL.
41869
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
203 *
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
204 * Tells the connection to disconnect. This is done by calling the
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
205 * [vfunc@Purple.Connection.disconnect] function. State is managed by this
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
206 * function.
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
207 *
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
208 * Returns: %TRUE if the account was disconnected gracefully, otherwise %FALSE
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
209 * with @error possibly set.
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
210 *
42612
d905313bc732 Remove the micro version from since tags for libpurple part 1
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
211 * Since: 3.0
41869
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
212 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
213 PURPLE_AVAILABLE_IN_3_0
41869
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
214 gboolean purple_connection_disconnect(PurpleConnection *connection, GError **error);
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
215
7bd5bff547b4 Change the way accounts connect while keeping backwards compatibility
Gary Kramlich <grim@reaperworld.com>
parents: 41850
diff changeset
216 /**
41300
fa932768f319 Add an ID property to PurpleConnection
Gary Kramlich <grim@reaperworld.com>
parents: 41200
diff changeset
217 * purple_connection_get_id:
fa932768f319 Add an ID property to PurpleConnection
Gary Kramlich <grim@reaperworld.com>
parents: 41200
diff changeset
218 * @connection: The connection.
fa932768f319 Add an ID property to PurpleConnection
Gary Kramlich <grim@reaperworld.com>
parents: 41200
diff changeset
219 *
fa932768f319 Add an ID property to PurpleConnection
Gary Kramlich <grim@reaperworld.com>
parents: 41200
diff changeset
220 * Gets the identifier of the connection.
fa932768f319 Add an ID property to PurpleConnection
Gary Kramlich <grim@reaperworld.com>
parents: 41200
diff changeset
221 *
fa932768f319 Add an ID property to PurpleConnection
Gary Kramlich <grim@reaperworld.com>
parents: 41200
diff changeset
222 * Returns: The identifier of the connection.
fa932768f319 Add an ID property to PurpleConnection
Gary Kramlich <grim@reaperworld.com>
parents: 41200
diff changeset
223 *
42612
d905313bc732 Remove the micro version from since tags for libpurple part 1
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
224 * Since: 3.0
41300
fa932768f319 Add an ID property to PurpleConnection
Gary Kramlich <grim@reaperworld.com>
parents: 41200
diff changeset
225 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
226 PURPLE_AVAILABLE_IN_3_0
41300
fa932768f319 Add an ID property to PurpleConnection
Gary Kramlich <grim@reaperworld.com>
parents: 41200
diff changeset
227 const gchar *purple_connection_get_id(PurpleConnection *connection);
fa932768f319 Add an ID property to PurpleConnection
Gary Kramlich <grim@reaperworld.com>
parents: 41200
diff changeset
228
fa932768f319 Add an ID property to PurpleConnection
Gary Kramlich <grim@reaperworld.com>
parents: 41200
diff changeset
229 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
230 * purple_connection_get_account:
42989
0c386608e7a7 Modernization and random cleanup of Purple.Connection
Gary Kramlich <grim@reaperworld.com>
parents: 42949
diff changeset
231 * @connection: The connection.
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
232 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
233 * Returns the connection's account.
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
234 *
38745
f4376b1f4682 A ton more of introspection cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 38716
diff changeset
235 * Returns: (transfer none): The connection's account.
42413
9ca3a03253ca Add Since and visibility tags to connections API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
236 *
42612
d905313bc732 Remove the micro version from since tags for libpurple part 1
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
237 * Since: 2.0
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
238 */
42413
9ca3a03253ca Add Since and visibility tags to connections API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
239 PURPLE_AVAILABLE_IN_ALL
42989
0c386608e7a7 Modernization and random cleanup of Purple.Connection
Gary Kramlich <grim@reaperworld.com>
parents: 42949
diff changeset
240 PurpleAccount *purple_connection_get_account(PurpleConnection *connection);
5563
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
241
d5a7852aa0cb [gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
242 /**
37040
91119588bc3a Merge gtkdoc-conversion
Ankit Vani <a@nevitus.org>
parents: 37037 35397
diff changeset
243 * purple_connection_get_protocol:
42989
0c386608e7a7 Modernization and random cleanup of Purple.Connection
Gary Kramlich <grim@reaperworld.com>
parents: 42949
diff changeset
244 * @connection: The connection.
22336
ac905bb0a8ec Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22277
diff changeset
245 *
37040
91119588bc3a Merge gtkdoc-conversion
Ankit Vani <a@nevitus.org>
parents: 37037 35397
diff changeset
246 * Returns the protocol managing a connection.
22336
ac905bb0a8ec Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22277
diff changeset
247 *
38745
f4376b1f4682 A ton more of introspection cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 38716
diff changeset
248 * Returns: (transfer none): The protocol.
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
249 *
42612
d905313bc732 Remove the micro version from since tags for libpurple part 1
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
250 * Since: 3.0
22336
ac905bb0a8ec Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22277
diff changeset
251 */
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
252 PURPLE_AVAILABLE_IN_3_0
42989
0c386608e7a7 Modernization and random cleanup of Purple.Connection
Gary Kramlich <grim@reaperworld.com>
parents: 42949
diff changeset
253 PurpleProtocol *purple_connection_get_protocol(PurpleConnection *connection);
22336
ac905bb0a8ec Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22277
diff changeset
254
ac905bb0a8ec Add accessor and update finch to not touch the internals of PurpleConnection.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22277
diff changeset
255 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
256 * purple_connection_get_password:
42989
0c386608e7a7 Modernization and random cleanup of Purple.Connection
Gary Kramlich <grim@reaperworld.com>
parents: 42949
diff changeset
257 * @connection: The connection.
10740
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
258 *
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
259 * Returns the connection's password.
10740
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
260 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35042
diff changeset
261 * Returns: The connection's password.
42413
9ca3a03253ca Add Since and visibility tags to connections API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
262 *
42612
d905313bc732 Remove the micro version from since tags for libpurple part 1
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
263 * Since: 2.0
10740
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
264 */
42413
9ca3a03253ca Add Since and visibility tags to connections API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
265 PURPLE_AVAILABLE_IN_ALL
42989
0c386608e7a7 Modernization and random cleanup of Purple.Connection
Gary Kramlich <grim@reaperworld.com>
parents: 42949
diff changeset
266 const char *purple_connection_get_password(PurpleConnection *connection);
10740
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
267
a1cb6b819a21 [gaim-migrate @ 12342]
Mark Doliner <markdoliner@pidgin.im>
parents: 10738
diff changeset
268 /**
41850
7d551859bd94 Fix an issue where XMPP accounts weren't reading passwords from the credential manager
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
269 * purple_connection_set_password:
7d551859bd94 Fix an issue where XMPP accounts weren't reading passwords from the credential manager
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
270 * @connection: The instance.
7d551859bd94 Fix an issue where XMPP accounts weren't reading passwords from the credential manager
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
271 * @password: (nullable): The new password.
7d551859bd94 Fix an issue where XMPP accounts weren't reading passwords from the credential manager
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
272 *
7d551859bd94 Fix an issue where XMPP accounts weren't reading passwords from the credential manager
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
273 * Sets the password for @connection to @password.
7d551859bd94 Fix an issue where XMPP accounts weren't reading passwords from the credential manager
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
274 *
7d551859bd94 Fix an issue where XMPP accounts weren't reading passwords from the credential manager
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
275 * This will not change your password on the remote service. It just updates
7d551859bd94 Fix an issue where XMPP accounts weren't reading passwords from the credential manager
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
276 * the password that the protocol should use when connecting.
7d551859bd94 Fix an issue where XMPP accounts weren't reading passwords from the credential manager
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
277 *
7d551859bd94 Fix an issue where XMPP accounts weren't reading passwords from the credential manager
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
278 * This is generally used by protocol plugins that support multiple
7d551859bd94 Fix an issue where XMPP accounts weren't reading passwords from the credential manager
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
279 * authentication methods and need to prompt the user for a password.
7d551859bd94 Fix an issue where XMPP accounts weren't reading passwords from the credential manager
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
280 *
42612
d905313bc732 Remove the micro version from since tags for libpurple part 1
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
281 * Since: 3.0
41850
7d551859bd94 Fix an issue where XMPP accounts weren't reading passwords from the credential manager
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
282 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
283 PURPLE_AVAILABLE_IN_3_0
41850
7d551859bd94 Fix an issue where XMPP accounts weren't reading passwords from the credential manager
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
284 void purple_connection_set_password(PurpleConnection *connection, const char *password);
7d551859bd94 Fix an issue where XMPP accounts weren't reading passwords from the credential manager
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
285
7d551859bd94 Fix an issue where XMPP accounts weren't reading passwords from the credential manager
Gary Kramlich <grim@reaperworld.com>
parents: 41814
diff changeset
286 /**
42542
1407a0aac0bf Add a cancellable property to PurpleConnection and port IRCv3 to it
Gary Kramlich <grim@reaperworld.com>
parents: 42413
diff changeset
287 * purple_connection_get_cancellable:
1407a0aac0bf Add a cancellable property to PurpleConnection and port IRCv3 to it
Gary Kramlich <grim@reaperworld.com>
parents: 42413
diff changeset
288 * @connection: The instance.
1407a0aac0bf Add a cancellable property to PurpleConnection and port IRCv3 to it
Gary Kramlich <grim@reaperworld.com>
parents: 42413
diff changeset
289 *
1407a0aac0bf Add a cancellable property to PurpleConnection and port IRCv3 to it
Gary Kramlich <grim@reaperworld.com>
parents: 42413
diff changeset
290 * Gets the cancellable that should be used with @connection.
1407a0aac0bf Add a cancellable property to PurpleConnection and port IRCv3 to it
Gary Kramlich <grim@reaperworld.com>
parents: 42413
diff changeset
291 *
1407a0aac0bf Add a cancellable property to PurpleConnection and port IRCv3 to it
Gary Kramlich <grim@reaperworld.com>
parents: 42413
diff changeset
292 * Returns: (transfer none): The cancellable.
1407a0aac0bf Add a cancellable property to PurpleConnection and port IRCv3 to it
Gary Kramlich <grim@reaperworld.com>
parents: 42413
diff changeset
293 *
42612
d905313bc732 Remove the micro version from since tags for libpurple part 1
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
294 * Since: 3.0
42542
1407a0aac0bf Add a cancellable property to PurpleConnection and port IRCv3 to it
Gary Kramlich <grim@reaperworld.com>
parents: 42413
diff changeset
295 */
1407a0aac0bf Add a cancellable property to PurpleConnection and port IRCv3 to it
Gary Kramlich <grim@reaperworld.com>
parents: 42413
diff changeset
296 PURPLE_AVAILABLE_IN_3_0
1407a0aac0bf Add a cancellable property to PurpleConnection and port IRCv3 to it
Gary Kramlich <grim@reaperworld.com>
parents: 42413
diff changeset
297 GCancellable *purple_connection_get_cancellable(PurpleConnection *connection);
1407a0aac0bf Add a cancellable property to PurpleConnection and port IRCv3 to it
Gary Kramlich <grim@reaperworld.com>
parents: 42413
diff changeset
298
1407a0aac0bf Add a cancellable property to PurpleConnection and port IRCv3 to it
Gary Kramlich <grim@reaperworld.com>
parents: 42413
diff changeset
299 /**
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
300 * purple_connection_error_is_fatal:
40245
056a71665e06 Add a bunch of missing docs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 40215
diff changeset
301 * @reason: The connection error to check.
35397
31fa3a1aeff5 Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
302 *
20431
49979e453876 Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents: 20430
diff changeset
303 * Reports whether a disconnection reason is fatal (in which case the account
49979e453876 Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents: 20430
diff changeset
304 * should probably not be automatically reconnected) or transient (so
21149
160a0845b527 rlaager pointed out that purple_connection_error_reason should be setting
Will Thompson <resiak@pidgin.im>
parents: 21148
diff changeset
305 * auto-reconnection is a good idea).
40245
056a71665e06 Add a bunch of missing docs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 40215
diff changeset
306 *
21280
2db787ddddf8 Document that the char * parameter of purple_connection_error{,_reason} may
Will Thompson <resiak@pidgin.im>
parents: 21279
diff changeset
307 * For instance, #PURPLE_CONNECTION_ERROR_NETWORK_ERROR is a temporary error,
40245
056a71665e06 Add a bunch of missing docs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 40215
diff changeset
308 * which might be caused by losing the network connection, so <code>
056a71665e06 Add a bunch of missing docs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 40215
diff changeset
309 * purple_connection_error_is_fatal(PURPLE_CONNECTION_ERROR_NETWORK_ERROR)
056a71665e06 Add a bunch of missing docs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 40215
diff changeset
310 * </code> is %FALSE.
056a71665e06 Add a bunch of missing docs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 40215
diff changeset
311 *
056a71665e06 Add a bunch of missing docs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 40215
diff changeset
312 * On the other hand, #PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED probably
056a71665e06 Add a bunch of missing docs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 40215
diff changeset
313 * indicates a misconfiguration of the account which needs the user to go fix
056a71665e06 Add a bunch of missing docs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 40215
diff changeset
314 * it up, so <code>
056a71665e06 Add a bunch of missing docs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 40215
diff changeset
315 * purple_connection_error_is_fatal(PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED)
056a71665e06 Add a bunch of missing docs.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 40215
diff changeset
316 * </code> is %TRUE.
20431
49979e453876 Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents: 20430
diff changeset
317 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35042
diff changeset
318 * Returns: %TRUE if the account should not be automatically reconnected, and
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35042
diff changeset
319 * %FALSE otherwise.
42413
9ca3a03253ca Add Since and visibility tags to connections API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
320 *
42612
d905313bc732 Remove the micro version from since tags for libpurple part 1
Gary Kramlich <grim@reaperworld.com>
parents: 42594
diff changeset
321 * Since: 2.0
20431
49979e453876 Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents: 20430
diff changeset
322 */
42413
9ca3a03253ca Add Since and visibility tags to connections API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
323 PURPLE_AVAILABLE_IN_ALL
9ca3a03253ca Add Since and visibility tags to connections API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
324 gboolean purple_connection_error_is_fatal(PurpleConnectionError reason);
20431
49979e453876 Create purple_connection_reason_is_fatal, which is basically a replacement for
Will Thompson <resiak@pidgin.im>
parents: 20430
diff changeset
325
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32687
diff changeset
326 G_END_DECLS
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5872
diff changeset
327
39659
e4dfb99b0cef Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39549
diff changeset
328 #endif /* PURPLE_CONNECTION_H */

mercurial