Mon, 12 Sep 2016 08:55:35 -0500
gg: Protect against issues when closing while connecting
Since the GIOStream is cancelled when data is freed, any cancelled
callbacks are called after such data is freed. This patch guards against
cancelled calls by safely returning without accessing any freed data if
the connection has been cancelled (aka closed).
Futhermore, if GG tries to connect and is quickly disconnected,
ggp_tcpsocket_close() is never called. As far as I can tell, it's an
existing bug, but PurpleSockets both work differently when closing and
are closed by the connection if any leak. So the issue wasn't a major
problem. This patch lessens the issue by guarding against it, but it
should be fixed at some point.
|
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 | |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
22 | #ifndef _FACEBOOK_MQTT_H_ |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
23 | #define _FACEBOOK_MQTT_H_ |
|
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 | |
|
37310
a1a5f0ac39f2
facebook: cleaned up libpurple includes
James Geboski <jgeboski@gmail.com>
parents:
37309
diff
changeset
|
37 | #include "connection.h" |
|
a1a5f0ac39f2
facebook: cleaned up libpurple includes
James Geboski <jgeboski@gmail.com>
parents:
37309
diff
changeset
|
38 | |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
39 | #define FB_TYPE_MQTT (fb_mqtt_get_type()) |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
40 | #define FB_MQTT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), FB_TYPE_MQTT, FbMqtt)) |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
41 | #define FB_MQTT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), FB_TYPE_MQTT, FbMqttClass)) |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
42 | #define FB_IS_MQTT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), FB_TYPE_MQTT)) |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
43 | #define FB_IS_MQTT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), FB_TYPE_MQTT)) |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
44 | #define FB_MQTT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), FB_TYPE_MQTT, FbMqttClass)) |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
45 | |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
46 | #define FB_TYPE_MQTT_MESSAGE (fb_mqtt_message_get_type()) |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
47 | #define FB_MQTT_MESSAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), FB_TYPE_MQTT_MESSAGE, FbMqttMessage)) |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
48 | #define FB_MQTT_MESSAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), FB_TYPE_MQTT_MESSAGE, FbMqttMessageClass)) |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
49 | #define FB_IS_MQTT_MESSAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), FB_TYPE_MQTT_MESSAGE)) |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
50 | #define FB_IS_MQTT_MESSAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), FB_TYPE_MQTT_MESSAGE)) |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
51 | #define FB_MQTT_MESSAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), FB_TYPE_MQTT_MESSAGE, FbMqttMessageClass)) |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
52 | |
|
37347
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 | * FB_MQTT_NAME: |
|
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 | * The name of the MQTT version. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
57 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
58 | #define FB_MQTT_NAME "MQTToT" |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
59 | |
|
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 | * FB_MQTT_LEVEL: |
|
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 | * The level of the MQTT version. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
64 | */ |
|
37471
32c1e77d0474
facebook: coding style consistencies
James Geboski <jgeboski@gmail.com>
parents:
37415
diff
changeset
|
65 | #define FB_MQTT_LEVEL 3 |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
66 | |
|
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 | * FB_MQTT_KA: |
|
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 | * 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
|
71 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
72 | #define FB_MQTT_KA 60 |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
73 | |
|
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 | * FB_MQTT_HOST: |
|
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 | * The MQTT host name for Facebook. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
78 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
79 | #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
|
80 | |
|
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 | * FB_MQTT_PORT: |
|
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 | * The MQTT host port for Facebook. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
85 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
86 | #define FB_MQTT_PORT 443 |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
87 | |
|
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 | * FB_MQTT_TIMEOUT_CONN: |
|
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 | * The timeout, in milliseconds, to wait for a PING back from the |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
92 | * server. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
93 | */ |
|
37471
32c1e77d0474
facebook: coding style consistencies
James Geboski <jgeboski@gmail.com>
parents:
37415
diff
changeset
|
94 | #define FB_MQTT_TIMEOUT_CONN (FB_MQTT_KA * 1500) |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
95 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
96 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
97 | * FB_MQTT_TIMEOUT_PING: |
|
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 | * The timeout, in milliseconds, to send a PING to the server. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
100 | */ |
|
37471
32c1e77d0474
facebook: coding style consistencies
James Geboski <jgeboski@gmail.com>
parents:
37415
diff
changeset
|
101 | #define FB_MQTT_TIMEOUT_PING (FB_MQTT_KA * 1000) |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
102 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
103 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
104 | * FB_MQTT_ERROR: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
105 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
106 | * 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
|
107 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
108 | #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
|
109 | |
|
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 | * FB_MQTT_SSL_ERROR: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
112 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
113 | * The #GQuark of the domain of MQTT SSL errors. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
114 | */ |
|
37311
f9437ac8aa5d
facebook: correctly propagate MQTT SSL errors
James Geboski <jgeboski@gmail.com>
parents:
37310
diff
changeset
|
115 | #define FB_MQTT_SSL_ERROR fb_mqtt_ssl_error_quark() |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
116 | |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
117 | typedef struct _FbMqtt FbMqtt; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
118 | typedef struct _FbMqttClass FbMqttClass; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
119 | typedef struct _FbMqttPrivate FbMqttPrivate; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
120 | typedef struct _FbMqttMessage FbMqttMessage; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
121 | typedef struct _FbMqttMessageClass FbMqttMessageClass; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
122 | typedef struct _FbMqttMessagePrivate FbMqttMessagePrivate; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
123 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
124 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
125 | * FbMqttConnectFlags: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
126 | * @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
|
127 | * @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
|
128 | * @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
|
129 | * @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
|
130 | * @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
|
131 | * @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
|
132 | * @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
|
133 | * @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
|
134 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
135 | * 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
|
136 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
137 | typedef enum |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
138 | { |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
139 | FB_MQTT_CONNECT_FLAG_CLR = 1 << 1, |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
140 | FB_MQTT_CONNECT_FLAG_WILL = 1 << 2, |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
141 | FB_MQTT_CONNECT_FLAG_RET = 1 << 5, |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
142 | FB_MQTT_CONNECT_FLAG_PASS = 1 << 6, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
143 | FB_MQTT_CONNECT_FLAG_USER = 1 << 7, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
144 | FB_MQTT_CONNECT_FLAG_QOS0 = 0 << 3, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
145 | FB_MQTT_CONNECT_FLAG_QOS1 = 1 << 3, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
146 | 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
|
147 | } FbMqttConnectFlags; |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
148 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
149 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
150 | * FbMqttError: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
151 | * @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
|
152 | * @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
|
153 | * @FB_MQTT_ERROR_IDREJECT: Identifier rejected. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
154 | * @FB_MQTT_ERROR_SRVGONE: Server unavailable. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
155 | * @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
|
156 | * @FB_MQTT_ERROR_UNAUTHORIZED: Not authorized. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
157 | * @FB_MQTT_ERROR_GENERAL: General failure. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
158 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
159 | * 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
|
160 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
161 | typedef enum |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
162 | { |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
163 | FB_MQTT_ERROR_SUCCESS = 0, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
164 | FB_MQTT_ERROR_PRTVERS = 1, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
165 | FB_MQTT_ERROR_IDREJECT = 2, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
166 | FB_MQTT_ERROR_SRVGONE = 3, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
167 | FB_MQTT_ERROR_USERPASS = 4, |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
168 | FB_MQTT_ERROR_UNAUTHORIZED = 5, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
169 | FB_MQTT_ERROR_GENERAL |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
170 | } FbMqttError; |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
171 | |
|
37347
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 | * FbMqttMessageFlags: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
174 | * @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
|
175 | * @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
|
176 | * @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
|
177 | * @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
|
178 | * @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
|
179 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
180 | * The #FbMqttMessage flags. |
|
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 | typedef enum |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
183 | { |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
184 | FB_MQTT_MESSAGE_FLAG_RET = 1 << 0, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
185 | FB_MQTT_MESSAGE_FLAG_DUP = 1 << 3, |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
186 | FB_MQTT_MESSAGE_FLAG_QOS0 = 0 << 1, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
187 | FB_MQTT_MESSAGE_FLAG_QOS1 = 1 << 1, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
188 | 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
|
189 | } FbMqttMessageFlags; |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
190 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
191 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
192 | * FbMqttMessageType: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
193 | * @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
|
194 | * @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
|
195 | * @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
|
196 | * @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
|
197 | * @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
|
198 | * @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
|
199 | * @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
|
200 | * @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
|
201 | * @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
|
202 | * @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
|
203 | * @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
|
204 | * @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
|
205 | * @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
|
206 | * @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
|
207 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
208 | * The #FbMqttMessage types. |
|
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 | typedef enum |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
211 | { |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
212 | FB_MQTT_MESSAGE_TYPE_CONNECT = 1, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
213 | FB_MQTT_MESSAGE_TYPE_CONNACK = 2, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
214 | FB_MQTT_MESSAGE_TYPE_PUBLISH = 3, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
215 | FB_MQTT_MESSAGE_TYPE_PUBACK = 4, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
216 | FB_MQTT_MESSAGE_TYPE_PUBREC = 5, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
217 | FB_MQTT_MESSAGE_TYPE_PUBREL = 6, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
218 | FB_MQTT_MESSAGE_TYPE_PUBCOMP = 7, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
219 | FB_MQTT_MESSAGE_TYPE_SUBSCRIBE = 8, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
220 | FB_MQTT_MESSAGE_TYPE_SUBACK = 9, |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
221 | FB_MQTT_MESSAGE_TYPE_UNSUBSCRIBE = 10, |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
222 | FB_MQTT_MESSAGE_TYPE_UNSUBACK = 11, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
223 | FB_MQTT_MESSAGE_TYPE_PINGREQ = 12, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
224 | FB_MQTT_MESSAGE_TYPE_PINGRESP = 13, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
225 | 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
|
226 | } FbMqttMessageType; |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
227 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
228 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
229 | * FbMqtt: |
|
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 | * Represents an MQTT connection. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
232 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
233 | struct _FbMqtt |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
234 | { |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
235 | /*< private >*/ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
236 | GObject parent; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
237 | FbMqttPrivate *priv; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
238 | }; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
239 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
240 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
241 | * FbMqttClass: |
|
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 | * The base class for all #FbMqtt's. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
244 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
245 | struct _FbMqttClass |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
246 | { |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
247 | /*< private >*/ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
248 | GObjectClass parent_class; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
249 | }; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
250 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
251 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
252 | * FbMqttMessage: |
|
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 | * Represents a reader/writer for an MQTT message. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
255 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
256 | struct _FbMqttMessage |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
257 | { |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
258 | /*< private >*/ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
259 | GObject parent; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
260 | FbMqttMessagePrivate *priv; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
261 | }; |
|
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 | * FbMqttMessageClass: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
265 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
266 | * The base class for all #FbMqttMessageClass's. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
267 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
268 | struct _FbMqttMessageClass |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
269 | { |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
270 | /*< private >*/ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
271 | GObjectClass parent_class; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
272 | }; |
|
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_get_type: |
|
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 | * Returns: The #GType for an #FbMqtt. |
|
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 | GType |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
280 | fb_mqtt_get_type(void); |
|
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_message_get_type: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
284 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
285 | * Returns: The #GType for an #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
286 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
287 | GType |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
288 | fb_mqtt_message_get_type(void); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
289 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
290 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
291 | * fb_mqtt_error_quark: |
|
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 | * 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
|
294 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
295 | * Returns: The #GQuark of the domain. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
296 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
297 | GQuark |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
298 | fb_mqtt_error_quark(void); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
299 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
300 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
301 | * fb_mqtt_ssl_error_quark: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
302 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
303 | * Gets the #GQuark of the domain of MQTT SSL errors. |
|
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 | * Returns: The #GQuark of the domain. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
306 | */ |
|
37311
f9437ac8aa5d
facebook: correctly propagate MQTT SSL errors
James Geboski <jgeboski@gmail.com>
parents:
37310
diff
changeset
|
307 | GQuark |
|
f9437ac8aa5d
facebook: correctly propagate MQTT SSL errors
James Geboski <jgeboski@gmail.com>
parents:
37310
diff
changeset
|
308 | fb_mqtt_ssl_error_quark(void); |
|
f9437ac8aa5d
facebook: correctly propagate MQTT SSL errors
James Geboski <jgeboski@gmail.com>
parents:
37310
diff
changeset
|
309 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
310 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
311 | * fb_mqtt_new: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
312 | * @gc: The #PurpleConnection. |
|
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 | * 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
|
315 | * #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
|
316 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
317 | * Returns: The new #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
318 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
319 | FbMqtt * |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
320 | fb_mqtt_new(PurpleConnection *gc); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
321 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
322 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
323 | * fb_mqtt_close: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
324 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
325 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
326 | * 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
|
327 | * may be reopened after calling this. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
328 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
329 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
330 | fb_mqtt_close(FbMqtt *mqtt); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
331 | |
|
37347
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 | * fb_mqtt_error: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
334 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
335 | * @error: The #FbMqttError. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
336 | * @format: The format string literal. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
337 | * @...: The arguments for @format. |
|
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 | * 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
|
340 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
341 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
342 | 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
|
343 | G_GNUC_PRINTF(3, 4); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
344 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
345 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
346 | * fb_mqtt_read: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
347 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
348 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
349 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
350 | * 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
|
351 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
352 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
353 | fb_mqtt_read(FbMqtt *mqtt, FbMqttMessage *msg); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
354 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
355 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
356 | * fb_mqtt_write: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
357 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
358 | * @msg: The #FbMqttMessage. |
|
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 | * Writes an #FbMqttMessage to the wire. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
361 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
362 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
363 | fb_mqtt_write(FbMqtt *mqtt, FbMqttMessage *msg); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
364 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
365 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
366 | * fb_mqtt_open: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
367 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
368 | * @host: The host name. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
369 | * @port: The port. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
370 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
371 | * 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
|
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_open(FbMqtt *mqtt, const gchar *host, gint port); |
|
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_connect: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
378 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
379 | * @flags: The #FbMqttConnectFlags. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
380 | * @pload: The payload. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
381 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
382 | * 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
|
383 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
384 | void |
|
37327
68220e4ccb15
facebook: upgraded MQTT version to MQTToT
James Geboski <jgeboski@gmail.com>
parents:
37311
diff
changeset
|
385 | 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
|
386 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
387 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
388 | * fb_mqtt_connected: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
389 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
390 | * @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
|
391 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
392 | * 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
|
393 | * an error. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
394 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
395 | * 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
|
396 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
397 | gboolean |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
398 | fb_mqtt_connected(FbMqtt *mqtt, gboolean error); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
399 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
400 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
401 | * fb_mqtt_disconnect: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
402 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
403 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
404 | * 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
|
405 | * the connection. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
406 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
407 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
408 | fb_mqtt_disconnect(FbMqtt *mqtt); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
409 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
410 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
411 | * fb_mqtt_publish: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
412 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
413 | * @topic: The topic. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
414 | * @pload: The payload. |
|
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 | * 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
|
417 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
418 | void |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
419 | 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
|
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_subscribe: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
423 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
424 | * @topic1: The first topic. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
425 | * @qos1: The first QoS. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
426 | * @...: 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
|
427 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
428 | * 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
|
429 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
430 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
431 | fb_mqtt_subscribe(FbMqtt *mqtt, const gchar *topic1, guint16 qos1, ...) |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
432 | G_GNUC_NULL_TERMINATED; |
|
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_unsubscribe: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
436 | * @mqtt: The #FbMqtt. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
437 | * @topic1: The first topic. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
438 | * @...: The %NULL-terminated list of topics. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
439 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
440 | * 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
|
441 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
442 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
443 | fb_mqtt_unsubscribe(FbMqtt *mqtt, const gchar *topic1, ...) |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
444 | G_GNUC_NULL_TERMINATED; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
445 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
446 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
447 | * fb_mqtt_message_new: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
448 | * @type: The #FbMqttMessageType. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
449 | * @flags: The #FbMqttMessageFlags. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
450 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
451 | * 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
|
452 | * 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
|
453 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
454 | * Returns: The new #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
455 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
456 | FbMqttMessage * |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
457 | fb_mqtt_message_new(FbMqttMessageType type, FbMqttMessageFlags flags); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
458 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
459 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
460 | * fb_mqtt_message_new_bytes: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
461 | * @bytes: The #GByteArray. |
|
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 | * 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
|
464 | * #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
|
465 | * longer needed. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
466 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
467 | * Returns: The new #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
468 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
469 | FbMqttMessage * |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
470 | fb_mqtt_message_new_bytes(GByteArray *bytes); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
471 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
472 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
473 | * fb_mqtt_message_reset: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
474 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
475 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
476 | * 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
|
477 | * removes any sort of fixed header. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
478 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
479 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
480 | fb_mqtt_message_reset(FbMqttMessage *msg); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
481 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
482 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
483 | * fb_mqtt_message_bytes: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
484 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
485 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
486 | * 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
|
487 | * 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
|
488 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
489 | * Returns: The internal #GByteArray. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
490 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
491 | const GByteArray * |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
492 | fb_mqtt_message_bytes(FbMqttMessage *msg); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
493 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
494 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
495 | * fb_mqtt_message_read: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
496 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
497 | * @data: The data buffer. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
498 | * @size: The size of @buffer. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
499 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
500 | * 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
|
501 | * 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
|
502 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
503 | * 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
|
504 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
505 | gboolean |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
506 | 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
|
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_read_r: |
|
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 | * @bytes: The #GByteArray. |
|
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 | * 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
|
514 | * 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
|
515 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
516 | * 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
|
517 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
518 | gboolean |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
519 | fb_mqtt_message_read_r(FbMqttMessage *msg, GByteArray *bytes); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
520 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
521 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
522 | * fb_mqtt_message_read_byte: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
523 | * @msg: The #FbMqttMessage. |
|
37415
a06ade737f26
facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
524 | * @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
|
525 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
526 | * 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
|
527 | * #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
|
528 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
529 | * 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
|
530 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
531 | gboolean |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
532 | 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
|
533 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
534 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
535 | * fb_mqtt_message_read_mid: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
536 | * @msg: The #FbMqttMessage. |
|
37415
a06ade737f26
facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
537 | * @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
|
538 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
539 | * 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
|
540 | * #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
|
541 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
542 | * 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
|
543 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
544 | gboolean |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
545 | 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
|
546 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
547 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
548 | * fb_mqtt_message_read_u16: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
549 | * @msg: The #FbMqttMessage. |
|
37415
a06ade737f26
facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
550 | * @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
|
551 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
552 | * 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
|
553 | * #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
|
554 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
555 | * 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
|
556 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
557 | gboolean |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
558 | 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
|
559 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
560 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
561 | * fb_mqtt_message_read_str: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
562 | * @msg: The #FbMqttMessage. |
|
37415
a06ade737f26
facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
563 | * @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
|
564 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
565 | * 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
|
566 | * @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
|
567 | * @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
|
568 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
569 | * 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
|
570 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
571 | gboolean |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
572 | 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
|
573 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
574 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
575 | * fb_mqtt_message_write: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
576 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
577 | * @data: The data buffer. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
578 | * @size: The size of @buffer. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
579 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
580 | * Writes data to the #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
581 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
582 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
583 | 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
|
584 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
585 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
586 | * fb_mqtt_message_write_byte: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
587 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
588 | * @value: The value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
589 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
590 | * 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
|
591 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
592 | void |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
593 | 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
|
594 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
595 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
596 | * fb_mqtt_message_write_mid: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
597 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
598 | * @value: The value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
599 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
600 | * 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
|
601 | * @value for the next message. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
602 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
603 | void |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
604 | 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
|
605 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
606 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
607 | * fb_mqtt_message_write_u16: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
608 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
609 | * @value: The value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
610 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
611 | * 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
|
612 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
613 | void |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
614 | 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
|
615 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
616 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
617 | * fb_mqtt_message_write_str: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
618 | * @msg: The #FbMqttMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
619 | * @value: The value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
620 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
621 | * 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
|
622 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
623 | void |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
624 | 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
|
625 | |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
626 | #endif /* _FACEBOOK_MQTT_H_ */ |