libpurple/protocols/facebook/api.h

Tue, 18 Aug 2015 14:20:02 -0400

author
James Geboski <jgeboski@gmail.com>
date
Tue, 18 Aug 2015 14:20:02 -0400
branch
facebook
changeset 37357
5f711ecb5913
parent 37347
34d43f8c10d1
child 37359
79374d83fae5
permissions
-rw-r--r--

facebook: removed duplicate casting macros

37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
1 /* purple
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
2 *
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
3 * Purple is the legal property of its developers, whose names are too numerous
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
4 * to list here. Please refer to the COPYRIGHT file distributed with this
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
5 * source distribution.
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
6 *
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
10 * (at your option) any later version.
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
11 *
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
15 * GNU General Public License for more details.
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
16 *
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
20 */
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
21
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
22 #ifndef _FACEBOOK_API_H_
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
23 #define _FACEBOOK_API_H_
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
24
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
25 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
26 * SECTION:api
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
27 * @section_id: facebook-api
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
28 * @short_description: <filename>api.h</filename>
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
29 * @title: Facebook API
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
30 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
31 * The API for interacting with the Facebook Messenger protocol.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
32 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
33
37310
a1a5f0ac39f2 facebook: cleaned up libpurple includes
James Geboski <jgeboski@gmail.com>
parents: 37309
diff changeset
34 #include "internal.h"
a1a5f0ac39f2 facebook: cleaned up libpurple includes
James Geboski <jgeboski@gmail.com>
parents: 37309
diff changeset
35
37309
556eea7a45da facebook: merged local glibcompat.h into libpurple's
James Geboski <jgeboski@gmail.com>
parents: 37306
diff changeset
36 #include <glib.h>
556eea7a45da facebook: merged local glibcompat.h into libpurple's
James Geboski <jgeboski@gmail.com>
parents: 37306
diff changeset
37
37310
a1a5f0ac39f2 facebook: cleaned up libpurple includes
James Geboski <jgeboski@gmail.com>
parents: 37309
diff changeset
38 #include "connection.h"
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
39
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
40 #include "http.h"
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
41 #include "id.h"
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
42 #include "mqtt.h"
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
43
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
44 #define FB_TYPE_API (fb_api_get_type())
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
45 #define FB_API(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), FB_TYPE_API, FbApi))
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
46 #define FB_API_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), FB_TYPE_API, FbApiClass))
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
47 #define FB_IS_API(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), FB_TYPE_API))
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
48 #define FB_IS_API_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), FB_TYPE_API))
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
49 #define FB_API_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), FB_TYPE_API, FbApiClass))
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
50
37347
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 * FB_API_AHOST:
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 * 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
55 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
56 #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
57
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 * FB_API_BHOST:
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 * 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
62 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
63 #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
64
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
65 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
66 * FB_API_GHOST:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
67 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
68 * 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
69 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
70 #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
71
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 * FB_API_WHOST:
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 * 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
76 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
77 #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
78
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 * FB_API_KEY:
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 * The Facebook API key.
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 #define FB_API_KEY "256002347743983"
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
85
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
86 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
87 * FB_API_SECRET:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
88 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
89 * The Facebook API secret.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
90 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
91 #define FB_API_SECRET "374e60f8b9bb6b8cbb30f78030438895"
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
92
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
93 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
94 * FB_API_URL_AUTH:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
95 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
96 * The URL for authentication requests.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
97 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
98 #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
99
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
100 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
101 * FB_API_URL_GQL:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
102 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
103 * The URL for GraphQL requests.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
104 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
105 #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
106
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
107 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
108 * FB_API_URL_MESSAGES:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
109 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
110 * The URL for linking message threads.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
111 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
112 #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
113
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
114 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
115 * FB_API_URL_PARTS:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
116 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
117 * The URL for participant management requests.
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 #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
120
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
121 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
122 * FB_API_URL_STICKER:
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 * The URL for linking stickers.
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 #define FB_API_URL_STICKER FB_API_WHOST "/stickers/asset/"
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 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
129 * FB_API_URL_THREADS:
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 * The URL for thread management requests.
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 #define FB_API_URL_THREADS FB_API_GHOST "/me/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 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
136 * FB_API_URL_TOPIC:
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 * The URL for thread topic requests.
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 #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
141
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
142 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
143 * FB_API_QUERY_CONTACT:
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 * The query hash for the `FetchContactQuery`.
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 #define FB_API_QUERY_CONTACT 10153746900701729
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
148
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
149 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
150 * FB_API_QUERY_CONTACTS:
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 * The query hash for the `FetchContactsFullQuery`.
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 #define FB_API_QUERY_CONTACTS 10153856456271729
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 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
157 * FB_API_QUERY_CONTACTS_AFTER:
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 * The query hash for the `FetchContactsFullWithAfterQuery`.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
160 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
161 #define FB_API_QUERY_CONTACTS_AFTER 10153856456281729
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
162
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
163 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
164 * FB_API_QUERY_THREAD:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
165 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
166 * The query hash for the `ThreadQuery`.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
167 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
168 #define FB_API_QUERY_THREAD 10153919752036729
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
169
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
170 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
171 * FB_API_QUERY_THREADS:
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 * The query hash for the `ThreadListQuery`.
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 #define FB_API_QUERY_THREADS 10153919752026729
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
176
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
177 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
178 * FB_API_QUERY_XMA:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
179 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
180 * The query hash for the `XMAQuery`.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
181 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
182 #define FB_API_QUERY_XMA 10153919431161729
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
183
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
184 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
185 * FB_API_CONTACTS_COUNT:
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 * 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
188 * 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
189 * request data being too large.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
190 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
191 #define FB_API_CONTACTS_COUNT 500
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
192
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
193 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
194 * FB_API_MSGID:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
195 * @m: The time in milliseconds.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
196 * @i: The random integer.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
197 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
198 * 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
199 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
200 * Returns: The message identifier.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
201 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
202 #define FB_API_MSGID(m, i) ((guint64) ( \
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
203 (((guint32) i) & 0x3FFFFF) | \
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
204 (((guint64) m) << 22) \
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
205 ))
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
206
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
207 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
208 * FB_API_ERROR_EMIT:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
209 * @a: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
210 * @e: The #FbApiError.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
211 * @c: The code to execute.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
212 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
213 * 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
214 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
215 #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
216 G_STMT_START { \
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
217 if (G_UNLIKELY((e) != NULL)) { \
37316
9e3520d6ec49 facebook: refactored and improved JSON error handling
James Geboski <jgeboski@gmail.com>
parents: 37315
diff changeset
218 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
219 {c;} \
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
220 } \
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
221 } G_STMT_END
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
222
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
223 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
224 * FB_API_ERROR:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
225 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
226 * 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
227 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
228 #define FB_API_ERROR fb_api_error_quark()
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
229
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
230 typedef struct _FbApi FbApi;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
231 typedef struct _FbApiClass FbApiClass;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
232 typedef struct _FbApiPrivate FbApiPrivate;
37337
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
233 typedef struct _FbApiEvent FbApiEvent;
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
234 typedef struct _FbApiMessage FbApiMessage;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
235 typedef struct _FbApiPresence FbApiPresence;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
236 typedef struct _FbApiThread FbApiThread;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
237 typedef struct _FbApiTyping FbApiTyping;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
238 typedef struct _FbApiUser FbApiUser;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
239
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
240 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
241 * FbApiError:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
242 * @FB_API_ERROR_GENERAL: General failure.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
243 * @FB_API_ERROR_AUTH: Authentication failure.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
244 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
245 * 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
246 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
247 typedef enum
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
248 {
37306
7c454f51b56b facebook: handle authentication errors
James Geboski <jgeboski@gmail.com>
parents: 37304
diff changeset
249 FB_API_ERROR_GENERAL,
7c454f51b56b facebook: handle authentication errors
James Geboski <jgeboski@gmail.com>
parents: 37304
diff changeset
250 FB_API_ERROR_AUTH
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
251 } FbApiError;
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
252
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
253 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
254 * FbApiEventType:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
255 * @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
256 * @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
257 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
258 * The FbApiEvent types.
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 typedef enum
37337
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
261 {
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
262 FB_API_EVENT_TYPE_THREAD_USER_ADDED,
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
263 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
264 } FbApiEventType;
37337
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
265
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
266 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
267 * FbApi:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
268 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
269 * Represents a Facebook Messenger connection.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
270 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
271 struct _FbApi
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
272 {
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
273 /*< private >*/
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
274 GObject parent;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
275 FbApiPrivate *priv;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
276 };
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
277
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
278 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
279 * FbApiClass:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
280 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
281 * The base class for all #FbApi's.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
282 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
283 struct _FbApiClass
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
284 {
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
285 /*< private >*/
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
286 GObjectClass parent_class;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
287 };
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
288
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
289 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
290 * FbApiEvent:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
291 * @type: The #FbApiEventType.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
292 * @uid: The user #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
293 * @tid: The thread #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
294 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
295 * Represents a Facebook update event.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
296 */
37337
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
297 struct _FbApiEvent
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
298 {
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
299 FbApiEventType type;
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
300 FbId uid;
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
301 FbId tid;
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
302 };
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
303
37347
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 * FbApiMessage:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
306 * @uid: The user #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
307 * @tid: The thread #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
308 * @text: The message text.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
309 * @isself: #TRUE if the user is the #FbApi user, otherwise #FALSE.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
310 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
311 * Represents a Facebook user message.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
312 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
313 struct _FbApiMessage
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
314 {
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
315 FbId uid;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
316 FbId tid;
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
317 gchar *text;
37317
143a4d8db15c facebook: implemented self messages
James Geboski <jgeboski@gmail.com>
parents: 37316
diff changeset
318 gboolean isself;
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
319 };
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
320
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
321 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
322 * FbApiPresence:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
323 * @uid: The user #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
324 * @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
325 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
326 * Represents a Facebook presence message.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
327 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
328 struct _FbApiPresence
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
329 {
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
330 FbId uid;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
331 gboolean active;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
332 };
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
333
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
334 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
335 * FbApiThread:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
336 * @tid: The thread #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
337 * @topic: The topic.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
338 * @users: The #GSList of #FbApiUser's.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
339 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
340 * Represents a Facebook message thread.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
341 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
342 struct _FbApiThread
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
343 {
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
344 FbId tid;
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
345 gchar *topic;
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
346 GSList *users;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
347 };
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
348
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
349 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
350 * FbApiTyping:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
351 * @uid: The user #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
352 * @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
353 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
354 * Represents a Facebook typing message.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
355 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
356 struct _FbApiTyping
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
357 {
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
358 FbId uid;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
359 gboolean state;
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
360 };
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
361
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
362 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
363 * FbApiUser:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
364 * @uid: The user #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
365 * @name: The name of the user.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
366 * @icon: The icon URL.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
367 * @csum: The checksum of @icon.
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 * Represents a Facebook user.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
370 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
371 struct _FbApiUser
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
372 {
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
373 FbId uid;
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
374 gchar *name;
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
375 gchar *icon;
37257
5ba291680ac4 facebook: compare checksums before fetching icons
James Geboski <jgeboski@gmail.com>
parents: 37255
diff changeset
376 gchar *csum;
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
377 };
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
378
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
379 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
380 * fb_api_get_type:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
381 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
382 * Returns: The #GType for an #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
383 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
384 GType
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
385 fb_api_get_type(void);
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
386
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
387 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
388 * fb_api_error_quark:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
389 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
390 * 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
391 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
392 * Returns: The #GQuark of the domain.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
393 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
394 GQuark
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
395 fb_api_error_quark(void);
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
396
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
397 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
398 * fb_api_new:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
399 * @gc: The #PurpleConnection.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
400 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
401 * 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
402 * #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
403 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
404 * Returns: The new #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
405 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
406 FbApi *
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
407 fb_api_new(PurpleConnection *gc);
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
408
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
409 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
410 * fb_api_rehash:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
411 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
412 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
413 * 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
414 * called whenever properties are modified.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
415 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
416 void
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
417 fb_api_rehash(FbApi *api);
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
418
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
419 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
420 * fb_api_is_invisible:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
421 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
422 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
423 * 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
424 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
425 * 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
426 */
37328
4c091ac7c55a facebook: implemented the invisible presence state
James Geboski <jgeboski@gmail.com>
parents: 37326
diff changeset
427 gboolean
4c091ac7c55a facebook: implemented the invisible presence state
James Geboski <jgeboski@gmail.com>
parents: 37326
diff changeset
428 fb_api_is_invisible(FbApi *api);
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
429
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
430 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
431 * fb_api_error:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
432 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
433 * @error: The #FbApiError.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
434 * @format: The format string literal.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
435 * @...: The arguments for @format.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
436 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
437 * Emits an #FbApiError.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
438 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
439 void
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
440 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
441 G_GNUC_PRINTF(3, 4);
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
442
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
443 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
444 * fb_api_error_emit:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
445 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
446 * @error: The #GError.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
447 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
448 * Emits a #GError on an #FbApiError.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
449 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
450 void
37316
9e3520d6ec49 facebook: refactored and improved JSON error handling
James Geboski <jgeboski@gmail.com>
parents: 37315
diff changeset
451 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
452
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
453 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
454 * fb_api_auth:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
455 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
456 * @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
457 * @pass: The Facebook password.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
458 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
459 * 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
460 * 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
461 */
37316
9e3520d6ec49 facebook: refactored and improved JSON error handling
James Geboski <jgeboski@gmail.com>
parents: 37315
diff changeset
462 void
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
463 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
464
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
465 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
466 * fb_api_contact:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
467 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
468 * @uid: The user #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
469 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
470 * 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
471 * a single contact.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
472 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
473 void
37338
e4d77bc25235 facebook: add and alias non-friend buddies
James Geboski <jgeboski@gmail.com>
parents: 37337
diff changeset
474 fb_api_contact(FbApi *api, FbId uid);
e4d77bc25235 facebook: add and alias non-friend buddies
James Geboski <jgeboski@gmail.com>
parents: 37337
diff changeset
475
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
476 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
477 * fb_api_contacts:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
478 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
479 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
480 * 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
481 * 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
482 */
37338
e4d77bc25235 facebook: add and alias non-friend buddies
James Geboski <jgeboski@gmail.com>
parents: 37337
diff changeset
483 void
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
484 fb_api_contacts(FbApi *api);
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
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 * fb_api_connect:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
488 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
489 * @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
490 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
491 * 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
492 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
493 void
37328
4c091ac7c55a facebook: implemented the invisible presence state
James Geboski <jgeboski@gmail.com>
parents: 37326
diff changeset
494 fb_api_connect(FbApi *api, gboolean invisible);
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
495
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
496 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
497 * fb_api_disconnect:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
498 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
499 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
500 * Closes the underlying MQTT connection.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
501 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
502 void
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
503 fb_api_disconnect(FbApi *api);
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
504
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
505 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
506 * fb_api_message:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
507 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
508 * @id: The user or thread #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
509 * @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
510 * @text: The message text.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
511 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
512 * 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
513 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
514 void
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
515 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
516
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
517 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
518 * fb_api_publish:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
519 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
520 * @topic: The topic.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
521 * @format: The format string literal.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
522 * @...: The arguments for @format.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
523 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
524 * Publishes an MQTT message.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
525 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
526 void
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
527 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
528 G_GNUC_PRINTF(3, 4);
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
529
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
530 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
531 * fb_api_read:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
532 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
533 * @id: The user or thread #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
534 * @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
535 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
536 * Marks a message thread as read.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
537 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
538 void
37304
168a859417f6 facebook: implemented marking threads as read
James Geboski <jgeboski@gmail.com>
parents: 37299
diff changeset
539 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
540
37347
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 * fb_api_unread:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
543 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
544 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
545 * Sends an unread message request.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
546 */
37304
168a859417f6 facebook: implemented marking threads as read
James Geboski <jgeboski@gmail.com>
parents: 37299
diff changeset
547 void
37326
c768f27357ec facebook: implemented the retrieval of unread messages
James Geboski <jgeboski@gmail.com>
parents: 37325
diff changeset
548 fb_api_unread(FbApi *api);
c768f27357ec facebook: implemented the retrieval of unread messages
James Geboski <jgeboski@gmail.com>
parents: 37325
diff changeset
549
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
550 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
551 * fb_api_thread:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
552 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
553 * @tid: The thread #FbId.
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 * 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
556 * a single thread.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
557 */
37326
c768f27357ec facebook: implemented the retrieval of unread messages
James Geboski <jgeboski@gmail.com>
parents: 37325
diff changeset
558 void
37332
c4f2fd45ffba facebook: refactored internal API naming
James Geboski <jgeboski@gmail.com>
parents: 37330
diff changeset
559 fb_api_thread(FbApi *api, FbId tid);
c4f2fd45ffba facebook: refactored internal API naming
James Geboski <jgeboski@gmail.com>
parents: 37330
diff changeset
560
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
561 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
562 * fb_api_thread_create:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
563 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
564 * @uids: The #GSList of #FbId's.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
565 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
566 * 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
567 * 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
568 */
37332
c4f2fd45ffba facebook: refactored internal API naming
James Geboski <jgeboski@gmail.com>
parents: 37330
diff changeset
569 void
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
570 fb_api_thread_create(FbApi *api, GSList *uids);
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
571
37347
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 * fb_api_thread_invite:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
574 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
575 * @tid: The thread #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
576 * @uid: The user #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
577 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
578 * Sends a thread user invitation request.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
579 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
580 void
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
581 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
582
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
583 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
584 * fb_api_thread_remove:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
585 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
586 * @tid: The thread #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
587 * @uid: The user #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
588 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
589 * Sends a thread user removal request.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
590 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
591 void
37284
53cb588d8760 facebook: implemented kicking/leaving group chats
James Geboski <jgeboski@gmail.com>
parents: 37269
diff changeset
592 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
593
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
594 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
595 * fb_api_thread_topic:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
596 * @api: The #FbApi.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
597 * @tid: The thread #FbId.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
598 * @topic: The topic.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
599 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
600 * Sends a thread topic change request.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
601 */
37284
53cb588d8760 facebook: implemented kicking/leaving group chats
James Geboski <jgeboski@gmail.com>
parents: 37269
diff changeset
602 void
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
603 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
604
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
605 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
606 * fb_api_threads:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
607 * @api: The #FbApi.
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 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
610 * 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
611 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
612 void
37332
c4f2fd45ffba facebook: refactored internal API naming
James Geboski <jgeboski@gmail.com>
parents: 37330
diff changeset
613 fb_api_threads(FbApi *api);
c4f2fd45ffba facebook: refactored internal API naming
James Geboski <jgeboski@gmail.com>
parents: 37330
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_typing:
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 * @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
620 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
621 * 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
622 */
37332
c4f2fd45ffba facebook: refactored internal API naming
James Geboski <jgeboski@gmail.com>
parents: 37330
diff changeset
623 void
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
624 fb_api_typing(FbApi *api, FbId uid, gboolean state);
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
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_event_dup:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
628 * @event: The #FbApiEvent.
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 * Duplicates an #FbApiEvent.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
631 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
632 * Returns: The new #FbApiEvent.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
633 */
37337
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
634 FbApiEvent *
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
635 fb_api_event_dup(FbApiEvent *event);
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
636
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
637 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
638 * fb_api_event_reset:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
639 * @event: The #FbApiEvent.
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 * Resets an #FbApiEvent.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
642 */
37337
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
643 void
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
644 fb_api_event_reset(FbApiEvent *event);
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
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_event_free:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
648 * @event: The #FbApiEvent.
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 * 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
651 */
37337
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
652 void
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
diff changeset
653 fb_api_event_free(FbApiEvent *event);
aecff282de76 facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents: 37332
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_dup:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
657 * @msg: The #FbApiMessage.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
658 * @deep: #TRUE to duplicate allocated data, otherwise #FALSE.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
659 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
660 * Duplicates an #FbApiMessage.
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 * Returns: The new #FbApiMessage.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
663 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
664 FbApiMessage *
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
665 fb_api_message_dup(FbApiMessage *msg, gboolean deep);
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
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_message_reset:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
669 * @msg: The #FbApiMessage.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
670 * @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
671 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
672 * Resets an #FbApiMessage.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
673 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
674 void
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
675 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
676
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
677 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
678 * fb_api_message_free:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
679 * @msg: The #FbApiMessage.
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 * 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
682 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
683 void
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
684 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
685
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
686 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
687 * fb_api_presence_dup:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
688 * @pres: The #FbApiPresence.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
689 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
690 * Duplicates an #FbApiPresence.
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 * Returns: The new #FbApiPresence.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
693 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
694 FbApiPresence *
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
695 fb_api_presence_dup(FbApiPresence *pres);
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
696
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
697 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
698 * fb_api_presence_reset:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
699 * @pres: The #FbApiPresence.
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 * Resets an #FbApiPresence.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
702 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
703 void
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
704 fb_api_presence_reset(FbApiPresence *pres);
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
705
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
706 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
707 * fb_api_presence_free:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
708 * @pres: The #FbApiPresence.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
709 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
710 * 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
711 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
712 void
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
713 fb_api_presence_free(FbApiPresence *pres);
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
714
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 * fb_api_thread_dup:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
717 * @thrd: The #FbApiThread.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
718 * @deep: #TRUE to duplicate allocated data, otherwise #FALSE.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
719 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
720 * Duplicates an #FbApiThread.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
721 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
722 * Returns: The new #FbApiThread.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
723 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
724 FbApiThread *
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
725 fb_api_thread_dup(FbApiThread *thrd, gboolean deep);
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
726
37347
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 * fb_api_thread_reset:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
729 * @thrd: The #FbApiThread.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
730 * @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
731 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
732 * Resets an #FbApiThread.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
733 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
734 void
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
735 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
736
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
737 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
738 * fb_api_thread_free:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
739 * @thrd: The #FbApiThread.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
740 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
741 * 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
742 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
743 void
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
744 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
745
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
746 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
747 * fb_api_typing_dup:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
748 * @typg: The #FbApiTyping.
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 * Duplicates an #FbApiTyping.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
751 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
752 * Returns: The new #FbApiTyping.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
753 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
754 FbApiTyping *
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
755 fb_api_typing_dup(FbApiTyping *typg);
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
756
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
757 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
758 * fb_api_typing_reset:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
759 * @typg: The #FbApiTyping.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
760 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
761 * Resets an #FbApiTyping.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
762 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
763 void
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
764 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
765
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
766 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
767 * fb_api_typing_free:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
768 * @typg: The #FbApiTyping.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
769 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
770 * 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
771 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
772 void
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
773 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
774
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
775 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
776 * fb_api_user_dup:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
777 * @user: The #FbApiUser.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
778 * @deep: #TRUE to duplicate allocated data, otherwise #FALSE.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
779 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
780 * Duplicates an #FbApiUser.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
781 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
782 * Returns: The new #FbApiUser.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
783 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
784 FbApiUser *
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
785 fb_api_user_dup(FbApiUser *user, gboolean deep);
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
786
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
787 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
788 * fb_api_user_reset:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
789 * @user: The #FbApiUser.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
790 * @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
791 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
792 * Resets an #FbApiUser.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
793 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
794 void
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
795 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
796
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
797 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
798 * fb_api_user_free:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
799 * @user: The #FbApiUser.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
800 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37342
diff changeset
801 * 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
802 */
37269
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
803 void
129e87951cd6 facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
804 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
805
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
806 #endif /* _FACEBOOK_API_H_ */

mercurial