Sun, 17 May 2020 22:46:04 -0400
Use g_timeout_add_seconds some more.
|
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 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
25 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
26 | * SECTION:mqtt |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
27 | * @section_id: facebook-mqtt |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
28 | * @short_description: <filename>mqtt.h</filename> |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
29 | * @title: MQTT Connection |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
30 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
31 | * The MQTT connection. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
32 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
33 | |
|
37309
556eea7a45da
facebook: merged local glibcompat.h into libpurple's
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
34 | #include <glib.h> |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
35 | #include <string.h> |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
36 | |
|
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
|
37 | #include <purple.h> |
|
37310
a1a5f0ac39f2
facebook: cleaned up libpurple includes
James Geboski <jgeboski@gmail.com>
parents:
37309
diff
changeset
|
38 | |
|
39550
808e0a11eb9f
Use G_DECLARE* in facebook prpl.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38069
diff
changeset
|
39 | #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
|
40 | #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
|
41 | |
|
37347
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 | * FB_MQTT_NAME: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
44 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
45 | * The name of the MQTT version. |
|
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 | #define FB_MQTT_NAME "MQTToT" |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
48 | |
|
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 | * FB_MQTT_LEVEL: |
|
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 | * The level of the MQTT version. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
53 | */ |
|
37471
32c1e77d0474
facebook: coding style consistencies
James Geboski <jgeboski@gmail.com>
parents:
37415
diff
changeset
|
54 | #define FB_MQTT_LEVEL 3 |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
55 | |
|
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 | * FB_MQTT_KA: |
|
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 | * 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
|
60 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
61 | #define FB_MQTT_KA 60 |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
62 | |
|
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 | * FB_MQTT_HOST: |
|
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 | * The MQTT host name for Facebook. |
|
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 | #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
|
69 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
70 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
71 | * FB_MQTT_PORT: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
72 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
73 | * The MQTT host port for Facebook. |
|
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 | #define FB_MQTT_PORT 443 |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
76 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
77 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
78 | * FB_MQTT_TIMEOUT_CONN: |
|
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 | * 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
|
81 | */ |
|
40412
c0905847d779
Use g_timeout_add_seconds some more.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
40358
diff
changeset
|
82 | #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
|
83 | |
|
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 | * FB_MQTT_TIMEOUT_PING: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
86 | * |
|
40412
c0905847d779
Use g_timeout_add_seconds some more.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
40358
diff
changeset
|
87 | * 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
|
88 | */ |
|
40412
c0905847d779
Use g_timeout_add_seconds some more.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
40358
diff
changeset
|
89 | #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
|
90 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
91 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
92 | * FB_MQTT_ERROR: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
93 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
94 | * 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
|
95 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
96 | #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
|
97 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
98 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
99 | * FbMqttConnectFlags: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
100 | * @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
|
101 | * @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
|
102 | * @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
|
103 | * @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
|
104 | * @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
|
105 | * @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
|
106 | * @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
|
107 | * @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
|
108 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
109 | * 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
|
110 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
111 | typedef enum |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
112 | { |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
113 | FB_MQTT_CONNECT_FLAG_CLR = 1 << 1, |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
114 | FB_MQTT_CONNECT_FLAG_WILL = 1 << 2, |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
115 | FB_MQTT_CONNECT_FLAG_RET = 1 << 5, |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
116 | FB_MQTT_CONNECT_FLAG_PASS = 1 << 6, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
117 | FB_MQTT_CONNECT_FLAG_USER = 1 << 7, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
118 | FB_MQTT_CONNECT_FLAG_QOS0 = 0 << 3, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
119 | FB_MQTT_CONNECT_FLAG_QOS1 = 1 << 3, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
120 | 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
|
121 | } FbMqttConnectFlags; |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
122 | |
|
37347
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 | * FbMqttError: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
125 | * @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
|
126 | * @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
|
127 | * @FB_MQTT_ERROR_IDREJECT: Identifier rejected. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
128 | * @FB_MQTT_ERROR_SRVGONE: Server unavailable. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
129 | * @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
|
130 | * @FB_MQTT_ERROR_UNAUTHORIZED: Not authorized. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
131 | * @FB_MQTT_ERROR_GENERAL: General failure. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
132 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
133 | * 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
|
134 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
135 | typedef enum |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
136 | { |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
137 | FB_MQTT_ERROR_SUCCESS = 0, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
138 | FB_MQTT_ERROR_PRTVERS = 1, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
139 | FB_MQTT_ERROR_IDREJECT = 2, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
140 | FB_MQTT_ERROR_SRVGONE = 3, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
141 | FB_MQTT_ERROR_USERPASS = 4, |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
142 | FB_MQTT_ERROR_UNAUTHORIZED = 5, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
143 | FB_MQTT_ERROR_GENERAL |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
144 | } FbMqttError; |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
145 | |
|
37347
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 | * FbMqttMessageFlags: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
148 | * @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
|
149 | * @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
|
150 | * @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
|
151 | * @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
|
152 | * @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
|
153 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
154 | * The #FbMqttMessage flags. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
155 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
156 | typedef enum |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
157 | { |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
158 | FB_MQTT_MESSAGE_FLAG_RET = 1 << 0, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
159 | FB_MQTT_MESSAGE_FLAG_DUP = 1 << 3, |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
160 | FB_MQTT_MESSAGE_FLAG_QOS0 = 0 << 1, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
161 | FB_MQTT_MESSAGE_FLAG_QOS1 = 1 << 1, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
162 | 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
|
163 | } FbMqttMessageFlags; |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
164 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
165 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
166 | * FbMqttMessageType: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
167 | * @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
|
168 | * @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
|
169 | * @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
|
170 | * @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
|
171 | * @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
|
172 | * @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
|
173 | * @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
|
174 | * @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
|
175 | * @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
|
176 | * @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
|
177 | * @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
|
178 | * @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
|
179 | * @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
|
180 | * @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
|
181 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
182 | * The #FbMqttMessage types. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
183 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
184 | typedef enum |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
185 | { |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
186 | FB_MQTT_MESSAGE_TYPE_CONNECT = 1, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
187 | FB_MQTT_MESSAGE_TYPE_CONNACK = 2, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
188 | FB_MQTT_MESSAGE_TYPE_PUBLISH = 3, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
189 | FB_MQTT_MESSAGE_TYPE_PUBACK = 4, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
190 | FB_MQTT_MESSAGE_TYPE_PUBREC = 5, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
191 | FB_MQTT_MESSAGE_TYPE_PUBREL = 6, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
192 | FB_MQTT_MESSAGE_TYPE_PUBCOMP = 7, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
193 | FB_MQTT_MESSAGE_TYPE_SUBSCRIBE = 8, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
194 | FB_MQTT_MESSAGE_TYPE_SUBACK = 9, |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
195 | FB_MQTT_MESSAGE_TYPE_UNSUBSCRIBE = 10, |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
196 | FB_MQTT_MESSAGE_TYPE_UNSUBACK = 11, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
197 | FB_MQTT_MESSAGE_TYPE_PINGREQ = 12, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
198 | FB_MQTT_MESSAGE_TYPE_PINGRESP = 13, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
199 | 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
|
200 | } FbMqttMessageType; |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
201 | |
|
37347
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 | * fb_mqtt_get_type: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
204 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
205 | * Returns: The #GType for an #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
206 | */ |
|
39550
808e0a11eb9f
Use G_DECLARE* in facebook prpl.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38069
diff
changeset
|
207 | 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
|
208 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
209 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
210 | * fb_mqtt_message_get_type: |
|
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 | * Returns: The #GType for an #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
213 | */ |
|
39550
808e0a11eb9f
Use G_DECLARE* in facebook prpl.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38069
diff
changeset
|
214 | 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
|
215 | GObject) |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
216 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
217 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
218 | * fb_mqtt_error_quark: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
219 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
220 | * 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
|
221 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
222 | * Returns: The #GQuark of the domain. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
223 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
224 | GQuark |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
225 | fb_mqtt_error_quark(void); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
226 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
227 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
228 | * fb_mqtt_new: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
229 | * @gc: The #PurpleConnection. |
|
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 | * 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
|
232 | * #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
|
233 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
234 | * Returns: The new #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
235 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
236 | FbMqtt * |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
237 | fb_mqtt_new(PurpleConnection *gc); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
238 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
239 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
240 | * fb_mqtt_close: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
241 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
242 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
243 | * 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
|
244 | * may be reopened after calling this. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
245 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
246 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
247 | fb_mqtt_close(FbMqtt *mqtt); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
248 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
249 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
250 | * fb_mqtt_error: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
251 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
252 | * @error: The #FbMqttError. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
253 | * @format: The format string literal. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
254 | * @...: The arguments for @format. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
255 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
256 | * 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
|
257 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
258 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
259 | 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
|
260 | G_GNUC_PRINTF(3, 4); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
261 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
262 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
263 | * fb_mqtt_read: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
264 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
265 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
266 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
267 | * 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
|
268 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
269 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
270 | fb_mqtt_read(FbMqtt *mqtt, FbMqttMessage *msg); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
271 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
272 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
273 | * fb_mqtt_write: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
274 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
275 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
276 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
277 | * Writes an #FbMqttMessage to the wire. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
278 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
279 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
280 | fb_mqtt_write(FbMqtt *mqtt, FbMqttMessage *msg); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
281 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
282 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
283 | * fb_mqtt_open: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
284 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
285 | * @host: The host name. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
286 | * @port: The port. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
287 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
288 | * 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
|
289 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
290 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
291 | 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
|
292 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
293 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
294 | * fb_mqtt_connect: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
295 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
296 | * @flags: The #FbMqttConnectFlags. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
297 | * @pload: The payload. |
|
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 | * 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
|
300 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
301 | void |
|
37327
68220e4ccb15
facebook: upgraded MQTT version to MQTToT
James Geboski <jgeboski@gmail.com>
parents:
37311
diff
changeset
|
302 | 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
|
303 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
304 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
305 | * fb_mqtt_connected: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
306 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
307 | * @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
|
308 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
309 | * 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
|
310 | * an error. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
311 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
312 | * 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
|
313 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
314 | gboolean |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
315 | fb_mqtt_connected(FbMqtt *mqtt, gboolean error); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
316 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
317 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
318 | * fb_mqtt_disconnect: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
319 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
320 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
321 | * 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
|
322 | * the connection. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
323 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
324 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
325 | fb_mqtt_disconnect(FbMqtt *mqtt); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
326 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
327 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
328 | * fb_mqtt_publish: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
329 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
330 | * @topic: The topic. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
331 | * @pload: The payload. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
332 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
333 | * 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
|
334 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
335 | void |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
336 | 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
|
337 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
338 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
339 | * fb_mqtt_subscribe: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
340 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
341 | * @...: 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
|
342 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
343 | * 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
|
344 | */ |
|
40159
1e72d4cc60ad
Fix undefined behaviour of default argument promotion to va_start.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39819
diff
changeset
|
345 | 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
|
346 | |
|
37347
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 | * fb_mqtt_unsubscribe: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
349 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
350 | * @topic1: The first topic. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
351 | * @...: The %NULL-terminated list of topics. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
352 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
353 | * 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
|
354 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
355 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
356 | fb_mqtt_unsubscribe(FbMqtt *mqtt, const gchar *topic1, ...) |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
357 | G_GNUC_NULL_TERMINATED; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
358 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
359 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
360 | * fb_mqtt_message_new: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
361 | * @type: The #FbMqttMessageType. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
362 | * @flags: The #FbMqttMessageFlags. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
363 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
364 | * 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
|
365 | * 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
|
366 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
367 | * Returns: The new #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
368 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
369 | FbMqttMessage * |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
370 | fb_mqtt_message_new(FbMqttMessageType type, FbMqttMessageFlags flags); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
371 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
372 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
373 | * fb_mqtt_message_new_bytes: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
374 | * @bytes: The #GByteArray. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
375 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
376 | * 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
|
377 | * #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
|
378 | * longer needed. |
|
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 | * Returns: The new #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
381 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
382 | FbMqttMessage * |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
383 | fb_mqtt_message_new_bytes(GByteArray *bytes); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
384 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
385 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
386 | * fb_mqtt_message_reset: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
387 | * @msg: The #FbMqttMessage. |
|
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 | * 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
|
390 | * removes any sort of fixed header. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
391 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
392 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
393 | fb_mqtt_message_reset(FbMqttMessage *msg); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
394 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
395 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
396 | * fb_mqtt_message_bytes: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
397 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
398 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
399 | * 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
|
400 | * 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
|
401 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
402 | * Returns: The internal #GByteArray. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
403 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
404 | const GByteArray * |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
405 | fb_mqtt_message_bytes(FbMqttMessage *msg); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
406 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
407 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
408 | * fb_mqtt_message_read: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
409 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
410 | * @data: The data buffer. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
411 | * @size: The size of @buffer. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
412 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
413 | * 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
|
414 | * 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
|
415 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
416 | * 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
|
417 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
418 | gboolean |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
419 | 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
|
420 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
421 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
422 | * fb_mqtt_message_read_r: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
423 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
424 | * @bytes: The #GByteArray. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
425 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
426 | * 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
|
427 | * 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
|
428 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
429 | * 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
|
430 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
431 | gboolean |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
432 | fb_mqtt_message_read_r(FbMqttMessage *msg, GByteArray *bytes); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
433 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
434 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
435 | * fb_mqtt_message_read_byte: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
436 | * @msg: The #FbMqttMessage. |
|
37415
a06ade737f26
facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
437 | * @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
|
438 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
439 | * 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
|
440 | * #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
|
441 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
442 | * 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
|
443 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
444 | gboolean |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
445 | 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
|
446 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
447 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
448 | * fb_mqtt_message_read_mid: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
449 | * @msg: The #FbMqttMessage. |
|
37415
a06ade737f26
facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
450 | * @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
|
451 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
452 | * 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
|
453 | * #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
|
454 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
455 | * 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
|
456 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
457 | gboolean |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
458 | 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
|
459 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
460 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
461 | * fb_mqtt_message_read_u16: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
462 | * @msg: The #FbMqttMessage. |
|
37415
a06ade737f26
facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
463 | * @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
|
464 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
465 | * 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
|
466 | * #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
|
467 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
468 | * 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
|
469 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
470 | gboolean |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
471 | 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
|
472 | |
|
37347
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 | * fb_mqtt_message_read_str: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
475 | * @msg: The #FbMqttMessage. |
|
37415
a06ade737f26
facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
476 | * @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
|
477 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
478 | * 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
|
479 | * @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
|
480 | * @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
|
481 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
482 | * 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
|
483 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
484 | gboolean |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
485 | 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
|
486 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
487 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
488 | * fb_mqtt_message_write: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
489 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
490 | * @data: The data buffer. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
491 | * @size: The size of @buffer. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
492 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
493 | * Writes data to the #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
494 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
495 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
496 | 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
|
497 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
498 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
499 | * fb_mqtt_message_write_byte: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
500 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
501 | * @value: The value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
502 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
503 | * 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
|
504 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
505 | void |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
506 | 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
|
507 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
508 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
509 | * fb_mqtt_message_write_mid: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
510 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
511 | * @value: The value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
512 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
513 | * 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
|
514 | * @value for the next message. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
515 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
516 | void |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
517 | 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
|
518 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
519 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
520 | * fb_mqtt_message_write_u16: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
521 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
522 | * @value: The value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
523 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
524 | * 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
|
525 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
526 | void |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
527 | 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
|
528 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
529 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
530 | * fb_mqtt_message_write_str: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
531 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
532 | * @value: The value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
533 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
534 | * 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
|
535 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
536 | void |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
537 | 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
|
538 | |
|
39819
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39550
diff
changeset
|
539 | #endif /* PURPLE_FACEBOOK_MQTT_H */ |