Tue, 27 Jun 2017 11:58:03 -0500
facebook: Fix reading MQTT ping responses
MQTT ping packets are only a two byte header with a zero length
content. The Gio port of this was coded such that packets with zero
length contents were considered to not have been fully received.
This caused the MQTT connection to get stuck after a ping response
was received and eventually timeout. Therefore, the connection
would "fail" and reconnect every 1.5 minutes or so.
This patch fixes this by reworking that logic to also accept fully
received packets with a zero length content.
|
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_THRIFT_H_ |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
23 | #define _FACEBOOK_THRIFT_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:
37331
diff
changeset
|
25 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
26 | * SECTION:thrift |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
27 | * @section_id: facebook-thrift |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
28 | * @short_description: <filename>thrift.h</filename> |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
29 | * @title: Thrift Reader/Writer |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
30 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
31 | * The Thrift reader/writer. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
32 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
33 | |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
34 | #include <glib.h> |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
35 | #include <glib-object.h> |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
36 | |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
37 | #define FB_TYPE_THRIFT (fb_thrift_get_type()) |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
38 | #define FB_THRIFT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), FB_TYPE_THRIFT, FbThrift)) |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
39 | #define FB_THRIFT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), FB_TYPE_THRIFT, FbThriftClass)) |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
40 | #define FB_IS_THRIFT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), FB_TYPE_THRIFT)) |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
41 | #define FB_IS_THRIFT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), FB_TYPE_THRIFT)) |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
42 | #define FB_THRIFT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), FB_TYPE_THRIFT, FbThriftClass)) |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
43 | |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
44 | typedef struct _FbThrift FbThrift; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
45 | typedef struct _FbThriftClass FbThriftClass; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
46 | typedef struct _FbThriftPrivate FbThriftPrivate; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
47 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
48 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
49 | * FbThriftType: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
50 | * @FB_THRIFT_TYPE_STOP: A stopper for certain types. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
51 | * @FB_THRIFT_TYPE_VOID: A void or empty value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
52 | * @FB_THRIFT_TYPE_BOOL: A boolean (#TRUE or #FALSE). |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
53 | * @FB_THRIFT_TYPE_BYTE: A signed 8-bit integer. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
54 | * @FB_THRIFT_TYPE_DOUBLE: A 64-bit floating point number. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
55 | * @FB_THRIFT_TYPE_I16: A signed 16-bit integer. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
56 | * @FB_THRIFT_TYPE_I32: A signed 32-bit integer. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
57 | * @FB_THRIFT_TYPE_I64: A signed 64-bit integer. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
58 | * @FB_THRIFT_TYPE_STRING: A UTF-8 encoded string. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
59 | * @FB_THRIFT_TYPE_STRUCT: A set of typed fields. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
60 | * @FB_THRIFT_TYPE_MAP: A map of unique keys to values. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
61 | * @FB_THRIFT_TYPE_SET: A unique set of values. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
62 | * @FB_THRIFT_TYPE_LIST: A ordered list of values. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
63 | * @FB_THRIFT_TYPE_ENUM: A 32-bit enumerated list. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
64 | * @FB_THRIFT_TYPE_UNKNOWN: An unknown type. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
65 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
66 | * The Thrift data types. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
67 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
68 | typedef enum |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
69 | { |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
70 | FB_THRIFT_TYPE_STOP = 0, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
71 | FB_THRIFT_TYPE_VOID = 1, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
72 | FB_THRIFT_TYPE_BOOL = 2, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
73 | FB_THRIFT_TYPE_BYTE = 3, |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
74 | FB_THRIFT_TYPE_DOUBLE = 4, |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
75 | FB_THRIFT_TYPE_I16 = 6, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
76 | FB_THRIFT_TYPE_I32 = 8, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
77 | FB_THRIFT_TYPE_I64 = 10, |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
78 | FB_THRIFT_TYPE_STRING = 11, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
79 | FB_THRIFT_TYPE_STRUCT = 12, |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
80 | FB_THRIFT_TYPE_MAP = 13, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
81 | FB_THRIFT_TYPE_SET = 14, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
82 | FB_THRIFT_TYPE_LIST = 15, |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
83 | FB_THRIFT_TYPE_ENUM = 16, |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
84 | |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
85 | FB_THRIFT_TYPE_UNKNOWN |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
86 | } FbThriftType; |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
87 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
88 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
89 | * FbThrift: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
90 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
91 | * Represents a reader/writer for compact Thrift data. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
92 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
93 | struct _FbThrift |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
94 | { |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
95 | /*< private >*/ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
96 | GObject parent; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
97 | FbThriftPrivate *priv; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
98 | }; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
99 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
100 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
101 | * FbThriftClass: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
102 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
103 | * The base class for all #FbThrift's. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
104 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
105 | struct _FbThriftClass |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
106 | { |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
107 | /*< private >*/ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
108 | GObjectClass parent_class; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
109 | }; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
110 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
111 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
112 | * fb_thrift_get_type: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
113 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
114 | * Returns: The #GType for an #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
115 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
116 | GType |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
117 | fb_thrift_get_type(void); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
118 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
119 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
120 | * fb_thrift_new: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
121 | * @bytes: The #GByteArray to read or write. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
122 | * @offset: The offset in bytes of the data in @bytes. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
123 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
124 | * Creates a new #FbThrift. The returned #FbThrift should be freed with |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
125 | * #g_object_unref() when no longer needed. This will optionally use a |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
126 | * #GByteArray at an offset, rather than a newly created and internal |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
127 | * #GByteArray. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
128 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
129 | * Returns: The new #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
130 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
131 | FbThrift * |
|
37331
9cd963f45997
facebook: removed binary thrift support
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
132 | fb_thrift_new(GByteArray *bytes, guint offset); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
133 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
134 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
135 | * fb_thrift_get_bytes: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
136 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
137 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
138 | * Gets the underlying #GByteArray of an #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
139 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
140 | * Returns: The #GByteArray. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
141 | */ |
|
37327
68220e4ccb15
facebook: upgraded MQTT version to MQTToT
James Geboski <jgeboski@gmail.com>
parents:
37268
diff
changeset
|
142 | const GByteArray * |
|
68220e4ccb15
facebook: upgraded MQTT version to MQTToT
James Geboski <jgeboski@gmail.com>
parents:
37268
diff
changeset
|
143 | fb_thrift_get_bytes(FbThrift *thft); |
|
68220e4ccb15
facebook: upgraded MQTT version to MQTToT
James Geboski <jgeboski@gmail.com>
parents:
37268
diff
changeset
|
144 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
145 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
146 | * fb_thrift_get_pos: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
147 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
148 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
149 | * Gets the cursor position of an #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
150 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
151 | * Returns: The cursor position. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
152 | */ |
|
37268
2d85594bb9ee
facebook: fixed JSON parse errors with messages
James Geboski <jgeboski@gmail.com>
parents:
37250
diff
changeset
|
153 | guint |
|
2d85594bb9ee
facebook: fixed JSON parse errors with messages
James Geboski <jgeboski@gmail.com>
parents:
37250
diff
changeset
|
154 | fb_thrift_get_pos(FbThrift *thft); |
|
2d85594bb9ee
facebook: fixed JSON parse errors with messages
James Geboski <jgeboski@gmail.com>
parents:
37250
diff
changeset
|
155 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
156 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
157 | * fb_thrift_set_pos: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
158 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
159 | * @pos: The position. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
160 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
161 | * Sets the cursor position of an #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
162 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
163 | * Returns: The #GByteArray. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
164 | */ |
|
37268
2d85594bb9ee
facebook: fixed JSON parse errors with messages
James Geboski <jgeboski@gmail.com>
parents:
37250
diff
changeset
|
165 | void |
|
2d85594bb9ee
facebook: fixed JSON parse errors with messages
James Geboski <jgeboski@gmail.com>
parents:
37250
diff
changeset
|
166 | fb_thrift_set_pos(FbThrift *thft, guint pos); |
|
2d85594bb9ee
facebook: fixed JSON parse errors with messages
James Geboski <jgeboski@gmail.com>
parents:
37250
diff
changeset
|
167 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
168 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
169 | * fb_thrift_reset: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
170 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
171 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
172 | * Resets the cursor position of an #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
173 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
174 | * Returns: The #GByteArray. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
175 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
176 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
177 | fb_thrift_reset(FbThrift *thft); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
178 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
179 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
180 | * fb_thrift_read: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
181 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
182 | * @data: The data buffer. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
183 | * @size: The size of @buffer. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
184 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
185 | * Reads data from the #FbThrift into a buffer. If @data is #NULL, this |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
186 | * will simply advance the cursor position. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
187 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
188 | * Returns: #TRUE if the data was read, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
189 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
190 | gboolean |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
191 | fb_thrift_read(FbThrift *thft, gpointer data, guint size); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
192 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
193 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
194 | * fb_thrift_read_bool: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
195 | * @thft: The #FbThrift. |
|
37415
a06ade737f26
facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
196 | * @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:
37331
diff
changeset
|
197 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
198 | * Reads a boolean value from the #FbThrift. If @value is #NULL, this |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
199 | * will simply advance the cursor position. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
200 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
201 | * Returns: #TRUE if the value was read, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
202 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
203 | gboolean |
|
37331
9cd963f45997
facebook: removed binary thrift support
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
204 | fb_thrift_read_bool(FbThrift *thft, gboolean *value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
205 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
206 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
207 | * fb_thrift_read_byte: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
208 | * @thft: The #FbThrift. |
|
37415
a06ade737f26
facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
209 | * @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:
37331
diff
changeset
|
210 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
211 | * Reads an 8-bit integer value from the #FbThrift. If @value is #NULL, |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
212 | * this will simply advance the cursor position. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
213 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
214 | * Returns: #TRUE if the value was read, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
215 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
216 | gboolean |
|
37331
9cd963f45997
facebook: removed binary thrift support
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
217 | fb_thrift_read_byte(FbThrift *thft, guint8 *value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
218 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
219 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
220 | * fb_thrift_read_dbl: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
221 | * @thft: The #FbThrift. |
|
37415
a06ade737f26
facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
222 | * @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:
37331
diff
changeset
|
223 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
224 | * Reads a 64-bit floating point value from the #FbThrift. If @value |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
225 | * is #NULL, this will simply advance the cursor position. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
226 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
227 | * Returns: #TRUE if the value was read, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
228 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
229 | gboolean |
|
37331
9cd963f45997
facebook: removed binary thrift support
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
230 | fb_thrift_read_dbl(FbThrift *thft, gdouble *value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
231 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
232 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
233 | * fb_thrift_read_i16: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
234 | * @thft: The #FbThrift. |
|
37415
a06ade737f26
facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
235 | * @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:
37331
diff
changeset
|
236 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
237 | * Reads a signed 16-bit integer value from the #FbThrift. This will |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
238 | * convert the integer from the zig-zag format. If @value is #NULL, |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
239 | * this will simply advance the cursor position. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
240 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
241 | * Returns: #TRUE if the value was read, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
242 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
243 | gboolean |
|
37331
9cd963f45997
facebook: removed binary thrift support
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
244 | fb_thrift_read_i16(FbThrift *thft, gint16 *value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
245 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
246 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
247 | * fb_thrift_read_vi16: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
248 | * @thft: The #FbThrift. |
|
37415
a06ade737f26
facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
249 | * @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:
37331
diff
changeset
|
250 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
251 | * Reads a 16-bit integer value from the #FbThrift. This reads the raw |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
252 | * integer value without converting it from the zig-zag format. If |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
253 | * @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:
37331
diff
changeset
|
254 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
255 | * Returns: #TRUE if the value was read, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
256 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
257 | gboolean |
|
37331
9cd963f45997
facebook: removed binary thrift support
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
258 | fb_thrift_read_vi16(FbThrift *thft, guint16 *value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
259 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
260 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
261 | * fb_thrift_read_i32: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
262 | * @thft: The #FbThrift. |
|
37415
a06ade737f26
facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
263 | * @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:
37331
diff
changeset
|
264 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
265 | * Reads a signed 32-bit integer value from the #FbThrift. This will |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
266 | * convert the integer from the zig-zag format. If @value is #NULL, |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
267 | * this will simply advance the cursor position. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
268 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
269 | * Returns: #TRUE if the value was read, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
270 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
271 | gboolean |
|
37331
9cd963f45997
facebook: removed binary thrift support
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
272 | fb_thrift_read_i32(FbThrift *thft, gint32 *value); |
|
37250
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:
37331
diff
changeset
|
274 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
275 | * fb_thrift_read_vi32: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
276 | * @thft: The #FbThrift. |
|
37415
a06ade737f26
facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
277 | * @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:
37331
diff
changeset
|
278 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
279 | * Reads a 32-bit integer value from the #FbThrift. This reads the raw |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
280 | * integer value without converting it from the zig-zag format. If |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
281 | * @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:
37331
diff
changeset
|
282 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
283 | * Returns: #TRUE if the value was read, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
284 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
285 | gboolean |
|
37331
9cd963f45997
facebook: removed binary thrift support
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
286 | fb_thrift_read_vi32(FbThrift *thft, guint32 *value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
287 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
288 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
289 | * fb_thrift_read_i64: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
290 | * @thft: The #FbThrift. |
|
37415
a06ade737f26
facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
291 | * @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:
37331
diff
changeset
|
292 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
293 | * Reads a signed 64-bit integer value from the #FbThrift. This will |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
294 | * convert the integer from the zig-zag format. If @value is #NULL, |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
295 | * this will simply advance the cursor position. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
296 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
297 | * Returns: #TRUE if the value was read, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
298 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
299 | gboolean |
|
37331
9cd963f45997
facebook: removed binary thrift support
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
300 | fb_thrift_read_i64(FbThrift *thft, gint64 *value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
301 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
302 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
303 | * fb_thrift_read_vi64: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
304 | * @thft: The #FbThrift. |
|
37415
a06ade737f26
facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
305 | * @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:
37331
diff
changeset
|
306 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
307 | * Reads a 64-bit integer value from the #FbThrift. This reads the raw |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
308 | * integer value without converting it from the zig-zag format. If |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
309 | * @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:
37331
diff
changeset
|
310 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
311 | * Returns: #TRUE if the value was read, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
312 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
313 | gboolean |
|
37331
9cd963f45997
facebook: removed binary thrift support
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
314 | fb_thrift_read_vi64(FbThrift *thft, guint64 *value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
315 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
316 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
317 | * fb_thrift_read_str: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
318 | * @thft: The #FbThrift. |
|
37415
a06ade737f26
facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
319 | * @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:
37331
diff
changeset
|
320 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
321 | * Reads a string value from the #FbThrift. The value returned to |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
322 | * @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:
37331
diff
changeset
|
323 | * @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:
37331
diff
changeset
|
324 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
325 | * Returns: #TRUE if the value was read, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
326 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
327 | gboolean |
|
37331
9cd963f45997
facebook: removed binary thrift support
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
328 | fb_thrift_read_str(FbThrift *thft, gchar **value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
329 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
330 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
331 | * fb_thrift_read_field: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
332 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
333 | * @type: The return location for the #FbThriftType. |
|
37510
1bee26614db9
facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents:
37415
diff
changeset
|
334 | * @id: The return location for the identifier. |
|
1bee26614db9
facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents:
37415
diff
changeset
|
335 | * @lastid: The identifier of the previous field. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
336 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
337 | * Reads a field header from the #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
338 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
339 | * Returns: #TRUE if the field header was read, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
340 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
341 | gboolean |
|
37510
1bee26614db9
facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents:
37415
diff
changeset
|
342 | fb_thrift_read_field(FbThrift *thft, FbThriftType *type, gint16 *id, |
|
1bee26614db9
facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents:
37415
diff
changeset
|
343 | gint16 lastid); |
|
37250
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:
37331
diff
changeset
|
345 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
346 | * fb_thrift_read_stop: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
347 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
348 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
349 | * Reads a field stop from the #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
350 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
351 | * Returns: #TRUE if the field stop was read, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
352 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
353 | gboolean |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
354 | fb_thrift_read_stop(FbThrift *thft); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
355 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
356 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
357 | * fb_thrift_read_isstop: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
358 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
359 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
360 | * Determines if the next byte of the #FbThrift is a field stop. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
361 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
362 | * Returns: #TRUE if the next byte is a field stop, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
363 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
364 | gboolean |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
365 | fb_thrift_read_isstop(FbThrift *thft); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
366 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
367 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
368 | * fb_thrift_read_list: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
369 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
370 | * @type: The return location for the #FbThriftType. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
371 | * @size: The return location for the size. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
372 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
373 | * Reads a list header from the #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
374 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
375 | * Returns: #TRUE if the list header was read, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
376 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
377 | gboolean |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
378 | fb_thrift_read_list(FbThrift *thft, FbThriftType *type, guint *size); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
379 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
380 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
381 | * fb_thrift_read_map: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
382 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
383 | * @ktype: The return location for the key #FbThriftType. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
384 | * @vtype: The return location for the value #FbThriftType. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
385 | * @size: The return location for the size. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
386 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
387 | * Reads a map header from the #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
388 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
389 | * Returns: #TRUE if the map header was read, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
390 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
391 | gboolean |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
392 | fb_thrift_read_map(FbThrift *thft, FbThriftType *ktype, FbThriftType *vtype, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
393 | guint *size); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
394 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
395 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
396 | * fb_thrift_read_set: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
397 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
398 | * @type: The return location for the #FbThriftType. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
399 | * @size: The return location for the size. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
400 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
401 | * Reads a set header from the #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
402 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
403 | * Returns: #TRUE if the set header was read, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
404 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
405 | gboolean |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
406 | fb_thrift_read_set(FbThrift *thft, FbThriftType *type, guint *size); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
407 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
408 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
409 | * fb_thrift_write: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
410 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
411 | * @data: The data buffer. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
412 | * @size: The size of @buffer. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
413 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
414 | * Writes data to the #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
415 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
416 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
417 | fb_thrift_write(FbThrift *thft, gconstpointer data, guint size); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
418 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
419 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
420 | * fb_thrift_write_bool: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
421 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
422 | * @value: The value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
423 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
424 | * Writes a boolean value to the #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
425 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
426 | void |
|
37331
9cd963f45997
facebook: removed binary thrift support
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
427 | fb_thrift_write_bool(FbThrift *thft, gboolean value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
428 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
429 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
430 | * fb_thrift_write_byte: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
431 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
432 | * @value: The value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
433 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
434 | * Writes an 8-bit integer value to the #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
435 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
436 | void |
|
37331
9cd963f45997
facebook: removed binary thrift support
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
437 | fb_thrift_write_byte(FbThrift *thft, guint8 value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
438 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
439 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
440 | * fb_thrift_write_dbl: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
441 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
442 | * @value: The value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
443 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
444 | * Writes a 64-bit floating point value to the #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
445 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
446 | void |
|
37331
9cd963f45997
facebook: removed binary thrift support
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
447 | fb_thrift_write_dbl(FbThrift *thft, gdouble value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
448 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
449 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
450 | * fb_thrift_write_i16: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
451 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
452 | * @value: The value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
453 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
454 | * Writes a signed 16-bit integer value to the #FbThrift. This will |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
455 | * convert the integer to the zig-zag format. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
456 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
457 | void |
|
37331
9cd963f45997
facebook: removed binary thrift support
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
458 | fb_thrift_write_i16(FbThrift *thft, gint16 value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
459 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
460 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
461 | * fb_thrift_write_vi16: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
462 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
463 | * @value: The value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
464 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
465 | * Writes a 16-bit integer value to the #FbThrift. This writes the raw |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
466 | * integer value without converting it to the zig-zag format. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
467 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
468 | void |
|
37331
9cd963f45997
facebook: removed binary thrift support
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
469 | fb_thrift_write_vi16(FbThrift *thft, guint16 value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
470 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
471 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
472 | * fb_thrift_write_i32: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
473 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
474 | * @value: The value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
475 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
476 | * Writes a signed 32-bit integer value to the #FbThrift. This will |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
477 | * convert the integer to the zig-zag format. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
478 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
479 | void |
|
37331
9cd963f45997
facebook: removed binary thrift support
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
480 | fb_thrift_write_i32(FbThrift *thft, gint32 value); |
|
37250
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:
37331
diff
changeset
|
482 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
483 | * fb_thrift_write_vi32: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
484 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
485 | * @value: The value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
486 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
487 | * Writes a 32-bit integer value to the #FbThrift. This writes the raw |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
488 | * integer value without converting it to the zig-zag format. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
489 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
490 | void |
|
37331
9cd963f45997
facebook: removed binary thrift support
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
491 | fb_thrift_write_vi32(FbThrift *thft, guint32 value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
492 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
493 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
494 | * fb_thrift_write_i64: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
495 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
496 | * @value: The value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
497 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
498 | * Writes a signed 64-bit integer value to the #FbThrift. This will |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
499 | * convert the integer to the zig-zag format. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
500 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
501 | void |
|
37331
9cd963f45997
facebook: removed binary thrift support
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
502 | fb_thrift_write_i64(FbThrift *thft, gint64 value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
503 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
504 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
505 | * fb_thrift_write_vi64: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
506 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
507 | * @value: The value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
508 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
509 | * Writes a 64-bit integer value to the #FbThrift. This writes the raw |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
510 | * integer value without converting it to the zig-zag format. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
511 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
512 | void |
|
37331
9cd963f45997
facebook: removed binary thrift support
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
513 | fb_thrift_write_vi64(FbThrift *thft, guint64 value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
514 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
515 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
516 | * fb_thrift_write_str: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
517 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
518 | * @value: The value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
519 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
520 | * Writes a string value to the #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
521 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
522 | void |
|
37331
9cd963f45997
facebook: removed binary thrift support
James Geboski <jgeboski@gmail.com>
parents:
37327
diff
changeset
|
523 | fb_thrift_write_str(FbThrift *thft, const gchar *value); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
524 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
525 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
526 | * fb_thrift_write_field: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
527 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
528 | * @type: The #FbThriftType. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
529 | * @id: The identifier. |
|
37510
1bee26614db9
facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents:
37415
diff
changeset
|
530 | * @lastid: The identifier of the previous field. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
531 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
532 | * Writes a field header to the #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
533 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
534 | void |
|
37510
1bee26614db9
facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents:
37415
diff
changeset
|
535 | fb_thrift_write_field(FbThrift *thft, FbThriftType type, gint16 id, |
|
1bee26614db9
facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents:
37415
diff
changeset
|
536 | gint16 lastid); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
537 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
538 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
539 | * fb_thrift_write_stop: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
540 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
541 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
542 | * Writes a field stop to the #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
543 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
544 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
545 | fb_thrift_write_stop(FbThrift *thft); |
|
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:
37331
diff
changeset
|
547 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
548 | * fb_thrift_write_list: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
549 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
550 | * @type: The #FbThriftType. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
551 | * @size: The size. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
552 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
553 | * Writes a list header to the #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
554 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
555 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
556 | fb_thrift_write_list(FbThrift *thft, FbThriftType type, guint size); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
557 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
558 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
559 | * fb_thrift_write_map: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
560 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
561 | * @ktype: The key #FbThriftType. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
562 | * @vtype: The value #FbThriftType. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
563 | * @size: The size. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
564 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
565 | * Writes a map header to the #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
566 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
567 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
568 | fb_thrift_write_map(FbThrift *thft, FbThriftType ktype, FbThriftType vtype, |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
569 | guint size); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
570 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
571 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
572 | * fb_thrift_write_set: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
573 | * @thft: The #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
574 | * @type: The #FbThriftType. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
575 | * @size: The size. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
576 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
577 | * Writes a set header to the #FbThrift. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
578 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
579 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
580 | fb_thrift_write_set(FbThrift *thft, FbThriftType type, guint size); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
581 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
582 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
583 | * fb_thrift_t2ct: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
584 | * @type: The #FbThriftType. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
585 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
586 | * Converts a #FbThriftType to a compact type. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
587 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
588 | * Return: The equivalent compact type. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
589 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
590 | guint8 |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
591 | fb_thrift_t2ct(FbThriftType type); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
592 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
593 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
594 | * fb_thrift_ct2t: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
595 | * @type: The compact type. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
596 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
597 | * Converts a compact type to an #FbThriftType. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
598 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
599 | * Return: The equivalent #FbThriftType. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37331
diff
changeset
|
600 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
601 | FbThriftType |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
602 | fb_thrift_ct2t(guint8 type); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
603 | |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
604 | #endif /* _FACEBOOK_THRIFT_H_ */ |