Replace functions which called once with their bodies
[pidgin-git.git] / libpurple / protocols / facebook / id.h
blob2e2b3a09b535c7f22227e904c2643e264f283373
1 /* purple
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.
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.
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.
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
22 #ifndef PURPLE_FACEBOOK_ID_H
23 #define PURPLE_FACEBOOK_ID_H
25 /**
26 * SECTION:id
27 * @section_id: facebook-id
28 * @short_description: <filename>id.h</filename>
29 * @title: Facebook Identifier
31 * The Facebook identifier utilities.
34 #include <glib.h>
35 #include <glib/gprintf.h>
37 #include "util.h"
39 /**
40 * FB_ID_FORMAT:
42 * The format specifier for printing and scanning an #FbId.
44 #define FB_ID_FORMAT G_GINT64_FORMAT
46 /**
47 * FB_ID_MODIFIER:
49 * The length modifier for printing an #FbId.
51 #define FB_ID_MODIFIER G_GINT64_MODIFIER
53 /**
54 * FB_ID_STRMAX:
56 * The maximum length, including a null-terminating character, of the
57 * string representation of an #FbId.
59 #define FB_ID_STRMAX 21
61 /**
62 * FB_TYPE_ID:
64 * The #GType of an #FbId.
66 #define FB_TYPE_ID G_TYPE_INT64
68 /**
69 * FB_ID_CONSTANT:
70 * @v: The value.
72 * Inserts a literal #FbId into source code.
74 * Return: The literal #FbId value.
76 #define FB_ID_CONSTANT(v) G_GINT64_CONSTANT(v)
78 /**
79 * FB_ID_FROM_STR:
80 * @s: The string value.
82 * Converts a string to an #FbId.
84 * Return: The converted #FbId value.
86 #define FB_ID_FROM_STR(s) g_ascii_strtoll(s, NULL, 10)
88 /**
89 * FB_ID_IS_STR:
90 * @s: The string value.
92 * Determines if a string is an #FbId.
94 * Return: #TRUE if the string is an #FbId, otherwise #FALSE.
96 #define FB_ID_IS_STR(s) fb_util_strtest(s, G_ASCII_DIGIT)
98 /**
99 * FB_ID_TO_STR:
100 * @i: The #FbId.
101 * @s: The string buffer.
103 * Converts an #FbId to a string. The buffer should be at least the
104 * size of #FB_ID_STRMAX.
106 * Return: The converted string value.
108 #define FB_ID_TO_STR(i, s) g_sprintf(s, "%" FB_ID_FORMAT, (FbId) i)
111 * fb_id_equal:
113 * Compares the values of two #FbId's for equality. See #g_int64_equal.
115 #define fb_id_equal g_int64_equal
118 * fb_id_hash:
120 * Converts a pointer to a #FbId hash value. See #g_int64_hash.
122 #define fb_id_hash g_int64_hash
125 * FbId:
127 * Represents a numeric Facebook identifier.
129 typedef gint64 FbId;
131 #endif /* PURPLE_FACEBOOK_ID_H */