summaryrefslogtreecommitdiff
path: root/daemon/gvfsafputils.h
diff options
context:
space:
mode:
authorCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2011-08-30 23:18:47 +0200
committerCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2012-01-22 09:47:27 +0100
commit199973156a5b1975fa8ecccedf4fb93a32cac7b4 (patch)
treec48e537bd164b589a498687463a45c1abb8966da /daemon/gvfsafputils.h
parentca382dd370cdeaac0d73f74db54eb5a90626798c (diff)
downloadgvfs-199973156a5b1975fa8ecccedf4fb93a32cac7b4.tar.gz
afp: output the textual representation of undhandled error codes
add a new function afp_result_to_gerror which does a generic AfpResultCode to GError mapping
Diffstat (limited to 'daemon/gvfsafputils.h')
-rw-r--r--daemon/gvfsafputils.h90
1 files changed, 90 insertions, 0 deletions
diff --git a/daemon/gvfsafputils.h b/daemon/gvfsafputils.h
new file mode 100644
index 00000000..467cc13f
--- /dev/null
+++ b/daemon/gvfsafputils.h
@@ -0,0 +1,90 @@
+ /* GIO - GLib Input, Output and Streaming Library
+ *
+ * Copyright (C) Carl-Anton Ingmarsson 2011 <ca.ingmarsson@gmail.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: Carl-Anton Ingmarsson <ca.ingmarsson@gmail.com>
+ */
+
+#ifndef _GVFSAFPUTILS_H_
+#define _GVFSAFPUTILS_H_
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+typedef enum
+{
+ AFP_RESULT_NO_ERROR = 0,
+ AFP_RESULT_NO_MORE_SESSIONS = -1068,
+ AFP_RESULT_ASP_SESS_CLOSED = -1072,
+ AFP_RESULT_ACCESS_DENIED = -5000,
+ AFP_RESULT_AUTH_CONTINUE = -5001,
+ AFP_RESULT_BAD_UAM = -5002,
+ AFP_RESULT_BAD_VERS_NUM = -5003,
+ AFP_RESULT_BITMAP_ERR = -5004,
+ AFP_RESULT_CANT_MOVE = -5005,
+ AFP_RESULT_DENY_CONFLICT = -5006,
+ AFP_RESULT_DIR_NOT_EMPTY = -5007,
+ AFP_RESULT_DISK_FULL = -5008,
+ AFP_RESULT_EOF_ERR = -5009,
+ AFP_RESULT_FILE_BUSY = -5010,
+ AFP_RESULT_FLAT_VOL = -5011,
+ AFP_RESULT_ITEM_NOT_FOUND = -5012,
+ AFP_RESULT_LOCK_ERR = -5013,
+ AFP_RESULT_MISC_ERR = -5014,
+ AFP_RESULT_NO_MORE_LOCKS = -5015,
+ AFP_RESULT_NO_SERVER = -5016,
+ AFP_RESULT_OBJECT_EXISTS = -5017,
+ AFP_RESULT_OBJECT_NOT_FOUND = -5018,
+ AFP_RESULT_PARAM_ERR = -5019,
+ AFP_RESULT_RANGE_NOT_LOCKED = -5020,
+ AFP_RESULT_RANGE_OVERLAP = -5021,
+ AFP_RESULT_SESS_CLOSED = -5022,
+ AFP_RESULT_USER_NOT_AUTH = -5023,
+ AFP_RESULT_CALL_NOT_SUPPORTED = -5024,
+ AFP_RESULT_OBJECT_TYPE_ERR = -5025,
+ AFP_RESULT_TOO_MANY_FILES_OPEN = -5026,
+ AFP_RESULT_SERVER_GOING_DOWN = -5027,
+ AFP_RESULT_CANT_RENAME = -5028,
+ AFP_RESULT_DIR_NOT_FOUND = -5029,
+ AFP_RESULT_ICON_TYPE_ERR = -5030,
+ AFP_RESULT_VOL_LOCKED = -5031,
+ AFP_RESULT_OBJECT_LOCKED = -5032,
+ AFP_RESULT_CONTAINS_SHARED_ERR = -5033,
+ AFP_RESULT_ID_NOT_FOUND = -5034,
+ AFP_RESULT_ID_EXISTS = -5035,
+ AFP_RESULT_DIFF_VOL_ERR = -5036,
+ AFP_RESULT_CATALOG_CHANGED = -5037,
+ AFP_RESULT_SAME_OBJECT_ERR = -5038,
+ AFP_RESULT_BAD_ID_ERR = -5039,
+ AFP_RESULT_PWD_SAME_ERR = -5040,
+ AFP_RESULT_PWD_TOO_SHORT_ERR = -5041,
+ AFP_RESULT_PWD_EXPIRED_ERR = -5042,
+ AFP_RESULT_INSIDE_SHARE_ERR = -5043,
+ AFP_RESULT_INSIDE_TRASH_ERR = -5044,
+ AFP_RESULT_PWD_NEEDS_CHANGE_ERR = -5045,
+ AFP_RESULT_PWD_POLICY_ERR = -5046,
+ AFP_RESULT_DISK_QUOTA_EXCEEDED = -5047
+} AfpResultCode;
+
+GError *
+afp_result_code_to_gerror (AfpResultCode res_code);
+
+G_END_DECLS
+
+#endif /* _GVFSAFPUTILS_H_ */