libpurple/protocols/facebook/util.h

Sun, 13 Mar 2022 22:06:00 -0500

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Sun, 13 Mar 2022 22:06:00 -0500
changeset 41294
3f0b065e58f7
parent 41293
bfd8314a1a74
child 41296
05fa2feb07f4
permissions
-rw-r--r--

Add missing element-type annotation in Facebook

37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
1 /* purple
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
2 *
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
3 * Purple is the legal property of its developers, whose names are too numerous
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
4 * to list here. Please refer to the COPYRIGHT file distributed with this
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
5 * source distribution.
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
6 *
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
10 * (at your option) any later version.
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
11 *
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
15 * GNU General Public License for more details.
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
16 *
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
20 */
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
21
39819
3554dac2991b Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 37471
diff changeset
22 #ifndef PURPLE_FACEBOOK_UTIL_H
3554dac2991b Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 37471
diff changeset
23 #define PURPLE_FACEBOOK_UTIL_H
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
24
37309
556eea7a45da facebook: merged local glibcompat.h into libpurple's
James Geboski <jgeboski@gmail.com>
parents: 37289
diff changeset
25 #include <glib.h>
556eea7a45da facebook: merged local glibcompat.h into libpurple's
James Geboski <jgeboski@gmail.com>
parents: 37289
diff changeset
26
40358
e6fe6fc1f516 move all protocols, purple plugins, and purple tests to use purple.h instead of including files individually
Gary Kramlich <grim@reaperworld.com>
parents: 39819
diff changeset
27 #include <purple.h>
37258
291b6e1acc24 facebook: implemented group chat support
James Geboski <jgeboski@gmail.com>
parents: 37250
diff changeset
28
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
29 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
30 * FB_UTIL_DEBUG_INFO:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
31 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
32 * Shortcut #PurpleDebugLevel for unsafe and verbose info messages.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
33 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
34 #define FB_UTIL_DEBUG_INFO ( \
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
35 PURPLE_DEBUG_INFO | \
37278
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
36 FB_UTIL_DEBUG_FLAG_UNSAFE | \
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
37 FB_UTIL_DEBUG_FLAG_VERBOSE \
37278
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
38 )
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
39
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
40 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
41 * FB_UTIL_ERROR:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
42 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
43 * The #GQuark of the domain of utility errors.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
44 */
37471
32c1e77d0474 facebook: coding style consistencies
James Geboski <jgeboski@gmail.com>
parents: 37416
diff changeset
45 #define FB_UTIL_ERROR fb_util_error_quark()
37284
53cb588d8760 facebook: implemented kicking/leaving group chats
James Geboski <jgeboski@gmail.com>
parents: 37278
diff changeset
46
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
47 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
48 * FbUtilRequestBuddyFunc:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
49 * @buddies: The list of #PurpleBuddy's.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
50 * @data: The user-defined data.
37358
fbb9041f0c01 facebook: added missing GTK-Doc description
James Geboski <jgeboski@gmail.com>
parents: 37347
diff changeset
51 *
fbb9041f0c01 facebook: added missing GTK-Doc description
James Geboski <jgeboski@gmail.com>
parents: 37347
diff changeset
52 * The callback for requested buddies.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
53 */
37258
291b6e1acc24 facebook: implemented group chat support
James Geboski <jgeboski@gmail.com>
parents: 37250
diff changeset
54 typedef void (*FbUtilRequestBuddyFunc) (GSList *buddies, gpointer data);
291b6e1acc24 facebook: implemented group chat support
James Geboski <jgeboski@gmail.com>
parents: 37250
diff changeset
55
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
56 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
57 * FbUtilDebugFlags:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
58 * @FB_UTIL_DEBUG_FLAG_UNSAFE: The message is unsafe.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
59 * @FB_UTIL_DEBUG_FLAG_VERBOSE: The message is verbose.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
60 * @FB_UTIL_DEBUG_FLAG_ALL: All of the flags.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
61 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
62 * The debugging message flags. These flags are inserted on top of
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
63 * a #PurpleDebugLevel.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
64 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
65 typedef enum
37278
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
66 {
37359
79374d83fae5 facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents: 37358
diff changeset
67 FB_UTIL_DEBUG_FLAG_UNSAFE = 1 << 25,
37289
fb6acaae2788 facebook: fixed broken logging from invalid level
James Geboski <jgeboski@gmail.com>
parents: 37284
diff changeset
68 FB_UTIL_DEBUG_FLAG_VERBOSE = 1 << 26,
37359
79374d83fae5 facebook: removed alignment whitespace
James Geboski <jgeboski@gmail.com>
parents: 37358
diff changeset
69 FB_UTIL_DEBUG_FLAG_ALL = 3 << 25
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
70 } FbUtilDebugFlags;
37278
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
71
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
72 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
73 * FbUtilError:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
74 * @FB_UTIL_ERROR_GENERAL: General failure.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
75 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
76 * The error codes for the #FB_UTIL_ERROR domain.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
77 */
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
78 typedef enum
37284
53cb588d8760 facebook: implemented kicking/leaving group chats
James Geboski <jgeboski@gmail.com>
parents: 37278
diff changeset
79 {
53cb588d8760 facebook: implemented kicking/leaving group chats
James Geboski <jgeboski@gmail.com>
parents: 37278
diff changeset
80 FB_UTIL_ERROR_GENERAL
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
81 } FbUtilError;
37284
53cb588d8760 facebook: implemented kicking/leaving group chats
James Geboski <jgeboski@gmail.com>
parents: 37278
diff changeset
82
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
83 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
84 * fb_util_error_quark:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
85 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
86 * Gets the #GQuark of the domain of utility errors.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
87 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
88 * Returns: The #GQuark of the domain.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
89 */
37284
53cb588d8760 facebook: implemented kicking/leaving group chats
James Geboski <jgeboski@gmail.com>
parents: 37278
diff changeset
90 GQuark
53cb588d8760 facebook: implemented kicking/leaving group chats
James Geboski <jgeboski@gmail.com>
parents: 37278
diff changeset
91 fb_util_error_quark(void);
53cb588d8760 facebook: implemented kicking/leaving group chats
James Geboski <jgeboski@gmail.com>
parents: 37278
diff changeset
92
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
93 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
94 * fb_util_account_find_buddy:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
95 * @acct: The #PurpleAccount.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
96 * @chat: The #PurpleChatConversation.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
97 * @name: The name of the buddy.
37415
a06ade737f26 facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37414
diff changeset
98 * @error: The return location for the #GError or #NULL.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
99 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
100 * Finds a buddy by their name or alias.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
101 *
41293
bfd8314a1a74 Add missing return transfer annotation in Facebook
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41122
diff changeset
102 * Returns: (transfer none): The #PurpleBuddy if found, otherwise #NULL.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
103 */
37284
53cb588d8760 facebook: implemented kicking/leaving group chats
James Geboski <jgeboski@gmail.com>
parents: 37278
diff changeset
104 PurpleBuddy *
53cb588d8760 facebook: implemented kicking/leaving group chats
James Geboski <jgeboski@gmail.com>
parents: 37278
diff changeset
105 fb_util_account_find_buddy(PurpleAccount *acct, PurpleChatConversation *chat,
53cb588d8760 facebook: implemented kicking/leaving group chats
James Geboski <jgeboski@gmail.com>
parents: 37278
diff changeset
106 const gchar *name, GError **error);
53cb588d8760 facebook: implemented kicking/leaving group chats
James Geboski <jgeboski@gmail.com>
parents: 37278
diff changeset
107
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
108 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
109 * fb_util_debug:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
110 * @level: The #PurpleDebugLevel.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
111 * @format: The format string literal.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
112 * @...: The arguments for @format.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
113 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
114 * Logs a debugging message. If the messages is unsafe or verbose,
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
115 * apply the appropriate #FbUtilDebugFlags.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
116 */
37278
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
117 void
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
118 fb_util_debug(PurpleDebugLevel level, const gchar *format, ...)
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
119 G_GNUC_PRINTF(2, 3);
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
120
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
121 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
122 * fb_util_vdebug:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
123 * @level: The #PurpleDebugLevel.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
124 * @format: The format string literal.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
125 * @ap: The #va_list.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
126 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
127 * Logs a debugging message. If the messages is unsafe or verbose,
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
128 * apply the appropriate #FbUtilDebugFlags.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
129 */
37278
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
130 void
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
131 fb_util_vdebug(PurpleDebugLevel level, const gchar *format, va_list ap);
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
132
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
133 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
134 * fb_util_debug_misc:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
135 * @format: The format string literal.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
136 * @...: The arguments for @format.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
137 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
138 * Logs a debugging message with the level of #PURPLE_DEBUG_MISC.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
139 */
37278
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
140 void
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
141 fb_util_debug_misc(const gchar *format, ...)
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
142 G_GNUC_PRINTF(1, 2);
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
143
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
144 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
145 * fb_util_debug_info:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
146 * @format: The format string literal.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
147 * @...: The arguments for @format.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
148 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
149 * Logs a debugging message with the level of #PURPLE_DEBUG_INFO.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
150 */
37278
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
151 void
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
152 fb_util_debug_info(const gchar *format, ...)
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
153 G_GNUC_PRINTF(1, 2);
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
154
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
155 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
156 * fb_util_debug_warning:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
157 * @format: The format string literal.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
158 * @...: The arguments for @format.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
159 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
160 * Logs a debugging message with the level of #PURPLE_DEBUG_WARNING.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
161 */
37278
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
162 void
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
163 fb_util_debug_warning(const gchar *format, ...)
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
164 G_GNUC_PRINTF(1, 2);
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
165
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
166 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
167 * fb_util_debug_error:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
168 * @format: The format string literal.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
169 * @...: The arguments for @format.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
170 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
171 * Logs a debugging message with the level of #PURPLE_DEBUG_ERROR.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
172 */
37278
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
173 void
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
174 fb_util_debug_error(const gchar *format, ...)
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
175 G_GNUC_PRINTF(1, 2);
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
176
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
177 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
178 * fb_util_debug_fatal:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
179 * @format: The format string literal.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
180 * @...: The arguments for @format.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
181 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
182 * Logs a debugging message with the level of #PURPLE_DEBUG_FATAL.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
183 */
37278
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
184 void
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
185 fb_util_debug_fatal(const gchar *format, ...)
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
186 G_GNUC_PRINTF(1, 2);
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
187
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
188 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
189 * fb_util_debug_hexdump:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
190 * @level: The #PurpleDebugLevel.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
191 * @bytes: The #GByteArray.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
192 * @format: The format string literal.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
193 * @...: The arguments for @format.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
194 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
195 * Logs a hexdump of a #GByteArray. If the messages is unsafe or
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
196 * verbose, apply the appropriate #FbUtilDebugFlags.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
197 */
37278
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
198 void
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
199 fb_util_debug_hexdump(PurpleDebugLevel level, const GByteArray *bytes,
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
200 const gchar *format, ...)
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
201 G_GNUC_PRINTF(3, 4);
3ee1b27dacc4 facebook: added debugging utilities and messages
James Geboski <jgeboski@gmail.com>
parents: 37265
diff changeset
202
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
203 /**
37416
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
204 * fb_util_get_locale:
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
205 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
206 * Gets the locale string (ex: en_US) from the system. The returned
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
207 * string should be freed with #g_free() when no longer needed.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
208 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
209 * Returns: The locale string.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
210 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
211 gchar *
37416
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
212 fb_util_get_locale(void);
37260
473934b0c408 facebook: use working locale language
James Geboski <jgeboski@gmail.com>
parents: 37258
diff changeset
213
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
214 /**
37416
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
215 * fb_util_rand_alnum:
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
216 * @len: The length of the string.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
217 *
37416
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
218 * Gets a random alphanumeric (A-Za-z0-9) string. This function should
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
219 * *not* be relied on for cryptographic operations. The returned string
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
220 * should be freed with #g_free() when no longer needed.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
221 *
37416
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
222 * Returns: The alphanumeric string.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
223 */
37260
473934b0c408 facebook: use working locale language
James Geboski <jgeboski@gmail.com>
parents: 37258
diff changeset
224 gchar *
37416
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
225 fb_util_rand_alnum(guint len);
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
226
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
227 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
228 * fb_util_request_buddy:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
229 * @gc: The #PurpleConnection.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
230 * @title: The title of the message or #NULL.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
231 * @primary: The main point of the message or #NULL.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
232 * @secondary: The secondary information or #NULL.
41294
3f0b065e58f7 Add missing element-type annotation in Facebook
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41293
diff changeset
233 * @select: (element-type PurpleBuddy): A #GSList of selected buddies or #NULL.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
234 * @multi: #TRUE to for multiple buddy selections, otherwise #FALSE.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
235 * @ok_cb: The callback for the `OK` button or #NULL.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
236 * @cancel_cb: The callback for the `Cancel` button or #NULL.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
237 * @data: The user-defined data.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
238 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
239 * Displays a buddy list selection form.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
240 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
241 * Returns: The UI-specific handle.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
242 */
37258
291b6e1acc24 facebook: implemented group chat support
James Geboski <jgeboski@gmail.com>
parents: 37250
diff changeset
243 gpointer
291b6e1acc24 facebook: implemented group chat support
James Geboski <jgeboski@gmail.com>
parents: 37250
diff changeset
244 fb_util_request_buddy(PurpleConnection *gc, const gchar *title,
291b6e1acc24 facebook: implemented group chat support
James Geboski <jgeboski@gmail.com>
parents: 37250
diff changeset
245 const gchar *primary, const gchar *secondary,
291b6e1acc24 facebook: implemented group chat support
James Geboski <jgeboski@gmail.com>
parents: 37250
diff changeset
246 GSList *select, gboolean multi, GCallback ok_cb,
291b6e1acc24 facebook: implemented group chat support
James Geboski <jgeboski@gmail.com>
parents: 37250
diff changeset
247 GCallback cancel_cb, gpointer data);
291b6e1acc24 facebook: implemented group chat support
James Geboski <jgeboski@gmail.com>
parents: 37250
diff changeset
248
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
249 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
250 * fb_util_serv_got_im:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
251 * @gc: The #PurpleConnection.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
252 * @who: The message sender or receiver.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
253 * @text: The message text.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
254 * @flags: The #PurpleMessageFlags.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
255 * @timestamp: The message timestamp.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
256 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
257 * Handles an incoming IM message. This function is special in that it
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
258 * handles self messages. This function determines the direction of the
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
259 * message from the #PurpleMessageFlags.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
260 */
37317
143a4d8db15c facebook: implemented self messages
James Geboski <jgeboski@gmail.com>
parents: 37310
diff changeset
261 void
143a4d8db15c facebook: implemented self messages
James Geboski <jgeboski@gmail.com>
parents: 37310
diff changeset
262 fb_util_serv_got_im(PurpleConnection *gc, const gchar *who, const gchar *text,
143a4d8db15c facebook: implemented self messages
James Geboski <jgeboski@gmail.com>
parents: 37310
diff changeset
263 PurpleMessageFlags flags, guint64 timestamp);
143a4d8db15c facebook: implemented self messages
James Geboski <jgeboski@gmail.com>
parents: 37310
diff changeset
264
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
265 /**
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
266 * fb_util_serv_got_chat_in:
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
267 * @gc: The #PurpleConnection.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
268 * @id: The id of the chat.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
269 * @who: The message sender or receiver.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
270 * @text: The message text.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
271 * @flags: The #PurpleMessageFlags.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
272 * @timestamp: The message timestamp.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
273 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
274 * Handles an incoming chat message. This function is special in that
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
275 * it handles self messages. This function determines the direction of
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
276 * the message from the #PurpleMessageFlags.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
277 */
37317
143a4d8db15c facebook: implemented self messages
James Geboski <jgeboski@gmail.com>
parents: 37310
diff changeset
278 void
143a4d8db15c facebook: implemented self messages
James Geboski <jgeboski@gmail.com>
parents: 37310
diff changeset
279 fb_util_serv_got_chat_in(PurpleConnection *gc, gint id, const gchar *who,
143a4d8db15c facebook: implemented self messages
James Geboski <jgeboski@gmail.com>
parents: 37310
diff changeset
280 const gchar *text, PurpleMessageFlags flags,
143a4d8db15c facebook: implemented self messages
James Geboski <jgeboski@gmail.com>
parents: 37310
diff changeset
281 guint64 timestamp);
143a4d8db15c facebook: implemented self messages
James Geboski <jgeboski@gmail.com>
parents: 37310
diff changeset
282
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
283 /**
37416
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
284 * fb_util_strtest:
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
285 * @str: The string.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
286 * @type: The #GAsciiType.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
287 *
37416
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
288 * Tests if the string only contains characters allowed by the
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
289 * #GAsciiType. More than one type can be specified by ORing the types
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
290 * together.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
291 *
37416
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
292 * Returns: #TRUE if the string only contains characters allowed by the
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
293 * #GAsciiType, otherwise #FALSE.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
294 */
37258
291b6e1acc24 facebook: implemented group chat support
James Geboski <jgeboski@gmail.com>
parents: 37250
diff changeset
295 gboolean
37416
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
296 fb_util_strtest(const gchar *str, GAsciiType type);
37258
291b6e1acc24 facebook: implemented group chat support
James Geboski <jgeboski@gmail.com>
parents: 37250
diff changeset
297
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
298 /**
37416
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
299 * fb_util_zlib_test:
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
300 * @bytes: The #GByteArray.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
301 *
37416
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
302 * Tests if the #GByteArray is zlib compressed.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
303 *
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
304 * Returns: #TRUE if the #GByteArray is compressed, otherwise #FALSE.
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
305 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
306 gboolean
37416
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
307 fb_util_zlib_test(const GByteArray *bytes);
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
308
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
309 /**
37416
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
310 * fb_util_zlib_deflate:
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
311 * @bytes: The #GByteArray.
37415
a06ade737f26 facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37414
diff changeset
312 * @error: The return location for the #GError or #NULL.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
313 *
37416
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
314 * Deflates a #GByteArray with zlib. The returned #GByteArray should be
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
315 * freed with #g_byte_array_free() when no longer needed.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
316 *
41293
bfd8314a1a74 Add missing return transfer annotation in Facebook
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41122
diff changeset
317 * Returns: (transfer full): The deflated #GByteArray or #NULL on error.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
318 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
319 GByteArray *
37416
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
320 fb_util_zlib_deflate(const GByteArray *bytes, GError **error);
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
321
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
322 /**
37416
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
323 * fb_util_zlib_inflate:
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
324 * @bytes: The #GByteArray.
37415
a06ade737f26 facebook: fixed grammar errors in the GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37414
diff changeset
325 * @error: The return location for the #GError or #NULL.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
326 *
37416
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
327 * Inflates a #GByteArray with zlib. The returned #GByteArray should be
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
328 * freed with #g_byte_array_free() when no longer needed.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
329 *
41293
bfd8314a1a74 Add missing return transfer annotation in Facebook
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41122
diff changeset
330 * Returns: (transfer full): The inflated #GByteArray or #NULL on error.
37347
34d43f8c10d1 facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents: 37317
diff changeset
331 */
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
332 GByteArray *
37416
77536a48b4be facebook: refactored util naming and GTK-Doc
James Geboski <jgeboski@gmail.com>
parents: 37415
diff changeset
333 fb_util_zlib_inflate(const GByteArray *bytes, GError **error);
37250
3f5570a17b15 facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff changeset
334
39819
3554dac2991b Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 37471
diff changeset
335 #endif /* PURPLE_FACEBOOK_UTIL_H */

mercurial