Mon, 12 Sep 2022 22:08:59 -0500
Remove the list_icon vfunc from PurpleProtocol.
This was replaced by the icon-name, icon-resource-path, and icon-search-path
properties.
Testing Done:
Compiled
Reviewed at https://reviews.imfreedom.org/r/1749/
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
1 | /* purple |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
2 | * |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
3 | * Purple is the legal property of its developers, whose names are too numerous |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
4 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
5 | * source distribution. |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
6 | * |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
7 | * This program is free software; you can redistribute it and/or modify |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
8 | * it under the terms of the GNU General Public License as published by |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
9 | * the Free Software Foundation; either version 2 of the License, or |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
10 | * (at your option) any later version. |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
11 | * |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
12 | * This program is distributed in the hope that it will be useful, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
15 | * GNU General Public License for more details. |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
16 | * |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
17 | * You should have received a copy of the GNU General Public License |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
18 | * along with this program; if not, write to the Free Software |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
20 | */ |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
21 | |
|
39819
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39550
diff
changeset
|
22 | #ifndef PURPLE_FACEBOOK_MQTT_H |
|
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39550
diff
changeset
|
23 | #define PURPLE_FACEBOOK_MQTT_H |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
24 | |
|
37309
556eea7a45da
facebook: merged local glibcompat.h into libpurple's
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
25 | #include <glib.h> |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
26 | #include <string.h> |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
27 | |
|
40358
e6fe6fc1f516
move all protocols, purple plugins, and purple tests to use purple.h instead of including files individually
Gary Kramlich <grim@reaperworld.com>
parents:
40159
diff
changeset
|
28 | #include <purple.h> |
|
37310
a1a5f0ac39f2
facebook: cleaned up libpurple includes
James Geboski <jgeboski@gmail.com>
parents:
37309
diff
changeset
|
29 | |
|
39550
808e0a11eb9f
Use G_DECLARE* in facebook prpl.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38069
diff
changeset
|
30 | #define FB_TYPE_MQTT fb_mqtt_get_type() |
|
808e0a11eb9f
Use G_DECLARE* in facebook prpl.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38069
diff
changeset
|
31 | #define FB_TYPE_MQTT_MESSAGE fb_mqtt_message_get_type() |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
32 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
33 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
34 | * FB_MQTT_NAME: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
35 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
36 | * The name of the MQTT version. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
37 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
38 | #define FB_MQTT_NAME "MQTToT" |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
39 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
40 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
41 | * FB_MQTT_LEVEL: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
42 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
43 | * The level of the MQTT version. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
44 | */ |
|
37471
32c1e77d0474
facebook: coding style consistencies
James Geboski <jgeboski@gmail.com>
parents:
37415
diff
changeset
|
45 | #define FB_MQTT_LEVEL 3 |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
46 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
47 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
48 | * FB_MQTT_KA: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
49 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
50 | * The keep-alive timeout, in seconds, of the MQTT connection. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
51 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
52 | #define FB_MQTT_KA 60 |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
53 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
54 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
55 | * FB_MQTT_HOST: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
56 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
57 | * The MQTT host name for Facebook. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
58 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
59 | #define FB_MQTT_HOST "mqtt.facebook.com" |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
60 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
61 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
62 | * FB_MQTT_PORT: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
63 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
64 | * The MQTT host port for Facebook. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
65 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
66 | #define FB_MQTT_PORT 443 |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
67 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
68 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
69 | * FB_MQTT_TIMEOUT_CONN: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
70 | * |
|
40412
c0905847d779
Use g_timeout_add_seconds some more.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
40358
diff
changeset
|
71 | * The timeout, in seconds, to wait for a PING back from the server. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
72 | */ |
|
40412
c0905847d779
Use g_timeout_add_seconds some more.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
40358
diff
changeset
|
73 | #define FB_MQTT_TIMEOUT_CONN ((guint)(FB_MQTT_KA * 1.5)) |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
74 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
75 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
76 | * FB_MQTT_TIMEOUT_PING: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
77 | * |
|
40412
c0905847d779
Use g_timeout_add_seconds some more.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
40358
diff
changeset
|
78 | * The timeout, in seconds, to send a PING to the server. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
79 | */ |
|
40412
c0905847d779
Use g_timeout_add_seconds some more.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
40358
diff
changeset
|
80 | #define FB_MQTT_TIMEOUT_PING (FB_MQTT_KA) |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
81 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
82 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
83 | * FB_MQTT_ERROR: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
84 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
85 | * The #GQuark of the domain of MQTT errors. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
86 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
87 | #define FB_MQTT_ERROR fb_mqtt_error_quark() |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
88 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
89 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
90 | * FbMqttConnectFlags: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
91 | * @FB_MQTT_CONNECT_FLAG_CLR: Clear the session. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
92 | * @FB_MQTT_CONNECT_FLAG_WILL: A will message is in the payload. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
93 | * @FB_MQTT_CONNECT_FLAG_RET: Retain the will message. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
94 | * @FB_MQTT_CONNECT_FLAG_PASS: A password is in the payload. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
95 | * @FB_MQTT_CONNECT_FLAG_USER: A user name is in the payload. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
96 | * @FB_MQTT_CONNECT_FLAG_QOS0: Use no quality of service. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
97 | * @FB_MQTT_CONNECT_FLAG_QOS1: Use level one quality of service. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
98 | * @FB_MQTT_CONNECT_FLAG_QOS2: Use level two quality of service. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
99 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
100 | * The #FbMqttMessage flags for the CONNECT message. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
101 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
102 | typedef enum |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
103 | { |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
104 | FB_MQTT_CONNECT_FLAG_CLR = 1 << 1, |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
105 | FB_MQTT_CONNECT_FLAG_WILL = 1 << 2, |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
106 | FB_MQTT_CONNECT_FLAG_RET = 1 << 5, |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
107 | FB_MQTT_CONNECT_FLAG_PASS = 1 << 6, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
108 | FB_MQTT_CONNECT_FLAG_USER = 1 << 7, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
109 | FB_MQTT_CONNECT_FLAG_QOS0 = 0 << 3, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
110 | FB_MQTT_CONNECT_FLAG_QOS1 = 1 << 3, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
111 | FB_MQTT_CONNECT_FLAG_QOS2 = 2 << 3 |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
112 | } FbMqttConnectFlags; |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
113 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
114 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
115 | * FbMqttError: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
116 | * @FB_MQTT_ERROR_SUCCESS: There is no error. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
117 | * @FB_MQTT_ERROR_PRTVERS: Unacceptable protocol version. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
118 | * @FB_MQTT_ERROR_IDREJECT: Identifier rejected. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
119 | * @FB_MQTT_ERROR_SRVGONE: Server unavailable. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
120 | * @FB_MQTT_ERROR_USERPASS: Bad user name or password. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
121 | * @FB_MQTT_ERROR_UNAUTHORIZED: Not authorized. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
122 | * @FB_MQTT_ERROR_GENERAL: General failure. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
123 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
124 | * The error codes for the #FB_MQTT_ERROR domain. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
125 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
126 | typedef enum |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
127 | { |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
128 | FB_MQTT_ERROR_SUCCESS = 0, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
129 | FB_MQTT_ERROR_PRTVERS = 1, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
130 | FB_MQTT_ERROR_IDREJECT = 2, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
131 | FB_MQTT_ERROR_SRVGONE = 3, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
132 | FB_MQTT_ERROR_USERPASS = 4, |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
133 | FB_MQTT_ERROR_UNAUTHORIZED = 5, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
134 | FB_MQTT_ERROR_GENERAL |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
135 | } FbMqttError; |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
136 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
137 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
138 | * FbMqttMessageFlags: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
139 | * @FB_MQTT_MESSAGE_FLAG_RET: Retain messages. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
140 | * @FB_MQTT_MESSAGE_FLAG_DUP: Duplicate delivery of control packet. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
141 | * @FB_MQTT_MESSAGE_FLAG_QOS0: Use no quality of service. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
142 | * @FB_MQTT_MESSAGE_FLAG_QOS1: Use level one quality of service. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
143 | * @FB_MQTT_MESSAGE_FLAG_QOS2: Use level two quality of service. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
144 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
145 | * The #FbMqttMessage flags. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
146 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
147 | typedef enum |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
148 | { |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
149 | FB_MQTT_MESSAGE_FLAG_RET = 1 << 0, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
150 | FB_MQTT_MESSAGE_FLAG_DUP = 1 << 3, |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
151 | FB_MQTT_MESSAGE_FLAG_QOS0 = 0 << 1, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
152 | FB_MQTT_MESSAGE_FLAG_QOS1 = 1 << 1, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
153 | FB_MQTT_MESSAGE_FLAG_QOS2 = 2 << 1 |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
154 | } FbMqttMessageFlags; |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
155 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
156 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
157 | * FbMqttMessageType: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
158 | * @FB_MQTT_MESSAGE_TYPE_CONNECT: Requests a connection. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
159 | * @FB_MQTT_MESSAGE_TYPE_CONNACK: Connection acknowledgment. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
160 | * @FB_MQTT_MESSAGE_TYPE_PUBLISH: Requests a message publication. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
161 | * @FB_MQTT_MESSAGE_TYPE_PUBACK: Publication acknowledgment. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
162 | * @FB_MQTT_MESSAGE_TYPE_PUBREC: Publication received. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
163 | * @FB_MQTT_MESSAGE_TYPE_PUBREL: Publication released. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
164 | * @FB_MQTT_MESSAGE_TYPE_PUBCOMP: Publication complete. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
165 | * @FB_MQTT_MESSAGE_TYPE_SUBSCRIBE: Requests a subscription. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
166 | * @FB_MQTT_MESSAGE_TYPE_SUBACK: Subscription acknowledgment. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
167 | * @FB_MQTT_MESSAGE_TYPE_UNSUBSCRIBE: Requests an unsubscription. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
168 | * @FB_MQTT_MESSAGE_TYPE_UNSUBACK: Unsubscription acknowledgment. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
169 | * @FB_MQTT_MESSAGE_TYPE_PINGREQ: Requests a ping response. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
170 | * @FB_MQTT_MESSAGE_TYPE_PINGRESP: Ping response. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
171 | * @FB_MQTT_MESSAGE_TYPE_DISCONNECT: Requests a disconnection. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
172 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
173 | * The #FbMqttMessage types. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
174 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
175 | typedef enum |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
176 | { |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
177 | FB_MQTT_MESSAGE_TYPE_CONNECT = 1, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
178 | FB_MQTT_MESSAGE_TYPE_CONNACK = 2, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
179 | FB_MQTT_MESSAGE_TYPE_PUBLISH = 3, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
180 | FB_MQTT_MESSAGE_TYPE_PUBACK = 4, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
181 | FB_MQTT_MESSAGE_TYPE_PUBREC = 5, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
182 | FB_MQTT_MESSAGE_TYPE_PUBREL = 6, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
183 | FB_MQTT_MESSAGE_TYPE_PUBCOMP = 7, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
184 | FB_MQTT_MESSAGE_TYPE_SUBSCRIBE = 8, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
185 | FB_MQTT_MESSAGE_TYPE_SUBACK = 9, |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
186 | FB_MQTT_MESSAGE_TYPE_UNSUBSCRIBE = 10, |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
187 | FB_MQTT_MESSAGE_TYPE_UNSUBACK = 11, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
188 | FB_MQTT_MESSAGE_TYPE_PINGREQ = 12, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
189 | FB_MQTT_MESSAGE_TYPE_PINGRESP = 13, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
190 | FB_MQTT_MESSAGE_TYPE_DISCONNECT = 14 |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
191 | } FbMqttMessageType; |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
192 | |
|
39550
808e0a11eb9f
Use G_DECLARE* in facebook prpl.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38069
diff
changeset
|
193 | G_DECLARE_FINAL_TYPE(FbMqtt, fb_mqtt, FB, MQTT, GObject) |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
194 | |
|
39550
808e0a11eb9f
Use G_DECLARE* in facebook prpl.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38069
diff
changeset
|
195 | G_DECLARE_FINAL_TYPE(FbMqttMessage, fb_mqtt_message, FB, MQTT_MESSAGE, |
|
808e0a11eb9f
Use G_DECLARE* in facebook prpl.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38069
diff
changeset
|
196 | GObject) |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
197 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
198 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
199 | * fb_mqtt_error_quark: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
200 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
201 | * Gets the #GQuark of the domain of MQTT errors. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
202 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
203 | * Returns: The #GQuark of the domain. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
204 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
205 | GQuark |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
206 | fb_mqtt_error_quark(void); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
207 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
208 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
209 | * fb_mqtt_new: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
210 | * @gc: The #PurpleConnection. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
211 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
212 | * Creates a new #FbMqtt. The returned #FbMqtt should be freed with |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
213 | * #g_object_unref() when no longer needed. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
214 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
215 | * Returns: The new #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
216 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
217 | FbMqtt * |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
218 | fb_mqtt_new(PurpleConnection *gc); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
219 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
220 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
221 | * fb_mqtt_close: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
222 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
223 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
224 | * Closes the MQTT without sending the `DISCONNECT` message. The #FbMqtt |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
225 | * may be reopened after calling this. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
226 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
227 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
228 | fb_mqtt_close(FbMqtt *mqtt); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
229 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
230 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
231 | * fb_mqtt_error: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
232 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
233 | * @error: The #FbMqttError. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
234 | * @format: The format string literal. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
235 | * @...: The arguments for @format. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
236 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
237 | * Emits an #FbMqttError and closes the #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
238 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
239 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
240 | fb_mqtt_error(FbMqtt *mqtt, FbMqttError error, const gchar *format, ...) |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
241 | G_GNUC_PRINTF(3, 4); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
242 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
243 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
244 | * fb_mqtt_read: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
245 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
246 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
247 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
248 | * Reads an #FbMqttMessage into the #FbMqtt for processing. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
249 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
250 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
251 | fb_mqtt_read(FbMqtt *mqtt, FbMqttMessage *msg); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
252 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
253 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
254 | * fb_mqtt_write: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
255 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
256 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
257 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
258 | * Writes an #FbMqttMessage to the wire. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
259 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
260 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
261 | fb_mqtt_write(FbMqtt *mqtt, FbMqttMessage *msg); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
262 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
263 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
264 | * fb_mqtt_open: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
265 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
266 | * @host: The host name. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
267 | * @port: The port. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
268 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
269 | * Opens an SSL connection to the remote server. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
270 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
271 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
272 | fb_mqtt_open(FbMqtt *mqtt, const gchar *host, gint port); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
273 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
274 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
275 | * fb_mqtt_connect: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
276 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
277 | * @flags: The #FbMqttConnectFlags. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
278 | * @pload: The payload. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
279 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
280 | * Sends a message of type #FB_MQTT_MESSAGE_TYPE_CONNECT. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
281 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
282 | void |
|
37327
68220e4ccb15
facebook: upgraded MQTT version to MQTToT
James Geboski <jgeboski@gmail.com>
parents:
37311
diff
changeset
|
283 | fb_mqtt_connect(FbMqtt *mqtt, guint8 flags, const GByteArray *pload); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
284 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
285 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
286 | * fb_mqtt_connected: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
287 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
288 | * @error: #TRUE to error with no connection, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
289 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
290 | * Determines the connection state of the #FbMqtt, and optionally emits |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
291 | * an error. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
292 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
293 | * Returns: #TRUE if the #FbMqtt is connected, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
294 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
295 | gboolean |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
296 | fb_mqtt_connected(FbMqtt *mqtt, gboolean error); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
297 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
298 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
299 | * fb_mqtt_disconnect: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
300 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
301 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
302 | * Sends a message of type #FB_MQTT_MESSAGE_TYPE_DISCONNECT, and closes |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
303 | * the connection. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
304 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
305 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
306 | fb_mqtt_disconnect(FbMqtt *mqtt); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
307 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
308 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
309 | * fb_mqtt_publish: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
310 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
311 | * @topic: The topic. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
312 | * @pload: The payload. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
313 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
314 | * Sends a message of type #FB_MQTT_MESSAGE_TYPE_PUBLISH. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
315 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
316 | void |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
317 | fb_mqtt_publish(FbMqtt *mqtt, const gchar *topic, const GByteArray *pload); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
318 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
319 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
320 | * fb_mqtt_subscribe: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
321 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
322 | * @...: The %NULL-terminated list of topic/QoS pairs. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
323 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
324 | * Sends a message of type #FB_MQTT_MESSAGE_TYPE_SUBSCRIBE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
325 | */ |
|
40159
1e72d4cc60ad
Fix undefined behaviour of default argument promotion to va_start.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39819
diff
changeset
|
326 | void fb_mqtt_subscribe(FbMqtt *mqtt, ...) G_GNUC_NULL_TERMINATED; |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
327 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
328 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
329 | * fb_mqtt_unsubscribe: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
330 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
331 | * @topic1: The first topic. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
332 | * @...: The %NULL-terminated list of topics. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
333 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
334 | * Sends a message of type #FB_MQTT_MESSAGE_TYPE_UNSUBSCRIBE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
335 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
336 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
337 | fb_mqtt_unsubscribe(FbMqtt *mqtt, const gchar *topic1, ...) |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
338 | G_GNUC_NULL_TERMINATED; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
339 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
340 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
341 | * fb_mqtt_message_new: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
342 | * @type: The #FbMqttMessageType. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
343 | * @flags: The #FbMqttMessageFlags. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
344 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
345 | * Creates a new #FbMqttMessage. The returned #FbMqttMessage should be |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
346 | * freed with #g_object_unref() when no longer needed. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
347 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
348 | * Returns: The new #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
349 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
350 | FbMqttMessage * |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
351 | fb_mqtt_message_new(FbMqttMessageType type, FbMqttMessageFlags flags); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
352 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
353 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
354 | * fb_mqtt_message_new_bytes: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
355 | * @bytes: The #GByteArray. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
356 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
357 | * Creates a new #FbMqttMessage from a #GByteArray. The returned |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
358 | * #FbMqttMessage should be freed with #g_object_unref() when no |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
359 | * longer needed. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
360 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
361 | * Returns: The new #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
362 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
363 | FbMqttMessage * |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
364 | fb_mqtt_message_new_bytes(GByteArray *bytes); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
365 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
366 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
367 | * fb_mqtt_message_reset: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
368 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
369 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
370 | * Resets an #FbMqttMessage. This resets the cursor position, and |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
371 | * removes any sort of fixed header. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
372 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
373 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
374 | fb_mqtt_message_reset(FbMqttMessage *msg); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
375 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
376 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
377 | * fb_mqtt_message_bytes: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
378 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
379 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
380 | * Formats the internal #GByteArray of the #FbMqttMessage with the |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
381 | * required fixed header. This resets the cursor position. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
382 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
383 | * Returns: The internal #GByteArray. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
384 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
385 | const GByteArray * |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
386 | fb_mqtt_message_bytes(FbMqttMessage *msg); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
387 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
388 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
389 | * fb_mqtt_message_read: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
390 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
391 | * @data: The data buffer. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
392 | * @size: The size of @buffer. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
393 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
394 | * Reads data from the #FbMqttMessage into a buffer. If @data is #NULL, |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
395 | * this will simply advance the cursor position. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
396 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
397 | * Returns: #TRUE if the data was read, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
398 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
399 | gboolean |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
400 | fb_mqtt_message_read(FbMqttMessage *msg, gpointer data, guint size); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
401 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
402 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
403 | * fb_mqtt_message_read_r: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
404 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
405 | * @bytes: The #GByteArray. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
406 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
407 | * Reads the remaining data from the #FbMqttMessage into a #GByteArray. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
408 | * This is useful for obtaining the payload of a message. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
409 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
410 | * Returns: #TRUE if the data was read, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
411 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
412 | gboolean |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
413 | fb_mqtt_message_read_r(FbMqttMessage *msg, GByteArray *bytes); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
414 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
415 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
416 | * fb_mqtt_message_read_byte: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
417 | * @msg: The #FbMqttMessage. |
|
37415
a06ade737f26
facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
418 | * @value: The return location for the value or #NULL. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
419 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
420 | * Reads an 8-bit integer value from the #FbMqttMessage. If @value is |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
421 | * #NULL, this will simply advance the cursor position. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
422 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
423 | * Returns: #TRUE if the value was read, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
424 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
425 | gboolean |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
426 | fb_mqtt_message_read_byte(FbMqttMessage *msg, guint8 *value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
427 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
428 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
429 | * fb_mqtt_message_read_mid: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
430 | * @msg: The #FbMqttMessage. |
|
37415
a06ade737f26
facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
431 | * @value: The return location for the value or #NULL. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
432 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
433 | * Reads a message identifier from the #FbMqttMessage. If @value is |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
434 | * #NULL, this will simply advance the cursor position. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
435 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
436 | * Returns: #TRUE if the value was read, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
437 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
438 | gboolean |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
439 | fb_mqtt_message_read_mid(FbMqttMessage *msg, guint16 *value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
440 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
441 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
442 | * fb_mqtt_message_read_u16: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
443 | * @msg: The #FbMqttMessage. |
|
37415
a06ade737f26
facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
444 | * @value: The return location for the value or #NULL. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
445 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
446 | * Reads a 16-bit integer value from the #FbMqttMessage. If @value is |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
447 | * #NULL, this will simply advance the cursor position. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
448 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
449 | * Returns: #TRUE if the value was read, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
450 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
451 | gboolean |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
452 | fb_mqtt_message_read_u16(FbMqttMessage *msg, guint16 *value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
453 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
454 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
455 | * fb_mqtt_message_read_str: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
456 | * @msg: The #FbMqttMessage. |
|
37415
a06ade737f26
facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
457 | * @value: The return location for the value or #NULL. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
458 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
459 | * Reads a string value from the #FbMqttMessage. The value returned to |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
460 | * @value should be freed with #g_free() when no longer needed. If |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
461 | * @value is #NULL, this will simply advance the cursor position. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
462 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
463 | * Returns: #TRUE if the value was read, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
464 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
465 | gboolean |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
466 | fb_mqtt_message_read_str(FbMqttMessage *msg, gchar **value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
467 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
468 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
469 | * fb_mqtt_message_write: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
470 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
471 | * @data: The data buffer. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
472 | * @size: The size of @buffer. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
473 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
474 | * Writes data to the #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
475 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
476 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
477 | fb_mqtt_message_write(FbMqttMessage *msg, gconstpointer data, guint size); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
478 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
479 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
480 | * fb_mqtt_message_write_byte: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
481 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
482 | * @value: The value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
483 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
484 | * Writes an 8-bit integer value to the #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
485 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
486 | void |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
487 | fb_mqtt_message_write_byte(FbMqttMessage *msg, guint8 value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
488 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
489 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
490 | * fb_mqtt_message_write_mid: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
491 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
492 | * @value: The value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
493 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
494 | * Writes a message identifier to the #FbMqttMessage. This increments |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
495 | * @value for the next message. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
496 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
497 | void |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
498 | fb_mqtt_message_write_mid(FbMqttMessage *msg, guint16 *value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
499 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
500 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
501 | * fb_mqtt_message_write_u16: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
502 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
503 | * @value: The value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
504 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
505 | * Writes a 16-bit integer value to the #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
506 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
507 | void |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
508 | fb_mqtt_message_write_u16(FbMqttMessage *msg, guint16 value); |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
509 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
510 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
511 | * fb_mqtt_message_write_str: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
512 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
513 | * @value: The value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
514 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
515 | * Writes a string value to the #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
516 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
517 | void |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
518 | fb_mqtt_message_write_str(FbMqttMessage *msg, const gchar *value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
519 | |
|
39819
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39550
diff
changeset
|
520 | #endif /* PURPLE_FACEBOOK_MQTT_H */ |