libpurple/protocols/facebook/api.h

Wed, 29 Mar 2023 23:21:45 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Wed, 29 Mar 2023 23:21:45 -0500
changeset 42186
637ba5491231
parent 41294
3f0b065e58f7
permissions
-rw-r--r--

Remove the original irc protocol plugin

I was waiting to do this until IRCv3 was at feature parity, but now one is
using this right now anyways which means having to keep updating it for changes
is just a waste of effort.

Testing Done:
ran `ninja turtles` and opened the new account dialog without issue.

Reviewed at https://reviews.imfreedom.org/r/2392/

37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
1 /* purple
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
2 *
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
3 * Purple is the legal property of its developers, whose names are too numerous
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
4 * to list here. Please refer to the COPYRIGHT file distributed with this
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
5 * source distribution.
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
6 *
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
10 * (at your option) any later version.
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
11 *
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
15 * GNU General Public License for more details.
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
16 *
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
20 */
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
21
39819
3554dac2991b Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39550
diff changeset
22 #ifndef PURPLE_FACEBOOK_API_H
3554dac2991b Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39550
diff changeset
23 #define PURPLE_FACEBOOK_API_H
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
24
37309
556eea7a45da facebook: merged local glibcompat.h into libpurple's
James Geboski <jgeboski@gmail.com>
parents: 37306
diff changeset
25 #include <glib.h>
556eea7a45da facebook: merged local glibcompat.h into libpurple's
James Geboski <jgeboski@gmail.com>
parents: 37306
diff changeset
26
40358
e6fe6fc1f516 move all protocols, purple plugins, and purple tests to use purple.h instead of including files individually
Gary Kramlich <grim@reaperworld.com>
parents: 40030
diff changeset
27 #include <purple.h>
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
28
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
29 #include "http.h"
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
30 #include "id.h"
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
31 #include "mqtt.h"
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
32
39550
808e0a11eb9f Use G_DECLARE* in facebook prpl.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38399
diff changeset
33 #define FB_TYPE_API fb_api_get_type()
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
34
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
35 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
36 * FB_API_AHOST:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
37 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
38 * The HTTP host for the Facebook API.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
39 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
40 #define FB_API_AHOST "https://api.facebook.com"
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
41
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
42 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
43 * FB_API_BHOST:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
44 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
45 * The HTTP host for the Facebook BAPI.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
46 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
47 #define FB_API_BHOST "https://b-api.facebook.com"
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
48
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
49 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
50 * FB_API_GHOST:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
51 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
52 * The HTTP host for the Facebook Graph API.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
53 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
54 #define FB_API_GHOST "https://graph.facebook.com"
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
55
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
56 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
57 * FB_API_WHOST:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
58 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
59 * The HTTP host for the Facebook website.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
60 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
61 #define FB_API_WHOST "https://www.facebook.com"
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
62
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
63 /**
38395
922cb6303d80 facebook: Extract target url from fbrpc:// URLs
Mickaël Thomas <mickael9@gmail.com>
parents: 38392
diff changeset
64 * FB_API_FBRPC_PREFIX
922cb6303d80 facebook: Extract target url from fbrpc:// URLs
Mickaël Thomas <mickael9@gmail.com>
parents: 38392
diff changeset
65 *
922cb6303d80 facebook: Extract target url from fbrpc:// URLs
Mickaël Thomas <mickael9@gmail.com>
parents: 38392
diff changeset
66 * The fbrpc URL prefix used in links shared from the mobile app.
922cb6303d80 facebook: Extract target url from fbrpc:// URLs
Mickaël Thomas <mickael9@gmail.com>
parents: 38392
diff changeset
67 */
922cb6303d80 facebook: Extract target url from fbrpc:// URLs
Mickaël Thomas <mickael9@gmail.com>
parents: 38392
diff changeset
68 #define FB_API_FBRPC_PREFIX "fbrpc://facebook/nativethirdparty"
922cb6303d80 facebook: Extract target url from fbrpc:// URLs
Mickaël Thomas <mickael9@gmail.com>
parents: 38392
diff changeset
69
922cb6303d80 facebook: Extract target url from fbrpc:// URLs
Mickaël Thomas <mickael9@gmail.com>
parents: 38392
diff changeset
70 /**
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
71 * FB_API_KEY:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
72 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
73 * The Facebook API key.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
74 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
75 #define FB_API_KEY "256002347743983"
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
76
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
77 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
78 * FB_API_SECRET:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
79 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
80 * The Facebook API secret.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
81 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
82 #define FB_API_SECRET "374e60f8b9bb6b8cbb30f78030438895"
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
83
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
84 /**
38385
2b5c96a9dd53 facebook: Send user agent strings in all HTTP requests and in MQTT connect
dx <dx@dxzone.com.ar>
parents: 38185
diff changeset
85 * FB_ORCA_AGENT
2b5c96a9dd53 facebook: Send user agent strings in all HTTP requests and in MQTT connect
dx <dx@dxzone.com.ar>
parents: 38185
diff changeset
86 *
2b5c96a9dd53 facebook: Send user agent strings in all HTTP requests and in MQTT connect
dx <dx@dxzone.com.ar>
parents: 38185
diff changeset
87 * The part of the user agent that looks like the official client, since the
2b5c96a9dd53 facebook: Send user agent strings in all HTTP requests and in MQTT connect
dx <dx@dxzone.com.ar>
parents: 38185
diff changeset
88 * server started checking this.
2b5c96a9dd53 facebook: Send user agent strings in all HTTP requests and in MQTT connect
dx <dx@dxzone.com.ar>
parents: 38185
diff changeset
89 */
2b5c96a9dd53 facebook: Send user agent strings in all HTTP requests and in MQTT connect
dx <dx@dxzone.com.ar>
parents: 38185
diff changeset
90
40794
0a69216b0b3f Backport some patches from github.com/dequis/purple-facebook
Gary Kramlich <grim@reaperworld.com>
parents: 40439
diff changeset
91 #define FB_ORCA_AGENT "[FBAN/Orca-Android;FBAV/537.0.0.31.101;FBPN/com.facebook.orca;FBLC/en_US;FBBV/52182662]"
38385
2b5c96a9dd53 facebook: Send user agent strings in all HTTP requests and in MQTT connect
dx <dx@dxzone.com.ar>
parents: 38185
diff changeset
92
2b5c96a9dd53 facebook: Send user agent strings in all HTTP requests and in MQTT connect
dx <dx@dxzone.com.ar>
parents: 38185
diff changeset
93 /**
2b5c96a9dd53 facebook: Send user agent strings in all HTTP requests and in MQTT connect
dx <dx@dxzone.com.ar>
parents: 38185
diff changeset
94 * FB_API_AGENT:
2b5c96a9dd53 facebook: Send user agent strings in all HTTP requests and in MQTT connect
dx <dx@dxzone.com.ar>
parents: 38185
diff changeset
95 *
2b5c96a9dd53 facebook: Send user agent strings in all HTTP requests and in MQTT connect
dx <dx@dxzone.com.ar>
parents: 38185
diff changeset
96 * The HTTP User-Agent header.
2b5c96a9dd53 facebook: Send user agent strings in all HTTP requests and in MQTT connect
dx <dx@dxzone.com.ar>
parents: 38185
diff changeset
97 */
2b5c96a9dd53 facebook: Send user agent strings in all HTTP requests and in MQTT connect
dx <dx@dxzone.com.ar>
parents: 38185
diff changeset
98 #define FB_API_AGENT "Facebook plugin / Purple / 0.9.5 " FB_ORCA_AGENT
2b5c96a9dd53 facebook: Send user agent strings in all HTTP requests and in MQTT connect
dx <dx@dxzone.com.ar>
parents: 38185
diff changeset
99
2b5c96a9dd53 facebook: Send user agent strings in all HTTP requests and in MQTT connect
dx <dx@dxzone.com.ar>
parents: 38185
diff changeset
100 /**
2b5c96a9dd53 facebook: Send user agent strings in all HTTP requests and in MQTT connect
dx <dx@dxzone.com.ar>
parents: 38185
diff changeset
101 * FB_API_MQTT_AGENT
2b5c96a9dd53 facebook: Send user agent strings in all HTTP requests and in MQTT connect
dx <dx@dxzone.com.ar>
parents: 38185
diff changeset
102 *
2b5c96a9dd53 facebook: Send user agent strings in all HTTP requests and in MQTT connect
dx <dx@dxzone.com.ar>
parents: 38185
diff changeset
103 * The client information string sent in the MQTT CONNECT message
2b5c96a9dd53 facebook: Send user agent strings in all HTTP requests and in MQTT connect
dx <dx@dxzone.com.ar>
parents: 38185
diff changeset
104 */
2b5c96a9dd53 facebook: Send user agent strings in all HTTP requests and in MQTT connect
dx <dx@dxzone.com.ar>
parents: 38185
diff changeset
105
2b5c96a9dd53 facebook: Send user agent strings in all HTTP requests and in MQTT connect
dx <dx@dxzone.com.ar>
parents: 38185
diff changeset
106 #define FB_API_MQTT_AGENT FB_API_AGENT
2b5c96a9dd53 facebook: Send user agent strings in all HTTP requests and in MQTT connect
dx <dx@dxzone.com.ar>
parents: 38185
diff changeset
107
2b5c96a9dd53 facebook: Send user agent strings in all HTTP requests and in MQTT connect
dx <dx@dxzone.com.ar>
parents: 38185
diff changeset
108 /**
37370
2d832af0f400 facebook: fetch URLs for all messages attachments
James Geboski <jgeboski@gmail.com>
parents: 37369
diff changeset
109 * FB_API_URL_ATTACH:
2d832af0f400 facebook: fetch URLs for all messages attachments
James Geboski <jgeboski@gmail.com>
parents: 37369
diff changeset
110 *
2d832af0f400 facebook: fetch URLs for all messages attachments
James Geboski <jgeboski@gmail.com>
parents: 37369
diff changeset
111 * The URL for attachment URL requests.
2d832af0f400 facebook: fetch URLs for all messages attachments
James Geboski <jgeboski@gmail.com>
parents: 37369
diff changeset
112 */
2d832af0f400 facebook: fetch URLs for all messages attachments
James Geboski <jgeboski@gmail.com>
parents: 37369
diff changeset
113 #define FB_API_URL_ATTACH FB_API_AHOST "/method/messaging.getAttachment"
2d832af0f400 facebook: fetch URLs for all messages attachments
James Geboski <jgeboski@gmail.com>
parents: 37369
diff changeset
114 //#define FB_API_URL_ATTACH FB_API_AHOST "/method/messaging.attachmentRedirect"
2d832af0f400 facebook: fetch URLs for all messages attachments
James Geboski <jgeboski@gmail.com>
parents: 37369
diff changeset
115
2d832af0f400 facebook: fetch URLs for all messages attachments
James Geboski <jgeboski@gmail.com>
parents: 37369
diff changeset
116 /**
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
117 * FB_API_URL_AUTH:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
118 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
119 * The URL for authentication requests.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
120 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
121 #define FB_API_URL_AUTH FB_API_BHOST "/method/auth.login"
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
122
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
123 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
124 * FB_API_URL_GQL:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
125 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
126 * The URL for GraphQL requests.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
127 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
128 #define FB_API_URL_GQL FB_API_GHOST "/graphql"
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
129
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
130 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
131 * FB_API_URL_MESSAGES:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
132 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
133 * The URL for linking message threads.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
134 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
135 #define FB_API_URL_MESSAGES FB_API_WHOST "/messages"
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
136
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
137 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
138 * FB_API_URL_PARTS:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
139 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
140 * The URL for participant management requests.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
141 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
142 #define FB_API_URL_PARTS FB_API_GHOST "/participants"
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
143
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
144 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
145 * FB_API_URL_THREADS:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
146 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
147 * The URL for thread management requests.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
148 */
38399
d81c2350fc21 facebook: Fix creating threads, inviting, kicking members (misc api changes)
dx <dx@dxzone.com.ar>
parents: 38395
diff changeset
149 #define FB_API_URL_THREADS FB_API_GHOST "/me/group_threads"
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
150
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
151 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
152 * FB_API_URL_TOPIC:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
153 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
154 * The URL for thread topic requests.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
155 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
156 #define FB_API_URL_TOPIC FB_API_AHOST "/method/messaging.setthreadname"
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
157
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
158 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
159 * FB_API_QUERY_CONTACT:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
160 *
37381
8e23ae2d2ef6 facebook: fixed the contact query not fetching non-users
James Geboski <jgeboski@gmail.com>
parents: 37380
diff changeset
161 * The query hash for the `UsersQuery`.
37513
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
162 *
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
163 * Key mapping:
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
164 * 0: user_fbids
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
165 * 1: include_full_user_info
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
166 * 2: profile_pic_large_size
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
167 * 3: profile_pic_medium_size
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
168 * 4: profile_pic_small_size
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
169 */
37381
8e23ae2d2ef6 facebook: fixed the contact query not fetching non-users
James Geboski <jgeboski@gmail.com>
parents: 37380
diff changeset
170 #define FB_API_QUERY_CONTACT 10153915107411729
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
171
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
172 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
173 * FB_API_QUERY_CONTACTS:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
174 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
175 * The query hash for the `FetchContactsFullQuery`.
37513
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
176 *
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
177 * Key mapping:
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
178 * 0: profile_types
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
179 * 1: limit
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
180 * 2: big_img_size
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
181 * 3: huge_img_size
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
182 * 4: small_img_size
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
183 */
38392
f2ec33df3b4a facebook: Update some graphql query hashes
dx <dx@dxzone.com.ar>
parents: 38386
diff changeset
184 #define FB_API_QUERY_CONTACTS 10154444360806729
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
185
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
186 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
187 * FB_API_QUERY_CONTACTS_AFTER:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
188 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
189 * The query hash for the `FetchContactsFullWithAfterQuery`.
37513
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
190 *
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
191 * Key mapping:
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
192 * 0: profile_types
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
193 * 1: after
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
194 * 2: limit
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
195 * 3: big_img_size
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
196 * 4: huge_img_size
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
197 * 5: small_img_size
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
198 */
38392
f2ec33df3b4a facebook: Update some graphql query hashes
dx <dx@dxzone.com.ar>
parents: 38386
diff changeset
199 #define FB_API_QUERY_CONTACTS_AFTER 10154444360816729
f2ec33df3b4a facebook: Update some graphql query hashes
dx <dx@dxzone.com.ar>
parents: 38386
diff changeset
200
f2ec33df3b4a facebook: Update some graphql query hashes
dx <dx@dxzone.com.ar>
parents: 38386
diff changeset
201
f2ec33df3b4a facebook: Update some graphql query hashes
dx <dx@dxzone.com.ar>
parents: 38386
diff changeset
202 /**
f2ec33df3b4a facebook: Update some graphql query hashes
dx <dx@dxzone.com.ar>
parents: 38386
diff changeset
203 * FB_API_QUERY_CONTACTS_DELTA:
f2ec33df3b4a facebook: Update some graphql query hashes
dx <dx@dxzone.com.ar>
parents: 38386
diff changeset
204 *
f2ec33df3b4a facebook: Update some graphql query hashes
dx <dx@dxzone.com.ar>
parents: 38386
diff changeset
205 * The query hash for the `FetchContactsDeltaQuery`.
f2ec33df3b4a facebook: Update some graphql query hashes
dx <dx@dxzone.com.ar>
parents: 38386
diff changeset
206 *
f2ec33df3b4a facebook: Update some graphql query hashes
dx <dx@dxzone.com.ar>
parents: 38386
diff changeset
207 * Key mapping:
f2ec33df3b4a facebook: Update some graphql query hashes
dx <dx@dxzone.com.ar>
parents: 38386
diff changeset
208 * 0: after
f2ec33df3b4a facebook: Update some graphql query hashes
dx <dx@dxzone.com.ar>
parents: 38386
diff changeset
209 * 1: profile_types
f2ec33df3b4a facebook: Update some graphql query hashes
dx <dx@dxzone.com.ar>
parents: 38386
diff changeset
210 * 2: limit
f2ec33df3b4a facebook: Update some graphql query hashes
dx <dx@dxzone.com.ar>
parents: 38386
diff changeset
211 * 3: big_img_size
f2ec33df3b4a facebook: Update some graphql query hashes
dx <dx@dxzone.com.ar>
parents: 38386
diff changeset
212 * 4: huge_img_size
f2ec33df3b4a facebook: Update some graphql query hashes
dx <dx@dxzone.com.ar>
parents: 38386
diff changeset
213 * 5: small_img_size
f2ec33df3b4a facebook: Update some graphql query hashes
dx <dx@dxzone.com.ar>
parents: 38386
diff changeset
214 */
f2ec33df3b4a facebook: Update some graphql query hashes
dx <dx@dxzone.com.ar>
parents: 38386
diff changeset
215 #define FB_API_QUERY_CONTACTS_DELTA 10154444360801729
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
216
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
217 /**
37369
ebcd09a1a124 facebook: display stickers in-line
James Geboski <jgeboski@gmail.com>
parents: 37365
diff changeset
218 * FB_API_QUERY_STICKER:
ebcd09a1a124 facebook: display stickers in-line
James Geboski <jgeboski@gmail.com>
parents: 37365
diff changeset
219 *
ebcd09a1a124 facebook: display stickers in-line
James Geboski <jgeboski@gmail.com>
parents: 37365
diff changeset
220 * The query hash for the `FetchStickersWithPreviewsQuery`.
37513
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
221 *
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
222 * Key mapping:
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
223 * 0: sticker_ids
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
224 * 1: media_type
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
225 * 2: preview_size
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
226 * 3: scaling_factor
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
227 * 4: animated_media_type
37369
ebcd09a1a124 facebook: display stickers in-line
James Geboski <jgeboski@gmail.com>
parents: 37365
diff changeset
228 */
ebcd09a1a124 facebook: display stickers in-line
James Geboski <jgeboski@gmail.com>
parents: 37365
diff changeset
229 #define FB_API_QUERY_STICKER 10152877994321729
ebcd09a1a124 facebook: display stickers in-line
James Geboski <jgeboski@gmail.com>
parents: 37365
diff changeset
230
ebcd09a1a124 facebook: display stickers in-line
James Geboski <jgeboski@gmail.com>
parents: 37365
diff changeset
231 /**
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
232 * FB_API_QUERY_THREAD:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
233 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
234 * The query hash for the `ThreadQuery`.
37513
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
235 *
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
236 * Key mapping:
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
237 * 0: thread_ids
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
238 * 1: verification_type
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
239 * 2: hash_key
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
240 * 3: small_preview_size
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
241 * 4: large_preview_size
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
242 * 5: item_count
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
243 * 6: event_count
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
244 * 7: full_screen_height
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
245 * 8: full_screen_width
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
246 * 9: medium_preview_size
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
247 * 10: fetch_users_separately
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
248 * 11: include_message_info
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
249 * 12: msg_count
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
250 * 13: include_full_user_info
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
251 * 14: profile_pic_large_size
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
252 * 15: profile_pic_medium_size
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
253 * 16: profile_pic_small_size
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
254 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
255 #define FB_API_QUERY_THREAD 10153919752036729
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
256
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
257 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
258 * FB_API_QUERY_THREADS:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
259 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
260 * The query hash for the `ThreadListQuery`.
37513
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
261 *
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
262 * Key mapping:
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
263 * 0: folder_tag
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
264 * 1: thread_count
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
265 * 2: include_thread_info
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
266 * 3: verification_type
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
267 * 4: hash_key
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
268 * 5: small_preview_size
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
269 * 6: large_preview_size
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
270 * 7: item_count
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
271 * 8: event_count
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
272 * 9: full_screen_height
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
273 * 10: full_screen_width
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
274 * 11: medium_preview_size
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
275 * 12: fetch_users_separately
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
276 * 13: include_message_info
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
277 * 14: msg_count
37524
806baa6e240c Unbreak gtk-doc
Jorge Villaseñor <salinasv@pidgin.im>
parents: 37513
diff changeset
278 * 15: UNKNOWN
37513
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
279 * 16: profile_pic_large_size
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
280 * 17: profile_pic_medium_size
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
281 * 18: profile_pic_small_size
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
282 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
283 #define FB_API_QUERY_THREADS 10153919752026729
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
284
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
285 /**
38386
852ce119c395 facebook: Add new ThreadListQuery-like hash, for initial seq id only
dx <dx@dxzone.com.ar>
parents: 38385
diff changeset
286 * FB_API_QUERY_SEQ_ID:
852ce119c395 facebook: Add new ThreadListQuery-like hash, for initial seq id only
dx <dx@dxzone.com.ar>
parents: 38385
diff changeset
287 *
852ce119c395 facebook: Add new ThreadListQuery-like hash, for initial seq id only
dx <dx@dxzone.com.ar>
parents: 38385
diff changeset
288 * A variant of ThreadListQuery with sequence ID
852ce119c395 facebook: Add new ThreadListQuery-like hash, for initial seq id only
dx <dx@dxzone.com.ar>
parents: 38385
diff changeset
289 *
852ce119c395 facebook: Add new ThreadListQuery-like hash, for initial seq id only
dx <dx@dxzone.com.ar>
parents: 38385
diff changeset
290 * TODO: parameters.
852ce119c395 facebook: Add new ThreadListQuery-like hash, for initial seq id only
dx <dx@dxzone.com.ar>
parents: 38385
diff changeset
291 */
852ce119c395 facebook: Add new ThreadListQuery-like hash, for initial seq id only
dx <dx@dxzone.com.ar>
parents: 38385
diff changeset
292
852ce119c395 facebook: Add new ThreadListQuery-like hash, for initial seq id only
dx <dx@dxzone.com.ar>
parents: 38385
diff changeset
293 #define FB_API_QUERY_SEQ_ID 10155268192741729
852ce119c395 facebook: Add new ThreadListQuery-like hash, for initial seq id only
dx <dx@dxzone.com.ar>
parents: 38385
diff changeset
294
852ce119c395 facebook: Add new ThreadListQuery-like hash, for initial seq id only
dx <dx@dxzone.com.ar>
parents: 38385
diff changeset
295 /**
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
296 * FB_API_QUERY_XMA:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
297 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
298 * The query hash for the `XMAQuery`.
37513
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
299 *
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
300 * Key mapping:
250fdd93e9c3 facebook: migrated key mappings to the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37510
diff changeset
301 * 0: xma_id
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
302 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
303 #define FB_API_QUERY_XMA 10153919431161729
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
304
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
305 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
306 * FB_API_CONTACTS_COUNT:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
307 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
308 * The maximum amount of contacts to fetch in a single request. If this
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
309 * value is set too high, HTTP request will fail. This is due to the
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
310 * request data being too large.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
311 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
312 #define FB_API_CONTACTS_COUNT 500
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
313
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
314 /**
37510
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
315 * FB_API_TCHK:
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
316 * @e: The expression.
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
317 *
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
318 * Checks the Thrift related expression to ensure that it evaluates to
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
319 * #TRUE. If the expression evaluates to #FALSE, a #GError is assigned
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
320 * to the local `error` variable, then returns with no value.
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
321 *
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
322 * This macro is meant to only be used for Thrift related expressions,
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
323 * where the calling function has a `void` return type. This macro also
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
324 * requires the existence of a predefined `error` variable, which is a
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
325 * pointer of a pointer to a #GError.
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
326 */
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
327 #define FB_API_TCHK(e) \
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
328 G_STMT_START { \
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
329 if (G_UNLIKELY(!(e))) { \
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
330 g_set_error(error, FB_API_ERROR, FB_API_ERROR_GENERAL, \
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
331 "Failed to read thrift: %s:%d " \
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
332 "%s: assertion '%s' failed", \
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
333 __FILE__, __LINE__, G_STRFUNC, #e); \
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
334 return; \
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
335 } \
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
336 } G_STMT_END
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
337
1bee26614db9 facebook: properly handle optional Thrift fields and scoping
James Geboski <jgeboski@gmail.com>
parents: 37475
diff changeset
338 /**
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
339 * FB_API_MSGID:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
340 * @m: The time in milliseconds.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
341 * @i: The random integer.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
342 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
343 * Creates a 64-bit message identifier in the Facebook format.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
344 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
345 * Returns: The message identifier.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
346 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
347 #define FB_API_MSGID(m, i) ((guint64) ( \
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
348 (((guint32) i) & 0x3FFFFF) | \
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
349 (((guint64) m) << 22) \
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
350 ))
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
351
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
352 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
353 * FB_API_ERROR_EMIT:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
354 * @a: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
355 * @e: The #FbApiError.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
356 * @c: The code to execute.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
357 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
358 * Emits a #GError on behalf of the #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
359 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
360 #define FB_API_ERROR_EMIT(a, e, c) \
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
361 G_STMT_START { \
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
362 if (G_UNLIKELY((e) != NULL)) { \
37316
9e3520d6ec49 facebook: refactored and improved JSON error handling
James Geboski <jgeboski@gmail.com>
parents: 37315
diff changeset
363 fb_api_error_emit(a, e); \
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
364 {c;} \
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
365 } \
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
366 } G_STMT_END
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
367
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
368 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
369 * FB_API_ERROR:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
370 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
371 * The #GQuark of the domain of API errors.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
372 */
37471
32c1e77d0474 facebook: coding style consistencies
James Geboski <jgeboski@gmail.com>
parents: 37381
diff changeset
373 #define FB_API_ERROR fb_api_error_quark()
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
374
37337
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
375 typedef struct _FbApiEvent FbApiEvent;
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
376 typedef struct _FbApiMessage FbApiMessage;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
377 typedef struct _FbApiPresence FbApiPresence;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
378 typedef struct _FbApiThread FbApiThread;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
379 typedef struct _FbApiTyping FbApiTyping;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
380 typedef struct _FbApiUser FbApiUser;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
381
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
382 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
383 * FbApiError:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
384 * @FB_API_ERROR_GENERAL: General failure.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
385 * @FB_API_ERROR_AUTH: Authentication failure.
37377
c92bc4233941 facebook: fixed improper handling of queue errors
James Geboski <jgeboski@gmail.com>
parents: 37370
diff changeset
386 * @FB_API_ERROR_QUEUE: Queue failure.
38185
955dcca1ac3d facebook: Prevent disconnections on 509 errors, "Invalid attachment id"
dequis <dx@dxzone.com.ar>
parents: 37524
diff changeset
387 * @FB_API_ERROR_NONFATAL: Other non-fatal errors.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
388 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
389 * The error codes for the #FB_API_ERROR domain.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
390 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
391 typedef enum
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
392 {
37306
7c454f51b56b facebook: handle authentication errors
James Geboski <jgeboski@gmail.com>
parents: 37304
diff changeset
393 FB_API_ERROR_GENERAL,
37377
c92bc4233941 facebook: fixed improper handling of queue errors
James Geboski <jgeboski@gmail.com>
parents: 37370
diff changeset
394 FB_API_ERROR_AUTH,
38185
955dcca1ac3d facebook: Prevent disconnections on 509 errors, "Invalid attachment id"
dequis <dx@dxzone.com.ar>
parents: 37524
diff changeset
395 FB_API_ERROR_QUEUE,
955dcca1ac3d facebook: Prevent disconnections on 509 errors, "Invalid attachment id"
dequis <dx@dxzone.com.ar>
parents: 37524
diff changeset
396 FB_API_ERROR_NONFATAL
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
397 } FbApiError;
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
398
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
399 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
400 * FbApiEventType:
37380
06ad6f6aa43a facebook: implemented group chat topic change events
James Geboski <jgeboski@gmail.com>
parents: 37377
diff changeset
401 * @FB_API_EVENT_TYPE_THREAD_TOPIC: The thread topic was changed.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
402 * @FB_API_EVENT_TYPE_THREAD_USER_ADDED: A thread user was added.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
403 * @FB_API_EVENT_TYPE_THREAD_USER_REMOVED: A thread user was removed.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
404 *
37361
6545b86a0705 facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents: 37359
diff changeset
405 * The #FbApiEvent types.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
406 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
407 typedef enum
37337
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
408 {
37380
06ad6f6aa43a facebook: implemented group chat topic change events
James Geboski <jgeboski@gmail.com>
parents: 37377
diff changeset
409 FB_API_EVENT_TYPE_THREAD_TOPIC,
37337
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
410 FB_API_EVENT_TYPE_THREAD_USER_ADDED,
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
411 FB_API_EVENT_TYPE_THREAD_USER_REMOVED
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
412 } FbApiEventType;
37337
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
413
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
414 /**
37361
6545b86a0705 facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents: 37359
diff changeset
415 * FbApiMessageFlags:
37364
d8e50d403e82 facebook: display images in-line
James Geboski <jgeboski@gmail.com>
parents: 37361
diff changeset
416 * @FB_API_MESSAGE_FLAG_DONE: The text has been processed.
d8e50d403e82 facebook: display images in-line
James Geboski <jgeboski@gmail.com>
parents: 37361
diff changeset
417 * @FB_API_MESSAGE_FLAG_IMAGE: The text is a URL to an image.
37361
6545b86a0705 facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents: 37359
diff changeset
418 * @FB_API_MESSAGE_FLAG_SELF: The text is from the #FbApi user.
6545b86a0705 facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents: 37359
diff changeset
419 *
6545b86a0705 facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents: 37359
diff changeset
420 * The #FbApiMessage flags.
6545b86a0705 facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents: 37359
diff changeset
421 */
6545b86a0705 facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents: 37359
diff changeset
422 typedef enum
6545b86a0705 facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents: 37359
diff changeset
423 {
37364
d8e50d403e82 facebook: display images in-line
James Geboski <jgeboski@gmail.com>
parents: 37361
diff changeset
424 FB_API_MESSAGE_FLAG_DONE = 1 << 0,
d8e50d403e82 facebook: display images in-line
James Geboski <jgeboski@gmail.com>
parents: 37361
diff changeset
425 FB_API_MESSAGE_FLAG_IMAGE = 1 << 1,
d8e50d403e82 facebook: display images in-line
James Geboski <jgeboski@gmail.com>
parents: 37361
diff changeset
426 FB_API_MESSAGE_FLAG_SELF = 1 << 2
37361
6545b86a0705 facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents: 37359
diff changeset
427 } FbApiMessageFlags;
6545b86a0705 facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents: 37359
diff changeset
428
41290
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
429 #define FB_TYPE_API_EVENT (fb_api_event_get_type())
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
430
37361
6545b86a0705 facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents: 37359
diff changeset
431 /**
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
432 * FbApiEvent:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
433 * @type: The #FbApiEventType.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
434 * @uid: The user #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
435 * @tid: The thread #FbId.
37380
06ad6f6aa43a facebook: implemented group chat topic change events
James Geboski <jgeboski@gmail.com>
parents: 37377
diff changeset
436 * @text: The event text.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
437 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
438 * Represents a Facebook update event.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
439 */
37337
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
440 struct _FbApiEvent
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
441 {
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
442 FbApiEventType type;
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
443 FbId uid;
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
444 FbId tid;
37380
06ad6f6aa43a facebook: implemented group chat topic change events
James Geboski <jgeboski@gmail.com>
parents: 37377
diff changeset
445 gchar *text;
37337
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
446 };
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
447
41290
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
448 #define FB_TYPE_API_MESSAGE (fb_api_message_get_type())
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
449
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
450 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
451 * FbApiMessage:
37361
6545b86a0705 facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents: 37359
diff changeset
452 * @flags: The #FbApiMessageFlags.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
453 * @uid: The user #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
454 * @tid: The thread #FbId.
37475
643d7b0aadbd facebook: preserve the timestamp on incoming messages
James Geboski <jgeboski@gmail.com>
parents: 37471
diff changeset
455 * @tstamp: The timestamp in milliseconds (UTC).
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
456 * @text: The message text.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
457 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
458 * Represents a Facebook user message.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
459 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
460 struct _FbApiMessage
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
461 {
37361
6545b86a0705 facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents: 37359
diff changeset
462 FbApiMessageFlags flags;
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
463 FbId uid;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
464 FbId tid;
37475
643d7b0aadbd facebook: preserve the timestamp on incoming messages
James Geboski <jgeboski@gmail.com>
parents: 37471
diff changeset
465 gint64 tstamp;
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
466 gchar *text;
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
467 };
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
468
41290
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
469 #define FB_TYPE_API_PRESENCE (fb_api_presence_get_type())
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
470
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
471 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
472 * FbApiPresence:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
473 * @uid: The user #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
474 * @active: #TRUE if the user is active, otherwise #FALSE.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
475 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
476 * Represents a Facebook presence message.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
477 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
478 struct _FbApiPresence
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
479 {
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
480 FbId uid;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
481 gboolean active;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
482 };
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
483
41290
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
484 #define FB_TYPE_API_THREAD (fb_api_thread_get_type())
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
485
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
486 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
487 * FbApiThread:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
488 * @tid: The thread #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
489 * @topic: The topic.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
490 * @users: The #GSList of #FbApiUser's.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
491 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
492 * Represents a Facebook message thread.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
493 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
494 struct _FbApiThread
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
495 {
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
496 FbId tid;
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
497 gchar *topic;
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
498 GSList *users;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
499 };
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
500
41290
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
501 #define FB_TYPE_API_TYPING (fb_api_typing_get_type())
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
502
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
503 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
504 * FbApiTyping:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
505 * @uid: The user #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
506 * @state: #TRUE if the user is typing, otherwise #FALSE.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
507 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
508 * Represents a Facebook typing message.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
509 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
510 struct _FbApiTyping
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
511 {
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
512 FbId uid;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
513 gboolean state;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
514 };
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
515
41290
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
516 #define FB_TYPE_API_USER (fb_api_user_get_type())
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
517
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
518 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
519 * FbApiUser:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
520 * @uid: The user #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
521 * @name: The name of the user.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
522 * @icon: The icon URL.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
523 * @csum: The checksum of @icon.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
524 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
525 * Represents a Facebook user.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
526 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
527 struct _FbApiUser
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
528 {
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
529 FbId uid;
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
530 gchar *name;
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
531 gchar *icon;
37257
5ba291680ac4 facebook: compare checksums before fetching icons
James Geboski <jgeboski@gmail.com>
parents: 37255
diff changeset
532 gchar *csum;
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
533 };
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
534
39550
808e0a11eb9f Use G_DECLARE* in facebook prpl.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38399
diff changeset
535 G_DECLARE_FINAL_TYPE(FbApi, fb_api, FB, API, GObject)
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
536
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
537 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
538 * fb_api_error_quark:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
539 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
540 * Gets the #GQuark of the domain of API errors.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
541 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
542 * Returns: The #GQuark of the domain.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
543 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
544 GQuark
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
545 fb_api_error_quark(void);
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: 37342
diff changeset
547 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
548 * fb_api_new:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
549 * @gc: The #PurpleConnection.
40030
1827a7e715e0 Pass correct proxy resolver to Facebook soup session.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39819
diff changeset
550 * @resolver: The proxy resolver to use from the account.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
551 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
552 * Creates a new #FbApi. The returned #FbApi should be freed with
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
553 * #g_object_unref() when no longer needed.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
554 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
555 * Returns: The new #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
556 */
40030
1827a7e715e0 Pass correct proxy resolver to Facebook soup session.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39819
diff changeset
557 FbApi *fb_api_new(PurpleConnection *gc, GProxyResolver *resolver);
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
558
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
559 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
560 * fb_api_rehash:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
561 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
562 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
563 * Rehashes and updates internal data of the #FbApi. This should be
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
564 * called whenever properties are modified.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
565 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
566 void
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
567 fb_api_rehash(FbApi *api);
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
568
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
569 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
570 * fb_api_is_invisible:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
571 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
572 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
573 * Determines if the user of the #FbApi is invisible.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
574 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
575 * Returns: #TRUE if the #FbApi user is invisible, otherwise #FALSE.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
576 */
37328
4c091ac7c55a facebook: implemented the invisible presence state
James Geboski <jgeboski@gmail.com>
parents: 37326
diff changeset
577 gboolean
4c091ac7c55a facebook: implemented the invisible presence state
James Geboski <jgeboski@gmail.com>
parents: 37326
diff changeset
578 fb_api_is_invisible(FbApi *api);
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
579
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
580 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
581 * fb_api_error:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
582 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
583 * @error: The #FbApiError.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
584 * @format: The format string literal.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
585 * @...: The arguments for @format.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
586 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
587 * Emits an #FbApiError.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
588 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
589 void
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
590 fb_api_error(FbApi *api, FbApiError error, const gchar *format, ...)
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
591 G_GNUC_PRINTF(3, 4);
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: 37342
diff changeset
593 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
594 * fb_api_error_emit:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
595 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
596 * @error: The #GError.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
597 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
598 * Emits a #GError on an #FbApiError.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
599 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
600 void
37316
9e3520d6ec49 facebook: refactored and improved JSON error handling
James Geboski <jgeboski@gmail.com>
parents: 37315
diff changeset
601 fb_api_error_emit(FbApi *api, GError *error);
9e3520d6ec49 facebook: refactored and improved JSON error handling
James Geboski <jgeboski@gmail.com>
parents: 37315
diff changeset
602
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
603 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
604 * fb_api_auth:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
605 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
606 * @user: The Facebook user name, email, or phone number.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
607 * @pass: The Facebook password.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
608 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
609 * Sends an authentication request to Facebook. This will obtain
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
610 * session information, which is required for all other requests.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
611 */
37316
9e3520d6ec49 facebook: refactored and improved JSON error handling
James Geboski <jgeboski@gmail.com>
parents: 37315
diff changeset
612 void
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
613 fb_api_auth(FbApi *api, const gchar *user, const gchar *pass);
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
614
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
615 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
616 * fb_api_contact:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
617 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
618 * @uid: The user #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
619 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
620 * Sends a contact request. This will obtain the general information of
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
621 * a single contact.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
622 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
623 void
37338
e4d77bc25235 facebook: add and alias non-friend buddies
James Geboski <jgeboski@gmail.com>
parents: 37337
diff changeset
624 fb_api_contact(FbApi *api, FbId uid);
e4d77bc25235 facebook: add and alias non-friend buddies
James Geboski <jgeboski@gmail.com>
parents: 37337
diff changeset
625
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
626 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
627 * fb_api_contacts:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
628 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
629 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
630 * Sends a contacts request. This will obtain a full list of detailed
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
631 * contact information about the friends of the #FbApi user.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
632 */
37338
e4d77bc25235 facebook: add and alias non-friend buddies
James Geboski <jgeboski@gmail.com>
parents: 37337
diff changeset
633 void
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
634 fb_api_contacts(FbApi *api);
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
635
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
636 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
637 * fb_api_connect:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
638 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
639 * @invisible: #TRUE to make the user invisible, otherwise #FALSE.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
640 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
641 * Initializes and establishes the underlying MQTT connection.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
642 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
643 void
37328
4c091ac7c55a facebook: implemented the invisible presence state
James Geboski <jgeboski@gmail.com>
parents: 37326
diff changeset
644 fb_api_connect(FbApi *api, gboolean invisible);
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
645
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
646 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
647 * fb_api_disconnect:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
648 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
649 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
650 * Closes the underlying MQTT connection.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
651 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
652 void
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
653 fb_api_disconnect(FbApi *api);
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
654
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
655 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
656 * fb_api_message:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
657 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
658 * @id: The user or thread #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
659 * @thread: #TRUE if @id is a thread, otherwise #FALSE.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
660 * @text: The message text.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
661 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
662 * Sends a message as the user of the #FbApi to a user or a thread.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
663 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
664 void
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
665 fb_api_message(FbApi *api, FbId id, gboolean thread, const gchar *text);
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
666
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
667 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
668 * fb_api_publish:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
669 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
670 * @topic: The topic.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
671 * @format: The format string literal.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
672 * @...: The arguments for @format.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
673 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
674 * Publishes an MQTT message.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
675 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
676 void
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
677 fb_api_publish(FbApi *api, const gchar *topic, const gchar *format, ...)
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
678 G_GNUC_PRINTF(3, 4);
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
679
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
680 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
681 * fb_api_read:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
682 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
683 * @id: The user or thread #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
684 * @thread: #TRUE if @id is a thread, otherwise #FALSE.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
685 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
686 * Marks a message thread as read.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
687 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
688 void
37304
168a859417f6 facebook: implemented marking threads as read
James Geboski <jgeboski@gmail.com>
parents: 37299
diff changeset
689 fb_api_read(FbApi *api, FbId id, gboolean thread);
168a859417f6 facebook: implemented marking threads as read
James Geboski <jgeboski@gmail.com>
parents: 37299
diff changeset
690
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
691 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
692 * fb_api_unread:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
693 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
694 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
695 * Sends an unread message request.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
696 */
37304
168a859417f6 facebook: implemented marking threads as read
James Geboski <jgeboski@gmail.com>
parents: 37299
diff changeset
697 void
37326
c768f27357ec facebook: implemented the retrieval of unread messages
James Geboski <jgeboski@gmail.com>
parents: 37325
diff changeset
698 fb_api_unread(FbApi *api);
c768f27357ec facebook: implemented the retrieval of unread messages
James Geboski <jgeboski@gmail.com>
parents: 37325
diff changeset
699
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
700 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
701 * fb_api_thread:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
702 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
703 * @tid: The thread #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
704 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
705 * Sends a thread request. This will obtain the general information of
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
706 * a single thread.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
707 */
37326
c768f27357ec facebook: implemented the retrieval of unread messages
James Geboski <jgeboski@gmail.com>
parents: 37325
diff changeset
708 void
37332
c4f2fd45ffba facebook: refactored internal API naming
James Geboski <jgeboski@gmail.com>
parents: 37330
diff changeset
709 fb_api_thread(FbApi *api, FbId tid);
c4f2fd45ffba facebook: refactored internal API naming
James Geboski <jgeboski@gmail.com>
parents: 37330
diff changeset
710
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
711 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
712 * fb_api_thread_create:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
713 * @api: The #FbApi.
41294
3f0b065e58f7 Add missing element-type annotation in Facebook
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41290
diff changeset
714 * @uids: (element-type FbId): The #GSList of #FbId's.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
715 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
716 * Sends a thread creation request. In order to create a thread, there
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
717 * must be at least two other users in @uids.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
718 */
37332
c4f2fd45ffba facebook: refactored internal API naming
James Geboski <jgeboski@gmail.com>
parents: 37330
diff changeset
719 void
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
720 fb_api_thread_create(FbApi *api, GSList *uids);
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
721
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
722 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
723 * fb_api_thread_invite:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
724 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
725 * @tid: The thread #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
726 * @uid: The user #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
727 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
728 * Sends a thread user invitation request.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
729 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
730 void
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
731 fb_api_thread_invite(FbApi *api, FbId tid, FbId uid);
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
732
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
733 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
734 * fb_api_thread_remove:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
735 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
736 * @tid: The thread #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
737 * @uid: The user #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
738 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
739 * Sends a thread user removal request.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
740 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
741 void
37284
53cb588d8760 facebook: implemented kicking/leaving group chats
James Geboski <jgeboski@gmail.com>
parents: 37269
diff changeset
742 fb_api_thread_remove(FbApi *api, FbId tid, FbId uid);
53cb588d8760 facebook: implemented kicking/leaving group chats
James Geboski <jgeboski@gmail.com>
parents: 37269
diff changeset
743
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
744 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
745 * fb_api_thread_topic:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
746 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
747 * @tid: The thread #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
748 * @topic: The topic.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
749 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
750 * Sends a thread topic change request.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
751 */
37284
53cb588d8760 facebook: implemented kicking/leaving group chats
James Geboski <jgeboski@gmail.com>
parents: 37269
diff changeset
752 void
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
753 fb_api_thread_topic(FbApi *api, FbId tid, const gchar *topic);
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
754
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
755 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
756 * fb_api_threads:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
757 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
758 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
759 * Sends a threads request. This will obtain a full list of detailed
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
760 * thread information about the threads of the #FbApi user.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
761 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
762 void
37332
c4f2fd45ffba facebook: refactored internal API naming
James Geboski <jgeboski@gmail.com>
parents: 37330
diff changeset
763 fb_api_threads(FbApi *api);
c4f2fd45ffba facebook: refactored internal API naming
James Geboski <jgeboski@gmail.com>
parents: 37330
diff changeset
764
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
765 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
766 * fb_api_typing:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
767 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
768 * @uid: The user #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
769 * @state: #TRUE if the #FbApi user is typing, otherwise #FALSE.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
770 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
771 * Sends a typing state message for the user of the #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
772 */
37332
c4f2fd45ffba facebook: refactored internal API naming
James Geboski <jgeboski@gmail.com>
parents: 37330
diff changeset
773 void
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
774 fb_api_typing(FbApi *api, FbId uid, gboolean state);
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
775
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
776 /**
41290
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
777 * fb_api_event_get_type:
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
778 *
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
779 * Returns: The #GType for the #FbApiEvent boxed structure.
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
780 */
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
781 GType fb_api_event_get_type(void);
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
782
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
783 /**
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
784 * fb_api_event_dup:
37365
b70cc4d02d68 facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents: 37364
diff changeset
785 * @event: The #FbApiEvent or #NULL.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
786 *
41287
dd84ced2309c Remove weird use of dup functions to allocate new structs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41122
diff changeset
787 * Duplicates an #FbApiEvent. The returned #FbApiEvent should be freed with
dd84ced2309c Remove weird use of dup functions to allocate new structs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41122
diff changeset
788 * #fb_api_event_free() when no longer needed.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
789 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
790 * Returns: The new #FbApiEvent.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
791 */
37337
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
792 FbApiEvent *
41289
bcd5530b1462 Remove deep parameter from dup functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41287
diff changeset
793 fb_api_event_dup(const FbApiEvent *event);
37337
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
794
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
795 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
796 * fb_api_event_reset:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
797 * @event: The #FbApiEvent.
37380
06ad6f6aa43a facebook: implemented group chat topic change events
James Geboski <jgeboski@gmail.com>
parents: 37377
diff changeset
798 * @deep: #TRUE to free allocated data, otherwise #FALSE.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
799 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
800 * Resets an #FbApiEvent.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
801 */
37337
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
802 void
37380
06ad6f6aa43a facebook: implemented group chat topic change events
James Geboski <jgeboski@gmail.com>
parents: 37377
diff changeset
803 fb_api_event_reset(FbApiEvent *event, gboolean deep);
37337
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
804
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
805 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
806 * fb_api_event_free:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
807 * @event: The #FbApiEvent.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
808 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
809 * Frees all memory used by the #FbApiEvent.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
810 */
37337
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
811 void
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
812 fb_api_event_free(FbApiEvent *event);
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
813
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
814 /**
41290
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
815 * fb_api_message_get_type:
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
816 *
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
817 * Returns: The #GType for the #FbApiMessage boxed structure.
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
818 */
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
819 GType fb_api_message_get_type(void);
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
820
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
821 /**
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
822 * fb_api_message_dup:
37365
b70cc4d02d68 facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents: 37364
diff changeset
823 * @msg: The #FbApiMessage or #NULL.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
824 *
41287
dd84ced2309c Remove weird use of dup functions to allocate new structs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41122
diff changeset
825 * Duplicates an #FbApiMessage. The returned #FbApiMessage should be freed with
dd84ced2309c Remove weird use of dup functions to allocate new structs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41122
diff changeset
826 * #fb_api_message_free() when no longer needed.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
827 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
828 * Returns: The new #FbApiMessage.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
829 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
830 FbApiMessage *
41289
bcd5530b1462 Remove deep parameter from dup functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41287
diff changeset
831 fb_api_message_dup(const FbApiMessage *msg);
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
832
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
833 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
834 * fb_api_message_reset:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
835 * @msg: The #FbApiMessage.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
836 * @deep: #TRUE to free allocated data, otherwise #FALSE.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
837 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
838 * Resets an #FbApiMessage.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
839 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
840 void
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
841 fb_api_message_reset(FbApiMessage *msg, gboolean deep);
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
842
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
843 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
844 * fb_api_message_free:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
845 * @msg: The #FbApiMessage.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
846 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
847 * Frees all memory used by the #FbApiMessage.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
848 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
849 void
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
850 fb_api_message_free(FbApiMessage *msg);
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
851
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
852 /**
41290
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
853 * fb_api_presence_get_type:
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
854 *
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
855 * Returns: The #GType for the #FbApiPresence boxed structure.
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
856 */
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
857 GType fb_api_presence_get_type(void);
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
858
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
859 /**
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
860 * fb_api_presence_dup:
41084
72d6941bfa2e Fix typos in protocol plugins
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40794
diff changeset
861 * @presence: The #FbApiPresence or %NULL.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
862 *
41287
dd84ced2309c Remove weird use of dup functions to allocate new structs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41122
diff changeset
863 * Duplicates an #FbApiPresence. The returned #FbApiPresence should be freed
dd84ced2309c Remove weird use of dup functions to allocate new structs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41122
diff changeset
864 * with #fb_api_presence_free() when no longer needed.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
865 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
866 * Returns: The new #FbApiPresence.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
867 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
868 FbApiPresence *
41084
72d6941bfa2e Fix typos in protocol plugins
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40794
diff changeset
869 fb_api_presence_dup(const FbApiPresence *presence);
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
870
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
871 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
872 * fb_api_presence_reset:
41084
72d6941bfa2e Fix typos in protocol plugins
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40794
diff changeset
873 * @presence: The #FbApiPresence.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
874 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
875 * Resets an #FbApiPresence.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
876 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
877 void
41084
72d6941bfa2e Fix typos in protocol plugins
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40794
diff changeset
878 fb_api_presence_reset(FbApiPresence *presence);
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
879
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
880 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
881 * fb_api_presence_free:
41084
72d6941bfa2e Fix typos in protocol plugins
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40794
diff changeset
882 * @presence: The #FbApiPresence.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
883 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
884 * Frees all memory used by the #FbApiPresence.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
885 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
886 void
41084
72d6941bfa2e Fix typos in protocol plugins
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40794
diff changeset
887 fb_api_presence_free(FbApiPresence *presence);
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
888
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
889 /**
41290
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
890 * fb_api_thread_get_type:
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
891 *
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
892 * Returns: The #GType for the #FbApiThread boxed structure.
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
893 */
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
894 GType fb_api_thread_get_type(void);
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
895
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
896 /**
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
897 * fb_api_thread_dup:
37365
b70cc4d02d68 facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents: 37364
diff changeset
898 * @thrd: The #FbApiThread or #NULL.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
899 *
41287
dd84ced2309c Remove weird use of dup functions to allocate new structs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41122
diff changeset
900 * Duplicates an #FbApiThread. The returned #FbApiThread should be freed with
dd84ced2309c Remove weird use of dup functions to allocate new structs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41122
diff changeset
901 * #fb_api_thread_free() when no longer needed.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
902 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
903 * Returns: The new #FbApiThread.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
904 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
905 FbApiThread *
41289
bcd5530b1462 Remove deep parameter from dup functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41287
diff changeset
906 fb_api_thread_dup(const FbApiThread *thrd);
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
907
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
908 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
909 * fb_api_thread_reset:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
910 * @thrd: The #FbApiThread.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
911 * @deep: #TRUE to free allocated data, otherwise #FALSE.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
912 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
913 * Resets an #FbApiThread.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
914 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
915 void
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
916 fb_api_thread_reset(FbApiThread *thrd, gboolean deep);
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
917
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
918 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
919 * fb_api_thread_free:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
920 * @thrd: The #FbApiThread.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
921 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
922 * Frees all memory used by the #FbApiThread.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
923 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
924 void
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
925 fb_api_thread_free(FbApiThread *thrd);
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
926
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
927 /**
41290
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
928 * fb_api_typing_get_type:
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
929 *
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
930 * Returns: The #GType for the #FbApiTyping boxed structure.
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
931 */
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
932 GType fb_api_typing_get_type(void);
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
933
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
934 /**
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
935 * fb_api_typing_dup:
37365
b70cc4d02d68 facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents: 37364
diff changeset
936 * @typg: The #FbApiTyping or #NULL.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
937 *
41287
dd84ced2309c Remove weird use of dup functions to allocate new structs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41122
diff changeset
938 * Duplicates an #FbApiTyping. The returned #FbApiTyping should be freed with
dd84ced2309c Remove weird use of dup functions to allocate new structs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41122
diff changeset
939 * #fb_api_typing_free() when no longer needed.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
940 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
941 * Returns: The new #FbApiTyping.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
942 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
943 FbApiTyping *
37365
b70cc4d02d68 facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents: 37364
diff changeset
944 fb_api_typing_dup(const FbApiTyping *typg);
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
945
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
946 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
947 * fb_api_typing_reset:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
948 * @typg: The #FbApiTyping.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
949 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
950 * Resets an #FbApiTyping.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
951 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
952 void
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
953 fb_api_typing_reset(FbApiTyping *typg);
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
954
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
955 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
956 * fb_api_typing_free:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
957 * @typg: The #FbApiTyping.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
958 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
959 * Frees all memory used by the #FbApiTyping.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
960 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
961 void
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
962 fb_api_typing_free(FbApiTyping *typg);
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
963
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
964 /**
41290
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
965 * fb_api_user_get_type:
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
966 *
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
967 * Returns: The #GType for the #FbApiUser boxed structure.
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
968 */
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
969 GType fb_api_user_get_type(void);
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
970
6b5fe1c14970 Add boxes around FbApi types
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41289
diff changeset
971 /**
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
972 * fb_api_user_dup:
37365
b70cc4d02d68 facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents: 37364
diff changeset
973 * @user: The #FbApiUser or #NULL.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
974 *
41287
dd84ced2309c Remove weird use of dup functions to allocate new structs
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41122
diff changeset
975 * Duplicates an #FbApiUser. The returned #FbApiUser should be freed with
37365
b70cc4d02d68 facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents: 37364
diff changeset
976 * #fb_api_user_free() when no longer needed.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
977 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
978 * Returns: The new #FbApiUser.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
979 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
980 FbApiUser *
41289
bcd5530b1462 Remove deep parameter from dup functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41287
diff changeset
981 fb_api_user_dup(const FbApiUser *user);
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
982
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
983 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
984 * fb_api_user_reset:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
985 * @user: The #FbApiUser.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
986 * @deep: #TRUE to free allocated data, otherwise #FALSE.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
987 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
988 * Resets an #FbApiUser.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
989 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
990 void
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
991 fb_api_user_reset(FbApiUser *user, gboolean deep);
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
992
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
993 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
994 * fb_api_user_free:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
995 * @user: The #FbApiUser.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
996 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
997 * Frees all memory used by the #FbApiUser.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
998 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
999 void
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
1000 fb_api_user_free(FbApiUser *user);
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
1001
39819
3554dac2991b Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39550
diff changeset
1002 #endif /* PURPLE_FACEBOOK_API_H */

mercurial