1 /* GLIB - Library of useful routines for C programming
2 * gmappedfile.h: Simplified wrapper around the mmap function
4 * Copyright 2005 Matthias Clasen
5 * Portions copyright (c) 2006 Nokia Corporation. All rights reserved.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library 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 GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
22 #ifndef __G_MAPPED_FILE_H__
23 #define __G_MAPPED_FILE_H__
26 #include <glib/gerror.h>
30 typedef struct _GMappedFile GMappedFile;
32 IMPORT_C GMappedFile *g_mapped_file_new (const gchar *filename,
34 GError **error) G_GNUC_MALLOC;
35 IMPORT_C gsize g_mapped_file_get_length (GMappedFile *file);
36 IMPORT_C gchar *g_mapped_file_get_contents (GMappedFile *file);
37 IMPORT_C void g_mapped_file_free (GMappedFile *file);
41 #endif /* __G_MAPPED_FILE_H__ */