| |
1 /* purple |
| |
2 * |
| |
3 * Purple is the legal property of its developers, whose names are too numerous |
| |
4 * to list here. Please refer to the COPYRIGHT file distributed with this |
| |
5 * source distribution. |
| |
6 * |
| |
7 * This program is free software; you can redistribute it and/or modify |
| |
8 * it under the terms of the GNU General Public License as published by |
| |
9 * the Free Software Foundation; either version 2 of the License, or |
| |
10 * (at your option) any later version. |
| |
11 * |
| |
12 * This program is distributed in the hope that it will be useful, |
| |
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| |
15 * GNU General Public License for more details. |
| |
16 * |
| |
17 * You should have received a copy of the GNU General Public License |
| |
18 * along with this program; if not, write to the Free Software |
| |
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| |
20 */ |
| |
21 |
| |
22 #ifndef _FACEBOOK_ID_H_ |
| |
23 #define _FACEBOOK_ID_H_ |
| |
24 |
| |
25 #include <glib.h> |
| |
26 #include <glib/gprintf.h> |
| |
27 |
| |
28 #define FB_ID_CONSTANT(v) G_GINT64_CONSTANT(v) |
| |
29 #define FB_ID_FORMAT G_GINT64_FORMAT |
| |
30 #define FB_ID_MODIFIER G_GINT64_MODIFIER |
| |
31 #define FB_ID_STRMAX 21 |
| |
32 #define FB_TYPE_ID G_TYPE_INT64 |
| |
33 #define fb_id_hash g_int64_hash |
| |
34 #define fb_id_equal g_int64_equal |
| |
35 |
| |
36 #define FB_ID_FROM_STR(s) \ |
| |
37 g_ascii_strtoll(s, NULL, 10) |
| |
38 |
| |
39 #define FB_ID_TO_STR(i, s) \ |
| |
40 g_sprintf(s, "%" FB_ID_FORMAT, (FbId) i) |
| |
41 |
| |
42 typedef gint64 FbId; |
| |
43 |
| |
44 #endif /* _FACEBOOK_ID_H_ */ |