Tue, 25 Aug 2015 16:48:44 -0400
facebook: implemented group chat topic change events
|
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 | |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
44 | #define FB_TYPE_API (fb_api_get_type()) |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
45 | #define FB_API(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), FB_TYPE_API, FbApi)) |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
46 | #define FB_API_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), FB_TYPE_API, FbApiClass)) |
|
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
47 | #define FB_IS_API(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), FB_TYPE_API)) |
|
37250
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)) |
|
37359
79374d83fae5
facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents:
37357
diff
changeset
|
49 | #define FB_API_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), FB_TYPE_API, FbApiClass)) |
|
37250
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 | /** |
|
37370
2d832af0f400
facebook: fetch URLs for all messages attachments
James Geboski <jgeboski@gmail.com>
parents:
37369
diff
changeset
|
94 | * FB_API_URL_ATTACH: |
|
2d832af0f400
facebook: fetch URLs for all messages attachments
James Geboski <jgeboski@gmail.com>
parents:
37369
diff
changeset
|
95 | * |
|
2d832af0f400
facebook: fetch URLs for all messages attachments
James Geboski <jgeboski@gmail.com>
parents:
37369
diff
changeset
|
96 | * The URL for attachment URL requests. |
|
2d832af0f400
facebook: fetch URLs for all messages attachments
James Geboski <jgeboski@gmail.com>
parents:
37369
diff
changeset
|
97 | */ |
|
2d832af0f400
facebook: fetch URLs for all messages attachments
James Geboski <jgeboski@gmail.com>
parents:
37369
diff
changeset
|
98 | #define FB_API_URL_ATTACH FB_API_AHOST "/method/messaging.getAttachment" |
|
2d832af0f400
facebook: fetch URLs for all messages attachments
James Geboski <jgeboski@gmail.com>
parents:
37369
diff
changeset
|
99 | //#define FB_API_URL_ATTACH FB_API_AHOST "/method/messaging.attachmentRedirect" |
|
2d832af0f400
facebook: fetch URLs for all messages attachments
James Geboski <jgeboski@gmail.com>
parents:
37369
diff
changeset
|
100 | |
|
2d832af0f400
facebook: fetch URLs for all messages attachments
James Geboski <jgeboski@gmail.com>
parents:
37369
diff
changeset
|
101 | /** |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
102 | * FB_API_URL_AUTH: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
103 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
104 | * The URL for authentication requests. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
105 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
106 | #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
|
107 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
108 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
109 | * FB_API_URL_GQL: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
110 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
111 | * The URL for GraphQL requests. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
112 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
113 | #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
|
114 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
115 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
116 | * FB_API_URL_MESSAGES: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
117 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
118 | * The URL for linking message threads. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
119 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
120 | #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
|
121 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
122 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
123 | * FB_API_URL_PARTS: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
124 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
125 | * The URL for participant management requests. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
126 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
127 | #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
|
128 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
129 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
130 | * FB_API_URL_THREADS: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
131 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
132 | * The URL for thread management requests. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
133 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
134 | #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
|
135 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
136 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
137 | * FB_API_URL_TOPIC: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
138 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
139 | * The URL for thread topic requests. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
140 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
141 | #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
|
142 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
143 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
144 | * FB_API_QUERY_CONTACT: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
145 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
146 | * The query hash for the `FetchContactQuery`. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
147 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
148 | #define FB_API_QUERY_CONTACT 10153746900701729 |
|
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 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
151 | * FB_API_QUERY_CONTACTS: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
152 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
153 | * The query hash for the `FetchContactsFullQuery`. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
154 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
155 | #define FB_API_QUERY_CONTACTS 10153856456271729 |
|
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 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
158 | * FB_API_QUERY_CONTACTS_AFTER: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
159 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
160 | * The query hash for the `FetchContactsFullWithAfterQuery`. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
161 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
162 | #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
|
163 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
164 | /** |
|
37369
ebcd09a1a124
facebook: display stickers in-line
James Geboski <jgeboski@gmail.com>
parents:
37365
diff
changeset
|
165 | * FB_API_QUERY_STICKER: |
|
ebcd09a1a124
facebook: display stickers in-line
James Geboski <jgeboski@gmail.com>
parents:
37365
diff
changeset
|
166 | * |
|
ebcd09a1a124
facebook: display stickers in-line
James Geboski <jgeboski@gmail.com>
parents:
37365
diff
changeset
|
167 | * The query hash for the `FetchStickersWithPreviewsQuery`. |
|
ebcd09a1a124
facebook: display stickers in-line
James Geboski <jgeboski@gmail.com>
parents:
37365
diff
changeset
|
168 | */ |
|
ebcd09a1a124
facebook: display stickers in-line
James Geboski <jgeboski@gmail.com>
parents:
37365
diff
changeset
|
169 | #define FB_API_QUERY_STICKER 10152877994321729 |
|
ebcd09a1a124
facebook: display stickers in-line
James Geboski <jgeboski@gmail.com>
parents:
37365
diff
changeset
|
170 | |
|
ebcd09a1a124
facebook: display stickers in-line
James Geboski <jgeboski@gmail.com>
parents:
37365
diff
changeset
|
171 | /** |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
172 | * FB_API_QUERY_THREAD: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
173 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
174 | * The query hash for the `ThreadQuery`. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
175 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
176 | #define FB_API_QUERY_THREAD 10153919752036729 |
|
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 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
179 | * FB_API_QUERY_THREADS: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
180 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
181 | * The query hash for the `ThreadListQuery`. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
182 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
183 | #define FB_API_QUERY_THREADS 10153919752026729 |
|
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 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
186 | * FB_API_QUERY_XMA: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
187 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
188 | * The query hash for the `XMAQuery`. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
189 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
190 | #define FB_API_QUERY_XMA 10153919431161729 |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
191 | |
|
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 | * FB_API_CONTACTS_COUNT: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
194 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
195 | * 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
|
196 | * 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
|
197 | * request data being too large. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
198 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
199 | #define FB_API_CONTACTS_COUNT 500 |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
200 | |
|
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 | * FB_API_MSGID: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
203 | * @m: The time in milliseconds. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
204 | * @i: The random integer. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
205 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
206 | * 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
|
207 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
208 | * Returns: The message identifier. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
209 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
210 | #define FB_API_MSGID(m, i) ((guint64) ( \ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
211 | (((guint32) i) & 0x3FFFFF) | \ |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
212 | (((guint64) m) << 22) \ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
213 | )) |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
214 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
215 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
216 | * FB_API_ERROR_EMIT: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
217 | * @a: The #FbApi. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
218 | * @e: The #FbApiError. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
219 | * @c: The code to execute. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
220 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
221 | * 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
|
222 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
223 | #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
|
224 | G_STMT_START { \ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
225 | if (G_UNLIKELY((e) != NULL)) { \ |
|
37316
9e3520d6ec49
facebook: refactored and improved JSON error handling
James Geboski <jgeboski@gmail.com>
parents:
37315
diff
changeset
|
226 | 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
|
227 | {c;} \ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
228 | } \ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
229 | } G_STMT_END |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
230 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
231 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
232 | * FB_API_ERROR: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
233 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
234 | * The #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
|
235 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
236 | #define FB_API_ERROR fb_api_error_quark() |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
237 | |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
238 | typedef struct _FbApi FbApi; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
239 | typedef struct _FbApiClass FbApiClass; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
240 | typedef struct _FbApiPrivate FbApiPrivate; |
|
37337
aecff282de76
facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents:
37332
diff
changeset
|
241 | typedef struct _FbApiEvent FbApiEvent; |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
242 | typedef struct _FbApiMessage FbApiMessage; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
243 | typedef struct _FbApiPresence FbApiPresence; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
244 | typedef struct _FbApiThread FbApiThread; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
245 | typedef struct _FbApiTyping FbApiTyping; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
246 | typedef struct _FbApiUser FbApiUser; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
247 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
248 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
249 | * FbApiError: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
250 | * @FB_API_ERROR_GENERAL: General failure. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
251 | * @FB_API_ERROR_AUTH: Authentication failure. |
|
37377
c92bc4233941
facebook: fixed improper handling of queue errors
James Geboski <jgeboski@gmail.com>
parents:
37370
diff
changeset
|
252 | * @FB_API_ERROR_QUEUE: Queue failure. |
|
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 | * 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
|
255 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
256 | typedef enum |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
257 | { |
|
37306
7c454f51b56b
facebook: handle authentication errors
James Geboski <jgeboski@gmail.com>
parents:
37304
diff
changeset
|
258 | FB_API_ERROR_GENERAL, |
|
37377
c92bc4233941
facebook: fixed improper handling of queue errors
James Geboski <jgeboski@gmail.com>
parents:
37370
diff
changeset
|
259 | FB_API_ERROR_AUTH, |
|
c92bc4233941
facebook: fixed improper handling of queue errors
James Geboski <jgeboski@gmail.com>
parents:
37370
diff
changeset
|
260 | FB_API_ERROR_QUEUE |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
261 | } FbApiError; |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
262 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
263 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
264 | * FbApiEventType: |
|
37380
06ad6f6aa43a
facebook: implemented group chat topic change events
James Geboski <jgeboski@gmail.com>
parents:
37377
diff
changeset
|
265 | * @FB_API_EVENT_TYPE_THREAD_TOPIC: The thread topic was changed. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
266 | * @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
|
267 | * @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
|
268 | * |
|
37361
6545b86a0705
facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
269 | * The #FbApiEvent types. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
270 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
271 | typedef enum |
|
37337
aecff282de76
facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents:
37332
diff
changeset
|
272 | { |
|
37380
06ad6f6aa43a
facebook: implemented group chat topic change events
James Geboski <jgeboski@gmail.com>
parents:
37377
diff
changeset
|
273 | FB_API_EVENT_TYPE_THREAD_TOPIC, |
|
37337
aecff282de76
facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents:
37332
diff
changeset
|
274 | FB_API_EVENT_TYPE_THREAD_USER_ADDED, |
|
aecff282de76
facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents:
37332
diff
changeset
|
275 | 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
|
276 | } FbApiEventType; |
|
37337
aecff282de76
facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents:
37332
diff
changeset
|
277 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
278 | /** |
|
37361
6545b86a0705
facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
279 | * FbApiMessageFlags: |
|
37364
d8e50d403e82
facebook: display images in-line
James Geboski <jgeboski@gmail.com>
parents:
37361
diff
changeset
|
280 | * @FB_API_MESSAGE_FLAG_DONE: The text has been processed. |
|
d8e50d403e82
facebook: display images in-line
James Geboski <jgeboski@gmail.com>
parents:
37361
diff
changeset
|
281 | * @FB_API_MESSAGE_FLAG_IMAGE: The text is a URL to an image. |
|
37361
6545b86a0705
facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
282 | * @FB_API_MESSAGE_FLAG_SELF: The text is from the #FbApi user. |
|
6545b86a0705
facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
283 | * |
|
6545b86a0705
facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
284 | * The #FbApiMessage flags. |
|
6545b86a0705
facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
285 | */ |
|
6545b86a0705
facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
286 | typedef enum |
|
6545b86a0705
facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
287 | { |
|
37364
d8e50d403e82
facebook: display images in-line
James Geboski <jgeboski@gmail.com>
parents:
37361
diff
changeset
|
288 | FB_API_MESSAGE_FLAG_DONE = 1 << 0, |
|
d8e50d403e82
facebook: display images in-line
James Geboski <jgeboski@gmail.com>
parents:
37361
diff
changeset
|
289 | FB_API_MESSAGE_FLAG_IMAGE = 1 << 1, |
|
d8e50d403e82
facebook: display images in-line
James Geboski <jgeboski@gmail.com>
parents:
37361
diff
changeset
|
290 | FB_API_MESSAGE_FLAG_SELF = 1 << 2 |
|
37361
6545b86a0705
facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
291 | } FbApiMessageFlags; |
|
6545b86a0705
facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
292 | |
|
6545b86a0705
facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
293 | /** |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
294 | * FbApi: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
295 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
296 | * Represents a Facebook Messenger connection. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
297 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
298 | struct _FbApi |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
299 | { |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
300 | /*< private >*/ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
301 | GObject parent; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
302 | FbApiPrivate *priv; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
303 | }; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
304 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
305 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
306 | * FbApiClass: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
307 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
308 | * The base class for all #FbApi's. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
309 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
310 | struct _FbApiClass |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
311 | { |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
312 | /*< private >*/ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
313 | GObjectClass parent_class; |
|
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 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
316 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
317 | * FbApiEvent: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
318 | * @type: The #FbApiEventType. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
319 | * @uid: The user #FbId. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
320 | * @tid: The thread #FbId. |
|
37380
06ad6f6aa43a
facebook: implemented group chat topic change events
James Geboski <jgeboski@gmail.com>
parents:
37377
diff
changeset
|
321 | * @text: The event text. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
322 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
323 | * Represents a Facebook update event. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
324 | */ |
|
37337
aecff282de76
facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents:
37332
diff
changeset
|
325 | struct _FbApiEvent |
|
aecff282de76
facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents:
37332
diff
changeset
|
326 | { |
|
aecff282de76
facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents:
37332
diff
changeset
|
327 | FbApiEventType type; |
|
aecff282de76
facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents:
37332
diff
changeset
|
328 | FbId uid; |
|
aecff282de76
facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents:
37332
diff
changeset
|
329 | FbId tid; |
|
37380
06ad6f6aa43a
facebook: implemented group chat topic change events
James Geboski <jgeboski@gmail.com>
parents:
37377
diff
changeset
|
330 | gchar *text; |
|
37337
aecff282de76
facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents:
37332
diff
changeset
|
331 | }; |
|
aecff282de76
facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents:
37332
diff
changeset
|
332 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
333 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
334 | * FbApiMessage: |
|
37361
6545b86a0705
facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
335 | * @flags: The #FbApiMessageFlags. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
336 | * @uid: The user #FbId. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
337 | * @tid: The thread #FbId. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
338 | * @text: The message text. |
|
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 user message. |
|
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 _FbApiMessage |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
343 | { |
|
37361
6545b86a0705
facebook: refactored for future inline images
James Geboski <jgeboski@gmail.com>
parents:
37359
diff
changeset
|
344 | FbApiMessageFlags flags; |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
345 | FbId uid; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
346 | FbId tid; |
|
37269
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
347 | gchar *text; |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
348 | }; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
349 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
350 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
351 | * FbApiPresence: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
352 | * @uid: The user #FbId. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
353 | * @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
|
354 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
355 | * Represents a Facebook presence message. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
356 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
357 | struct _FbApiPresence |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
358 | { |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
359 | FbId uid; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
360 | gboolean active; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
361 | }; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
362 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
363 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
364 | * FbApiThread: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
365 | * @tid: The thread #FbId. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
366 | * @topic: The topic. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
367 | * @users: The #GSList of #FbApiUser's. |
|
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 message thread. |
|
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 _FbApiThread |
|
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 tid; |
|
37269
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
374 | gchar *topic; |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
375 | GSList *users; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
376 | }; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
377 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
378 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
379 | * FbApiTyping: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
380 | * @uid: The user #FbId. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
381 | * @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
|
382 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
383 | * Represents a Facebook typing message. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
384 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
385 | struct _FbApiTyping |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
386 | { |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
387 | FbId uid; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
388 | gboolean state; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
389 | }; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
390 | |
|
37347
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 | * FbApiUser: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
393 | * @uid: The user #FbId. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
394 | * @name: The name of the user. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
395 | * @icon: The icon URL. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
396 | * @csum: The checksum of @icon. |
|
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 | * Represents a Facebook user. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
399 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
400 | struct _FbApiUser |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
401 | { |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
402 | FbId uid; |
|
37269
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
403 | gchar *name; |
|
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
404 | gchar *icon; |
|
37257
5ba291680ac4
facebook: compare checksums before fetching icons
James Geboski <jgeboski@gmail.com>
parents:
37255
diff
changeset
|
405 | gchar *csum; |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
406 | }; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
407 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
408 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
409 | * fb_api_get_type: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
410 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
411 | * Returns: The #GType for an #FbApi. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
412 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
413 | GType |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
414 | fb_api_get_type(void); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
415 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
416 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
417 | * fb_api_error_quark: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
418 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
419 | * 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
|
420 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
421 | * Returns: The #GQuark of the domain. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
422 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
423 | GQuark |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
424 | fb_api_error_quark(void); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
425 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
426 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
427 | * fb_api_new: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
428 | * @gc: The #PurpleConnection. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
429 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
430 | * 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
|
431 | * #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
|
432 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
433 | * Returns: The new #FbApi. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
434 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
435 | FbApi * |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
436 | fb_api_new(PurpleConnection *gc); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
437 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
438 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
439 | * fb_api_rehash: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
440 | * @api: The #FbApi. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
441 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
442 | * 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
|
443 | * called whenever properties are modified. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
444 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
445 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
446 | fb_api_rehash(FbApi *api); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
447 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
448 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
449 | * fb_api_is_invisible: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
450 | * @api: The #FbApi. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
451 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
452 | * 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
|
453 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
454 | * 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
|
455 | */ |
|
37328
4c091ac7c55a
facebook: implemented the invisible presence state
James Geboski <jgeboski@gmail.com>
parents:
37326
diff
changeset
|
456 | gboolean |
|
4c091ac7c55a
facebook: implemented the invisible presence state
James Geboski <jgeboski@gmail.com>
parents:
37326
diff
changeset
|
457 | fb_api_is_invisible(FbApi *api); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
458 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
459 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
460 | * fb_api_error: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
461 | * @api: The #FbApi. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
462 | * @error: The #FbApiError. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
463 | * @format: The format string literal. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
464 | * @...: The arguments for @format. |
|
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 | * Emits an #FbApiError. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
467 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
468 | void |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
469 | 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
|
470 | G_GNUC_PRINTF(3, 4); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
471 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
472 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
473 | * fb_api_error_emit: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
474 | * @api: The #FbApi. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
475 | * @error: The #GError. |
|
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 | * Emits a #GError on an #FbApiError. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
478 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
479 | void |
|
37316
9e3520d6ec49
facebook: refactored and improved JSON error handling
James Geboski <jgeboski@gmail.com>
parents:
37315
diff
changeset
|
480 | 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
|
481 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
482 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
483 | * fb_api_auth: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
484 | * @api: The #FbApi. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
485 | * @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
|
486 | * @pass: The Facebook password. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
487 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
488 | * 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
|
489 | * 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
|
490 | */ |
|
37316
9e3520d6ec49
facebook: refactored and improved JSON error handling
James Geboski <jgeboski@gmail.com>
parents:
37315
diff
changeset
|
491 | void |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
492 | 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
|
493 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
494 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
495 | * fb_api_contact: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
496 | * @api: The #FbApi. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
497 | * @uid: The user #FbId. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
498 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
499 | * 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
|
500 | * a single contact. |
|
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 |
|
37338
e4d77bc25235
facebook: add and alias non-friend buddies
James Geboski <jgeboski@gmail.com>
parents:
37337
diff
changeset
|
503 | fb_api_contact(FbApi *api, FbId uid); |
|
e4d77bc25235
facebook: add and alias non-friend buddies
James Geboski <jgeboski@gmail.com>
parents:
37337
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_contacts: |
|
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 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
509 | * 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
|
510 | * 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
|
511 | */ |
|
37338
e4d77bc25235
facebook: add and alias non-friend buddies
James Geboski <jgeboski@gmail.com>
parents:
37337
diff
changeset
|
512 | void |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
513 | fb_api_contacts(FbApi *api); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
514 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
515 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
516 | * fb_api_connect: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
517 | * @api: The #FbApi. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
518 | * @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
|
519 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
520 | * 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
|
521 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
522 | void |
|
37328
4c091ac7c55a
facebook: implemented the invisible presence state
James Geboski <jgeboski@gmail.com>
parents:
37326
diff
changeset
|
523 | fb_api_connect(FbApi *api, gboolean invisible); |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
524 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
525 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
526 | * fb_api_disconnect: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
527 | * @api: The #FbApi. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
528 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
529 | * Closes the underlying MQTT connection. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
530 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
531 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
532 | fb_api_disconnect(FbApi *api); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
533 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
534 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
535 | * fb_api_message: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
536 | * @api: The #FbApi. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
537 | * @id: The user or thread #FbId. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
538 | * @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
|
539 | * @text: The message text. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
540 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
541 | * 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
|
542 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
543 | void |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
544 | 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
|
545 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
546 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
547 | * fb_api_publish: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
548 | * @api: The #FbApi. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
549 | * @topic: The topic. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
550 | * @format: The format string literal. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
551 | * @...: The arguments for @format. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
552 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
553 | * Publishes an MQTT message. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
554 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
555 | void |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
556 | 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
|
557 | G_GNUC_PRINTF(3, 4); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
558 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
559 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
560 | * fb_api_read: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
561 | * @api: The #FbApi. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
562 | * @id: The user or thread #FbId. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
563 | * @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
|
564 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
565 | * Marks a message thread as read. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
566 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
567 | void |
|
37304
168a859417f6
facebook: implemented marking threads as read
James Geboski <jgeboski@gmail.com>
parents:
37299
diff
changeset
|
568 | 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
|
569 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
570 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
571 | * fb_api_unread: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
572 | * @api: The #FbApi. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
573 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
574 | * Sends an unread message request. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
575 | */ |
|
37304
168a859417f6
facebook: implemented marking threads as read
James Geboski <jgeboski@gmail.com>
parents:
37299
diff
changeset
|
576 | void |
|
37326
c768f27357ec
facebook: implemented the retrieval of unread messages
James Geboski <jgeboski@gmail.com>
parents:
37325
diff
changeset
|
577 | fb_api_unread(FbApi *api); |
|
c768f27357ec
facebook: implemented the retrieval of unread messages
James Geboski <jgeboski@gmail.com>
parents:
37325
diff
changeset
|
578 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
579 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
580 | * fb_api_thread: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
581 | * @api: The #FbApi. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
582 | * @tid: The thread #FbId. |
|
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 | * 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
|
585 | * a single thread. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
586 | */ |
|
37326
c768f27357ec
facebook: implemented the retrieval of unread messages
James Geboski <jgeboski@gmail.com>
parents:
37325
diff
changeset
|
587 | void |
|
37332
c4f2fd45ffba
facebook: refactored internal API naming
James Geboski <jgeboski@gmail.com>
parents:
37330
diff
changeset
|
588 | fb_api_thread(FbApi *api, FbId tid); |
|
c4f2fd45ffba
facebook: refactored internal API naming
James Geboski <jgeboski@gmail.com>
parents:
37330
diff
changeset
|
589 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
590 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
591 | * fb_api_thread_create: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
592 | * @api: The #FbApi. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
593 | * @uids: The #GSList of #FbId's. |
|
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 | * 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
|
596 | * 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
|
597 | */ |
|
37332
c4f2fd45ffba
facebook: refactored internal API naming
James Geboski <jgeboski@gmail.com>
parents:
37330
diff
changeset
|
598 | void |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
599 | fb_api_thread_create(FbApi *api, GSList *uids); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
600 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
601 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
602 | * fb_api_thread_invite: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
603 | * @api: The #FbApi. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
604 | * @tid: The thread #FbId. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
605 | * @uid: The user #FbId. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
606 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
607 | * Sends a thread user invitation request. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
608 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
609 | void |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
610 | 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
|
611 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
612 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
613 | * fb_api_thread_remove: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
614 | * @api: The #FbApi. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
615 | * @tid: The thread #FbId. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
616 | * @uid: The user #FbId. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
617 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
618 | * Sends a thread user removal request. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
619 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
620 | void |
|
37284
53cb588d8760
facebook: implemented kicking/leaving group chats
James Geboski <jgeboski@gmail.com>
parents:
37269
diff
changeset
|
621 | 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
|
622 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
623 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
624 | * fb_api_thread_topic: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
625 | * @api: The #FbApi. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
626 | * @tid: The thread #FbId. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
627 | * @topic: The topic. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
628 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
629 | * Sends a thread topic change request. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
630 | */ |
|
37284
53cb588d8760
facebook: implemented kicking/leaving group chats
James Geboski <jgeboski@gmail.com>
parents:
37269
diff
changeset
|
631 | void |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
632 | 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
|
633 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
634 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
635 | * fb_api_threads: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
636 | * @api: The #FbApi. |
|
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 | * 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
|
639 | * 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
|
640 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
641 | void |
|
37332
c4f2fd45ffba
facebook: refactored internal API naming
James Geboski <jgeboski@gmail.com>
parents:
37330
diff
changeset
|
642 | fb_api_threads(FbApi *api); |
|
c4f2fd45ffba
facebook: refactored internal API naming
James Geboski <jgeboski@gmail.com>
parents:
37330
diff
changeset
|
643 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
644 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
645 | * fb_api_typing: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
646 | * @api: The #FbApi. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
647 | * @uid: The user #FbId. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
648 | * @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
|
649 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
650 | * 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
|
651 | */ |
|
37332
c4f2fd45ffba
facebook: refactored internal API naming
James Geboski <jgeboski@gmail.com>
parents:
37330
diff
changeset
|
652 | void |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
653 | fb_api_typing(FbApi *api, FbId uid, gboolean state); |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
654 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
655 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
656 | * fb_api_event_dup: |
|
37365
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
657 | * @event: The #FbApiEvent or #NULL. |
|
37380
06ad6f6aa43a
facebook: implemented group chat topic change events
James Geboski <jgeboski@gmail.com>
parents:
37377
diff
changeset
|
658 | * @deep: #TRUE to duplicate allocated data, otherwise #FALSE. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
659 | * |
|
37365
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
660 | * Duplicates an #FbApiEvent. If @event is #NULL, a new zero filled |
|
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
661 | * #FbApiEvent is returned. The returned #FbApiEvent should be freed |
|
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
662 | * with #fb_api_event_free() when no longer needed. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
663 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
664 | * Returns: The new #FbApiEvent. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
665 | */ |
|
37337
aecff282de76
facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents:
37332
diff
changeset
|
666 | FbApiEvent * |
|
37380
06ad6f6aa43a
facebook: implemented group chat topic change events
James Geboski <jgeboski@gmail.com>
parents:
37377
diff
changeset
|
667 | fb_api_event_dup(const FbApiEvent *event, gboolean deep); |
|
37337
aecff282de76
facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents:
37332
diff
changeset
|
668 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
669 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
670 | * fb_api_event_reset: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
671 | * @event: The #FbApiEvent. |
|
37380
06ad6f6aa43a
facebook: implemented group chat topic change events
James Geboski <jgeboski@gmail.com>
parents:
37377
diff
changeset
|
672 | * @deep: #TRUE to free allocated data, otherwise #FALSE. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
673 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
674 | * Resets an #FbApiEvent. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
675 | */ |
|
37337
aecff282de76
facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents:
37332
diff
changeset
|
676 | void |
|
37380
06ad6f6aa43a
facebook: implemented group chat topic change events
James Geboski <jgeboski@gmail.com>
parents:
37377
diff
changeset
|
677 | fb_api_event_reset(FbApiEvent *event, gboolean deep); |
|
37337
aecff282de76
facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents:
37332
diff
changeset
|
678 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
679 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
680 | * fb_api_event_free: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
681 | * @event: The #FbApiEvent. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
682 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
683 | * 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
|
684 | */ |
|
37337
aecff282de76
facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents:
37332
diff
changeset
|
685 | void |
|
aecff282de76
facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents:
37332
diff
changeset
|
686 | fb_api_event_free(FbApiEvent *event); |
|
aecff282de76
facebook: handle group chat events
James Geboski <jgeboski@gmail.com>
parents:
37332
diff
changeset
|
687 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
688 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
689 | * fb_api_message_dup: |
|
37365
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
690 | * @msg: The #FbApiMessage or #NULL. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
691 | * @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
|
692 | * |
|
37365
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
693 | * Duplicates an #FbApiMessage. If @msg is #NULL, a new zero filled |
|
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
694 | * #FbApiMessage is returned. The returned #FbApiMessage should be |
|
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
695 | * freed with #fb_api_message_free() when no longer needed. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
696 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
697 | * Returns: The new #FbApiMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
698 | */ |
|
37269
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
699 | FbApiMessage * |
|
37365
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
700 | fb_api_message_dup(const FbApiMessage *msg, gboolean deep); |
|
37269
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
701 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
702 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
703 | * fb_api_message_reset: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
704 | * @msg: The #FbApiMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
705 | * @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
|
706 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
707 | * Resets an #FbApiMessage. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
708 | */ |
|
37269
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
709 | void |
|
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
710 | 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
|
711 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
712 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
713 | * fb_api_message_free: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
714 | * @msg: The #FbApiMessage. |
|
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 | * 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
|
717 | */ |
|
37269
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
718 | void |
|
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
719 | 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
|
720 | |
|
37347
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 | * fb_api_presence_dup: |
|
37365
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
723 | * @pres: The #FbApiPresence or #NULL. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
724 | * |
|
37365
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
725 | * Duplicates an #FbApiPresence. If @pres is #NULL, a new zero filled |
|
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
726 | * #FbApiPresence is returned. The returned #FbApiPresence should be |
|
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
727 | * freed with #fb_api_presence_free() when no longer needed. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
728 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
729 | * Returns: The new #FbApiPresence. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
730 | */ |
|
37269
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
731 | FbApiPresence * |
|
37365
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
732 | fb_api_presence_dup(const FbApiPresence *pres); |
|
37269
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
733 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
734 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
735 | * fb_api_presence_reset: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
736 | * @pres: The #FbApiPresence. |
|
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 | * Resets an #FbApiPresence. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
739 | */ |
|
37269
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
740 | void |
|
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
741 | 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
|
742 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
743 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
744 | * fb_api_presence_free: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
745 | * @pres: The #FbApiPresence. |
|
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 | * 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
|
748 | */ |
|
37269
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
749 | void |
|
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
750 | 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
|
751 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
752 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
753 | * fb_api_thread_dup: |
|
37365
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
754 | * @thrd: The #FbApiThread or #NULL. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
755 | * @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
|
756 | * |
|
37365
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
757 | * Duplicates an #FbApiThread. If @thrd is #NULL, a new zero filled |
|
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
758 | * #FbApiThread is returned. The returned #FbApiThread should be freed |
|
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
759 | * with #fb_api_thread_free() when no longer needed. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
760 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
761 | * Returns: The new #FbApiThread. |
|
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 | FbApiThread * |
|
37365
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
764 | fb_api_thread_dup(const FbApiThread *thrd, gboolean deep); |
|
37269
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_thread_reset: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
768 | * @thrd: The #FbApiThread. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
769 | * @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
|
770 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
771 | * Resets an #FbApiThread. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
772 | */ |
|
37269
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
773 | void |
|
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
774 | 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
|
775 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
776 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
777 | * fb_api_thread_free: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
778 | * @thrd: The #FbApiThread. |
|
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 | * 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
|
781 | */ |
|
37269
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
782 | void |
|
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
783 | 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
|
784 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
785 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
786 | * fb_api_typing_dup: |
|
37365
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
787 | * @typg: The #FbApiTyping or #NULL. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
788 | * |
|
37365
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
789 | * Duplicates an #FbApiTyping. If @typg is #NULL, a new zero filled |
|
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
790 | * #FbApiTyping is returned. The returned #FbApiTyping should be freed |
|
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
791 | * with #fb_api_typing_free() when no longer needed. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
792 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
793 | * Returns: The new #FbApiTyping. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
794 | */ |
|
37269
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
795 | FbApiTyping * |
|
37365
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
796 | fb_api_typing_dup(const FbApiTyping *typg); |
|
37269
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
797 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
798 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
799 | * fb_api_typing_reset: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
800 | * @typg: The #FbApiTyping. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
801 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
802 | * Resets an #FbApiTyping. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
803 | */ |
|
37269
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
804 | void |
|
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
805 | 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
|
806 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
807 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
808 | * fb_api_typing_free: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
809 | * @typg: The #FbApiTyping. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
810 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
811 | * 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
|
812 | */ |
|
37269
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
813 | void |
|
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
814 | 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
|
815 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
816 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
817 | * fb_api_user_dup: |
|
37365
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
818 | * @user: The #FbApiUser or #NULL. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
819 | * @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
|
820 | * |
|
37365
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
821 | * Duplicates an #FbApiUser. If @user is #NULL, a new zero filled |
|
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
822 | * #FbApiUser is returned. The returned #FbApiUser should be freed with |
|
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
823 | * #fb_api_user_free() when no longer needed. |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
824 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
825 | * Returns: The new #FbApiUser. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
826 | */ |
|
37269
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
827 | FbApiUser * |
|
37365
b70cc4d02d68
facebook: refactored data structure usage
James Geboski <jgeboski@gmail.com>
parents:
37364
diff
changeset
|
828 | fb_api_user_dup(const FbApiUser *user, gboolean deep); |
|
37269
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
829 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
830 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
831 | * fb_api_user_reset: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
832 | * @user: The #FbApiUser. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
833 | * @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
|
834 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
835 | * Resets an #FbApiUser. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
836 | */ |
|
37269
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
837 | void |
|
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
838 | 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
|
839 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
840 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
841 | * fb_api_user_free: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
842 | * @user: The #FbApiUser. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
843 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37342
diff
changeset
|
844 | * 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
|
845 | */ |
|
37269
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
846 | void |
|
129e87951cd6
facebook: fixed JSON parsing for older json-glib versions
James Geboski <jgeboski@gmail.com>
parents:
37265
diff
changeset
|
847 | 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
|
848 | |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
849 | #endif /* _FACEBOOK_API_H_ */ |