Mon, 12 Sep 2022 22:08:59 -0500
Remove the list_icon vfunc from PurpleProtocol.
This was replaced by the icon-name, icon-resource-path, and icon-search-path
properties.
Testing Done:
Compiled
Reviewed at https://reviews.imfreedom.org/r/1749/
|
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_ID_H |
|
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
37471
diff
changeset
|
23 | #define PURPLE_FACEBOOK_ID_H |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
24 | |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
25 | #include <glib.h> |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
26 | #include <glib/gprintf.h> |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
27 | |
|
37258
291b6e1acc24
facebook: implemented group chat support
James Geboski <jgeboski@gmail.com>
parents:
37250
diff
changeset
|
28 | #include "util.h" |
|
291b6e1acc24
facebook: implemented group chat support
James Geboski <jgeboski@gmail.com>
parents:
37250
diff
changeset
|
29 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
30 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
31 | * FB_ID_FORMAT: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
32 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
33 | * The format specifier for printing and scanning an #FbId. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
34 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
35 | #define FB_ID_FORMAT G_GINT64_FORMAT |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
36 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
37 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
38 | * FB_ID_MODIFIER: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
39 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
40 | * The length modifier for printing an #FbId. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
41 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
42 | #define FB_ID_MODIFIER G_GINT64_MODIFIER |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
43 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
44 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
45 | * FB_ID_STRMAX: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
46 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
47 | * The maximum length, including a null-terminating character, of the |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
48 | * string representation of an #FbId. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
49 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
50 | #define FB_ID_STRMAX 21 |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
51 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
52 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
53 | * FB_TYPE_ID: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
54 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
55 | * The #GType of an #FbId. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
56 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
57 | #define FB_TYPE_ID G_TYPE_INT64 |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
58 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
59 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
60 | * FB_ID_CONSTANT: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
61 | * @v: The value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
62 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
63 | * Inserts a literal #FbId into source code. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
64 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
65 | * Return: The literal #FbId value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
66 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
67 | #define FB_ID_CONSTANT(v) G_GINT64_CONSTANT(v) |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
68 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
69 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
70 | * FB_ID_FROM_STR: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
71 | * @s: The string value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
72 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
73 | * Converts a string to an #FbId. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
74 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
75 | * Return: The converted #FbId value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
76 | */ |
|
37471
32c1e77d0474
facebook: coding style consistencies
James Geboski <jgeboski@gmail.com>
parents:
37416
diff
changeset
|
77 | #define FB_ID_FROM_STR(s) g_ascii_strtoll(s, NULL, 10) |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
78 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
79 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
80 | * FB_ID_IS_STR: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
81 | * @s: The string value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
82 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
83 | * Determines if a string is an #FbId. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
84 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
85 | * Return: #TRUE if the string is an #FbId, otherwise #FALSE. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
86 | */ |
|
37471
32c1e77d0474
facebook: coding style consistencies
James Geboski <jgeboski@gmail.com>
parents:
37416
diff
changeset
|
87 | #define FB_ID_IS_STR(s) fb_util_strtest(s, G_ASCII_DIGIT) |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
88 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
89 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
90 | * FB_ID_TO_STR: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
91 | * @i: The #FbId. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
92 | * @s: The string buffer. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
93 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
94 | * Converts an #FbId to a string. The buffer should be at least the |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
95 | * size of #FB_ID_STRMAX. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
96 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
97 | * Return: The converted string value. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
98 | */ |
|
37471
32c1e77d0474
facebook: coding style consistencies
James Geboski <jgeboski@gmail.com>
parents:
37416
diff
changeset
|
99 | #define FB_ID_TO_STR(i, s) g_sprintf(s, "%" FB_ID_FORMAT, (FbId) i) |
|
37258
291b6e1acc24
facebook: implemented group chat support
James Geboski <jgeboski@gmail.com>
parents:
37250
diff
changeset
|
100 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
101 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
102 | * fb_id_equal: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
103 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
104 | * Compares the values of two #FbId's for equality. See #g_int64_equal. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
105 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
106 | #define fb_id_equal g_int64_equal |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
107 | |
|
37347
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
108 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
109 | * fb_id_hash: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
110 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
111 | * Converts a pointer to a #FbId hash value. See #g_int64_hash. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
112 | */ |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
113 | #define fb_id_hash g_int64_hash |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
114 | |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
115 | /** |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
116 | * FbId: |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
117 | * |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
118 | * Represents a numeric Facebook identifier. |
|
34d43f8c10d1
facebook: added GTK-Doc for the internal APIs
James Geboski <jgeboski@gmail.com>
parents:
37258
diff
changeset
|
119 | */ |
|
37250
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
120 | typedef gint64 FbId; |
|
3f5570a17b15
facebook: initial import of bitlbee-facebook
James Geboski <jgeboski@gmail.com>
parents:
diff
changeset
|
121 | |
|
39819
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
37471
diff
changeset
|
122 | #endif /* PURPLE_FACEBOOK_ID_H */ |