c4606fcecc0b6ede0635b43f5e6a55717de12374
[platform/upstream/glib.git] / gio / gioerror.h
1 /* GIO - GLib Input, Output and Streaming Library
2  * 
3  * Copyright (C) 2006-2007 Red Hat, Inc.
4  *
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 License, or (at your option) any later version.
9  *
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.
14  *
15  * You should have received a copy of the GNU Lesser General
16  * Public 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.
19  *
20  * Author: Alexander Larsson <alexl@redhat.com>
21  */
22
23 #ifndef __G_IO_ERROR_H__
24 #define __G_IO_ERROR_H__
25
26 #include <glib/gerror.h>
27
28 G_BEGIN_DECLS
29
30 GQuark          g_io_error_quark      (void);
31
32 #define G_IO_ERROR g_io_error_quark()
33
34 /* This enumeration conflicts with GIOError in giochannel.h. However,
35  * that is only used as a return value in some deprecated functions.
36  * So, we reuse the same prefix for the enumeration values, but call
37  * the actual enumeration (which is rarely used) GIOErrorEnum.
38  */
39
40 typedef enum
41 {
42   G_IO_ERROR_FAILED,
43   G_IO_ERROR_NOT_FOUND,
44   G_IO_ERROR_EXISTS,
45   G_IO_ERROR_IS_DIRECTORY,
46   G_IO_ERROR_NOT_DIRECTORY,
47   G_IO_ERROR_NOT_EMPTY,
48   G_IO_ERROR_NOT_REGULAR_FILE,
49   G_IO_ERROR_NOT_SYMBOLIC_LINK,
50   G_IO_ERROR_NOT_MOUNTABLE_FILE,
51   G_IO_ERROR_FILENAME_TOO_LONG,
52   G_IO_ERROR_INVALID_FILENAME,
53   G_IO_ERROR_TOO_MANY_LINKS,
54   G_IO_ERROR_NO_SPACE,
55   G_IO_ERROR_INVALID_ARGUMENT,
56   G_IO_ERROR_PERMISSION_DENIED,
57   G_IO_ERROR_NOT_SUPPORTED,
58   G_IO_ERROR_NOT_MOUNTED,
59   G_IO_ERROR_ALREADY_MOUNTED,
60   G_IO_ERROR_CLOSED,
61   G_IO_ERROR_CANCELLED,
62   G_IO_ERROR_PENDING,
63   G_IO_ERROR_READ_ONLY,
64   G_IO_ERROR_CANT_CREATE_BACKUP,
65   G_IO_ERROR_WRONG_ETAG,
66   G_IO_ERROR_TIMED_OUT,
67   G_IO_ERROR_WOULD_RECURSE,
68   G_IO_ERROR_BUSY,
69   G_IO_ERROR_WOULD_BLOCK,
70   G_IO_ERROR_HOST_NOT_FOUND,
71   G_IO_ERROR_WOULD_MERGE
72 } GIOErrorEnum;
73
74 GIOErrorEnum g_io_error_from_errno (gint err_no);
75
76 G_END_DECLS
77
78 #endif /* __G_IO_ERROR_H__ */