Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/glib-2.0/glib/gbytes.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002  * Copyright © 2009, 2010 Codethink Limited
0003  * Copyright © 2011 Collabora Ltd.
0004  *
0005  * SPDX-License-Identifier: LGPL-2.1-or-later
0006  *
0007  * This library is free software; you can redistribute it and/or
0008  * modify it under the terms of the GNU Lesser General Public
0009  * License as published by the Free Software Foundation; either
0010  * version 2.1 of the License, or (at your option) any later version.
0011  *
0012  * This library is distributed in the hope that it will be useful,
0013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0015  * Lesser General Public License for more details.
0016  *
0017  * You should have received a copy of the GNU Lesser General Public
0018  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
0019  *
0020  * Author: Ryan Lortie <desrt@desrt.ca>
0021  *         Stef Walter <stefw@collabora.co.uk>
0022  */
0023 
0024 #ifndef __G_BYTES_H__
0025 #define __G_BYTES_H__
0026 
0027 #if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
0028 #error "Only <glib.h> can be included directly."
0029 #endif
0030 
0031 #include <glib/gtypes.h>
0032 #include <glib/garray.h>
0033 
0034 G_BEGIN_DECLS
0035 
0036 GLIB_AVAILABLE_IN_ALL
0037 GBytes *        g_bytes_new                     (gconstpointer   data,
0038                                                  gsize           size);
0039 
0040 GLIB_AVAILABLE_IN_ALL
0041 GBytes *        g_bytes_new_take                (gpointer        data,
0042                                                  gsize           size);
0043 
0044 GLIB_AVAILABLE_IN_ALL
0045 GBytes *        g_bytes_new_static              (gconstpointer   data,
0046                                                  gsize           size);
0047 
0048 GLIB_AVAILABLE_IN_ALL
0049 GBytes *        g_bytes_new_with_free_func      (gconstpointer   data,
0050                                                  gsize           size,
0051                                                  GDestroyNotify  free_func,
0052                                                  gpointer        user_data);
0053 
0054 GLIB_AVAILABLE_IN_ALL
0055 GBytes *        g_bytes_new_from_bytes          (GBytes         *bytes,
0056                                                  gsize           offset,
0057                                                  gsize           length);
0058 
0059 GLIB_AVAILABLE_IN_ALL
0060 gconstpointer   g_bytes_get_data                (GBytes         *bytes,
0061                                                  gsize          *size);
0062 
0063 GLIB_AVAILABLE_IN_ALL
0064 gsize           g_bytes_get_size                (GBytes         *bytes);
0065 
0066 GLIB_AVAILABLE_IN_ALL
0067 GBytes *        g_bytes_ref                     (GBytes         *bytes);
0068 
0069 GLIB_AVAILABLE_IN_ALL
0070 void            g_bytes_unref                   (GBytes         *bytes);
0071 
0072 GLIB_AVAILABLE_IN_ALL
0073 gpointer        g_bytes_unref_to_data           (GBytes         *bytes,
0074                                                  gsize          *size);
0075 
0076 GLIB_AVAILABLE_IN_ALL
0077 GByteArray *    g_bytes_unref_to_array          (GBytes         *bytes);
0078 
0079 GLIB_AVAILABLE_IN_ALL
0080 guint           g_bytes_hash                    (gconstpointer   bytes);
0081 
0082 GLIB_AVAILABLE_IN_ALL
0083 gboolean        g_bytes_equal                   (gconstpointer   bytes1,
0084                                                  gconstpointer   bytes2);
0085 
0086 GLIB_AVAILABLE_IN_ALL
0087 gint            g_bytes_compare                 (gconstpointer   bytes1,
0088                                                  gconstpointer   bytes2);
0089 
0090 GLIB_AVAILABLE_IN_2_70
0091 gconstpointer   g_bytes_get_region              (GBytes         *bytes,
0092                                                  gsize           element_size,
0093                                                  gsize           offset,
0094                                                  gsize           n_elements);
0095 
0096 
0097 G_END_DECLS
0098 
0099 #endif /* __G_BYTES_H__ */