Wed, 30 Aug 2017 20:33:01 -0300
facebook: Fix "Failed to read thrift" with unknown fields in /t_p payload
>Login error: Failed to read thrift: facebook-api.c:1815
>fb_api_cb_publish_pt: assertion 'FALSE' failed
|
35701
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
1 | /* purple |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
2 | * |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
3 | * Purple is the legal property of its developers, whose names are too numerous |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
4 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
5 | * source distribution. |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
6 | * |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
7 | * This program is free software; you can redistribute it and/or modify |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
8 | * it under the terms of the GNU General Public License as published by |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
9 | * the Free Software Foundation; either version 2 of the License, or |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
10 | * (at your option) any later version. |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
11 | * |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
12 | * This program is distributed in the hope that it will be useful, |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
15 | * GNU General Public License for more details. |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
16 | * |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
17 | * You should have received a copy of the GNU General Public License |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
18 | * along with this program; if not, write to the Free Software |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
20 | */ |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
21 | |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
22 | #ifndef PURPLE_SMILEY_LIST_H |
|
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
23 | #define PURPLE_SMILEY_LIST_H |
|
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
24 | |
|
35774
9227a7757e92
Comments: PurpleSmiley
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35771
diff
changeset
|
25 | /** |
|
9227a7757e92
Comments: PurpleSmiley
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35771
diff
changeset
|
26 | * SECTION:smiley-list |
|
9227a7757e92
Comments: PurpleSmiley
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35771
diff
changeset
|
27 | * @include:smiley-list.h |
|
9227a7757e92
Comments: PurpleSmiley
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35771
diff
changeset
|
28 | * @section_id: libpurple-smiley-list |
|
9227a7757e92
Comments: PurpleSmiley
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35771
diff
changeset
|
29 | * @short_description: a collection of smileys |
|
9227a7757e92
Comments: PurpleSmiley
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35771
diff
changeset
|
30 | * @title: Smiley lists |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
31 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
32 | * A #PurpleSmileyList is a handy storage for a set of #PurpleSmiley's. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
33 | * It holds structures needed for parsing, accessing them by a shortcut, or |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
34 | * listing (either all, or by unique image). |
|
35774
9227a7757e92
Comments: PurpleSmiley
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35771
diff
changeset
|
35 | */ |
|
35701
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
36 | |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
37 | #include <glib-object.h> |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
38 | |
|
35702
06a934baa610
Smiley list: add/remove
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35701
diff
changeset
|
39 | #include "smiley.h" |
|
35709
0d7a84931572
Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35702
diff
changeset
|
40 | #include "trie.h" |
|
35702
06a934baa610
Smiley list: add/remove
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35701
diff
changeset
|
41 | |
|
35701
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
42 | typedef struct _PurpleSmileyList PurpleSmileyList; |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
43 | typedef struct _PurpleSmileyListClass PurpleSmileyListClass; |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
44 | |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
45 | #define PURPLE_TYPE_SMILEY_LIST (purple_smiley_list_get_type()) |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
46 | #define PURPLE_SMILEY_LIST(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_SMILEY_LIST, PurpleSmileyList)) |
|
35701
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
47 | #define PURPLE_SMILEY_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_SMILEY_LIST, PurpleSmileyListClass)) |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
48 | #define PURPLE_IS_SMILEY_LIST(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_SMILEY_LIST)) |
|
35701
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
49 | #define PURPLE_IS_SMILEY_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_SMILEY_LIST)) |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
50 | #define PURPLE_SMILEY_LIST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_SMILEY_LIST, PurpleSmileyListClass)) |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
51 | |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
52 | /** |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
53 | * PurpleSmileyList: |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
54 | * |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
55 | * A container for #PurpleSmiley's. |
|
35701
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
56 | */ |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
57 | struct _PurpleSmileyList { |
|
35701
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
58 | /*< private >*/ |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
59 | GObject parent; |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
60 | }; |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
61 | |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
62 | struct _PurpleSmileyListClass { |
|
35701
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
63 | /*< private >*/ |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
64 | GObjectClass parent_class; |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
65 | |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
66 | void (*purple_reserved1)(void); |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
67 | void (*purple_reserved2)(void); |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
68 | void (*purple_reserved3)(void); |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
69 | void (*purple_reserved4)(void); |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
70 | }; |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
71 | |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
72 | G_BEGIN_DECLS |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
73 | |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
74 | /** |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
75 | * purple_smiley_list_get_type: |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
76 | * |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
77 | * Returns: the #GType for a smiley list. |
|
35701
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
78 | */ |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
79 | GType purple_smiley_list_get_type(void); |
|
35701
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
80 | |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
81 | /** |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
82 | * purple_smiley_list_new: |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
83 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
84 | * Creates new #PurpleSmileyList. You might prefer using existing lists, like |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
85 | * #purple_smiley_custom_get_list or #purple_conversation_get_remote_smileys |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
86 | * (the latter is read-only, accessed with |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
87 | * #purple_conversation_add_remote_smiley and |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
88 | * #purple_conversation_get_remote_smiley). |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
89 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
90 | * Returns: newly created #PurpleSmileyList. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
91 | */ |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
92 | PurpleSmileyList *purple_smiley_list_new(void); |
|
35709
0d7a84931572
Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35702
diff
changeset
|
93 | |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
94 | /** |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
95 | * purple_smiley_list_add: |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
96 | * @list: the smiley list. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
97 | * @smiley: the smiley to be added. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
98 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
99 | * Adds the @smiley to the @list. A particular @smiley can only be added to |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
100 | * a single @list. Also, a @list can not contain multiple @smiley's with |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
101 | * the same shortcut. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
102 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
103 | * It increases the reference count of @smiley, if needed. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
104 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
105 | * Returns: %TRUE if the @smiley was successfully added to the list. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
106 | */ |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
107 | gboolean purple_smiley_list_add(PurpleSmileyList *list, PurpleSmiley *smiley); |
|
35702
06a934baa610
Smiley list: add/remove
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35701
diff
changeset
|
108 | |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
109 | /** |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
110 | * purple_smiley_list_remove: |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
111 | * @list: the smiley list. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
112 | * @smiley: the smiley to be removed. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
113 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
114 | * Removes a @smiley from the @list. If @smiley's reference count drops to zero, |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
115 | * it's destroyed. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
116 | */ |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
117 | void purple_smiley_list_remove(PurpleSmileyList *list, PurpleSmiley *smiley); |
|
35702
06a934baa610
Smiley list: add/remove
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35701
diff
changeset
|
118 | |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
119 | /** |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
120 | * purple_smiley_list_is_empty: |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
121 | * @list: the smiley list. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
122 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
123 | * Checks, if the smiley @list is empty. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
124 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
125 | * Returns: %TRUE if the @list is empty, %FALSE otherwise. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
126 | */ |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
127 | gboolean purple_smiley_list_is_empty(const PurpleSmileyList *list); |
|
35738
030ce6840163
Smileys: toolbar button sensitivity
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35728
diff
changeset
|
128 | |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
129 | /** |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
130 | * purple_smiley_list_get_by_shortcut: |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
131 | * @list: the smiley list. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
132 | * @shortcut: the textual representation of smiley to lookup. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
133 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
134 | * Retrieves a smiley with the specified @shortcut from the @list. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
135 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
136 | * Returns: a #PurpleSmiley if the smiley was found, %NULL otherwise. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
137 | */ |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
138 | PurpleSmiley *purple_smiley_list_get_by_shortcut(PurpleSmileyList *list, const gchar *shortcut); |
|
35717
45bde03f86a6
Custom smileys: simplify storage implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35713
diff
changeset
|
139 | |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
140 | /** |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
141 | * purple_smiley_list_get_trie: |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
142 | * @list: the smiley list. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
143 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
144 | * Returns the #PurpleTrie for searching of #PurpleSmiley's being kept |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
145 | * in the @list. It holds markup escaped shortcuts, so if you want to search |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
146 | * in plain message, you have to escape it first. If you don't do this, it won't |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
147 | * find smileys containing special characters. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
148 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
149 | * Returns: (transfer none): a #PurpleTrie for contained smileys. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
150 | */ |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
151 | PurpleTrie *purple_smiley_list_get_trie(PurpleSmileyList *list); |
|
35709
0d7a84931572
Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35702
diff
changeset
|
152 | |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
153 | /** |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
154 | * purple_smiley_list_get_unique: |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
155 | * @list_: the smiley list. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
156 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
157 | * Returns the list of smileys with unique image file paths. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
158 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
159 | * Returns: (transfer container): the #GList of unique smileys. Use #g_list_free |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
160 | * when done using it. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
161 | */ |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
162 | GList *purple_smiley_list_get_unique(PurpleSmileyList *list_); |
|
35713
4423f463a782
Smileys in PidginWebviewToolbar
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35709
diff
changeset
|
163 | |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
164 | /** |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
165 | * purple_smiley_list_get_all: |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
166 | * @list_: the smiley list. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
167 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
168 | * Returns the list of all smileys added to the @list_. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
169 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
170 | * Returns: (transfer container): the #GList of smileys. Use #g_list_free |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
171 | * when done using it. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
172 | */ |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
173 | GList *purple_smiley_list_get_all(PurpleSmileyList *list_); |
|
35728
6cd9aee7f276
Smiley manager: edit, delete
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35717
diff
changeset
|
174 | |
|
35701
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
175 | G_END_DECLS |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
176 | |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
177 | #endif /* PURPLE_SMILEY_LIST_H */ |