Fix the build
[glib.git] / gio / gioerror.h
blob7475706585f96705e93bd60194059e2f7ba0ef8e
1 /* GIO - GLib Input, Output and Streaming Library
2 *
3 * Copyright (C) 2006-2007 Red Hat, Inc.
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.
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
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.
20 * Author: Alexander Larsson <alexl@redhat.com>
23 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
24 #error "Only <gio/gio.h> can be included directly."
25 #endif
27 #ifndef __G_IO_ERROR_H__
28 #define __G_IO_ERROR_H__
30 #include <glib.h>
32 G_BEGIN_DECLS
34 GQuark g_io_error_quark (void);
36 /**
37 * G_IO_ERROR:
39 * Error domain for GIO. Errors in this domain will be from the #GIOErrorEnum enumeration.
40 * See #GError for more information on error domains.
41 **/
42 #define G_IO_ERROR g_io_error_quark()
44 /* This enumeration conflicts with GIOError in giochannel.h. However,
45 * that is only used as a return value in some deprecated functions.
46 * So, we reuse the same prefix for the enumeration values, but call
47 * the actual enumeration (which is rarely used) GIOErrorEnum.
50 /**
51 * GIOErrorEnum:
52 * @G_IO_ERROR_FAILED: Generic error condition for when any operation fails.
53 * @G_IO_ERROR_NOT_FOUND: File not found error.
54 * @G_IO_ERROR_EXISTS: File already exists error.
55 * @G_IO_ERROR_IS_DIRECTORY: File is a directory error.
56 * @G_IO_ERROR_NOT_DIRECTORY: File is not a directory.
57 * @G_IO_ERROR_NOT_EMPTY: File is a directory that isn't empty.
58 * @G_IO_ERROR_NOT_REGULAR_FILE: File is not a regular file.
59 * @G_IO_ERROR_NOT_SYMBOLIC_LINK: File is not a symbolic link.
60 * @G_IO_ERROR_NOT_MOUNTABLE_FILE: File cannot be mounted.
61 * @G_IO_ERROR_FILENAME_TOO_LONG: Filename is too many characters.
62 * @G_IO_ERROR_INVALID_FILENAME: Filename is invalid or contains invalid characters.
63 * @G_IO_ERROR_TOO_MANY_LINKS: File contains too many symbolic links.
64 * @G_IO_ERROR_NO_SPACE: No space left on drive.
65 * @G_IO_ERROR_INVALID_ARGUMENT: Invalid argument.
66 * @G_IO_ERROR_PERMISSION_DENIED: Permission denied.
67 * @G_IO_ERROR_NOT_SUPPORTED: Operation not supported for the current backend.
68 * @G_IO_ERROR_NOT_MOUNTED: File isn't mounted.
69 * @G_IO_ERROR_ALREADY_MOUNTED: File is already mounted.
70 * @G_IO_ERROR_CLOSED: File was closed.
71 * @G_IO_ERROR_CANCELLED: Operation was cancelled. See #GCancellable.
72 * @G_IO_ERROR_PENDING: Operations are still pending.
73 * @G_IO_ERROR_READ_ONLY: File is read only.
74 * @G_IO_ERROR_CANT_CREATE_BACKUP: Backup couldn't be created.
75 * @G_IO_ERROR_WRONG_ETAG: File's Entity Tag was incorrect.
76 * @G_IO_ERROR_TIMED_OUT: Operation timed out.
77 * @G_IO_ERROR_WOULD_RECURSE: Operation would be recursive.
78 * @G_IO_ERROR_BUSY: File is busy.
79 * @G_IO_ERROR_WOULD_BLOCK: Operation would block.
80 * @G_IO_ERROR_HOST_NOT_FOUND: Host couldn't be found (remote operations).
81 * @G_IO_ERROR_WOULD_MERGE: Operation would merge files.
82 * @G_IO_ERROR_FAILED_HANDLED: Operation failed and a helper program has already interacted with the user. Do not display any error dialog.
84 * Error codes returned by GIO functions.
86 **/
87 typedef enum
89 G_IO_ERROR_FAILED,
90 G_IO_ERROR_NOT_FOUND,
91 G_IO_ERROR_EXISTS,
92 G_IO_ERROR_IS_DIRECTORY,
93 G_IO_ERROR_NOT_DIRECTORY,
94 G_IO_ERROR_NOT_EMPTY,
95 G_IO_ERROR_NOT_REGULAR_FILE,
96 G_IO_ERROR_NOT_SYMBOLIC_LINK,
97 G_IO_ERROR_NOT_MOUNTABLE_FILE,
98 G_IO_ERROR_FILENAME_TOO_LONG,
99 G_IO_ERROR_INVALID_FILENAME,
100 G_IO_ERROR_TOO_MANY_LINKS,
101 G_IO_ERROR_NO_SPACE,
102 G_IO_ERROR_INVALID_ARGUMENT,
103 G_IO_ERROR_PERMISSION_DENIED,
104 G_IO_ERROR_NOT_SUPPORTED,
105 G_IO_ERROR_NOT_MOUNTED,
106 G_IO_ERROR_ALREADY_MOUNTED,
107 G_IO_ERROR_CLOSED,
108 G_IO_ERROR_CANCELLED,
109 G_IO_ERROR_PENDING,
110 G_IO_ERROR_READ_ONLY,
111 G_IO_ERROR_CANT_CREATE_BACKUP,
112 G_IO_ERROR_WRONG_ETAG,
113 G_IO_ERROR_TIMED_OUT,
114 G_IO_ERROR_WOULD_RECURSE,
115 G_IO_ERROR_BUSY,
116 G_IO_ERROR_WOULD_BLOCK,
117 G_IO_ERROR_HOST_NOT_FOUND,
118 G_IO_ERROR_WOULD_MERGE,
119 G_IO_ERROR_FAILED_HANDLED
120 } GIOErrorEnum;
122 GIOErrorEnum g_io_error_from_errno (gint err_no);
124 G_END_DECLS
126 #endif /* __G_IO_ERROR_H__ */