2 * Copyright © 2009, 2010 Codethink Limited
3 * Copyright © 2011 Collabora Ltd.
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the licence, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
20 * Author: Ryan Lortie <desrt@desrt.ca>
21 * Stef Walter <stefw@collabora.co.uk>
27 #include <glib/gtypes.h>
28 #include <glib/garray.h>
30 GBytes * g_bytes_new (gconstpointer data,
33 GBytes * g_bytes_new_take (gpointer data,
36 GBytes * g_bytes_new_static (gconstpointer data,
39 GBytes * g_bytes_new_with_free_func (gconstpointer data,
41 GDestroyNotify free_func,
44 GBytes * g_bytes_new_from_bytes (GBytes *bytes,
48 gconstpointer g_bytes_get_data (GBytes *bytes);
50 gsize g_bytes_get_size (GBytes *bytes);
52 GBytes * g_bytes_ref (GBytes *bytes);
54 void g_bytes_unref (GBytes *bytes);
56 gpointer g_bytes_unref_to_data (GBytes *bytes,
59 GByteArray * g_bytes_unref_to_array (GBytes *bytes);
61 guint g_bytes_hash (gconstpointer bytes);
63 gboolean g_bytes_equal (gconstpointer bytes1,
64 gconstpointer bytes2);
66 gint g_bytes_compare (gconstpointer bytes1,
67 gconstpointer bytes2);
69 #endif /* __G_BYTES_H__ */