summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2024-10-23 21:48:07 +0200
committerTomas Bzatek <tbzatek@redhat.com>2024-10-23 21:48:07 +0200
commit50352a904b43023985d3c24214fd811ef3ce9a2d (patch)
tree740e17e56e738171e75c08f01b6805b13fa68b48
parenteb1a4c680a18cbe38e75925c4b71a33c20571fd7 (diff)
downloadtuxcmd-modules-50352a904b43023985d3c24214fd811ef3ce9a2d.tar.xz
Add tuxcmd-error.h
-rw-r--r--common/tuxcmd-error.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/common/tuxcmd-error.h b/common/tuxcmd-error.h
new file mode 100644
index 0000000..04be91e
--- /dev/null
+++ b/common/tuxcmd-error.h
@@ -0,0 +1,68 @@
+/* Tux Commander VFS: VFS utilities
+ * Copyright (C) 2024 Tomas Bzatek <tbzatek@users.sourceforge.net>
+ * Check for updates on tuxcmd.sourceforge.net
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef __TUXCMD_ERROR_H__
+#define __TUXCMD_ERROR_H__
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+#include <glib.h>
+
+typedef enum {
+ TUXCMD_ERROR_CANCELLED,
+ TUXCMD_ERROR_EXCEPTION,
+ TUXCMD_ERROR_NOT_SUPPORTED,
+ /* Basic IO */
+ TUXCMD_ERROR_CHDIR,
+ TUXCMD_ERROR_OPENDIR,
+ TUXCMD_ERROR_STAT,
+ TUXCMD_ERROR_MKDIR,
+ TUXCMD_ERROR_REMOVE,
+ TUXCMD_ERROR_SYMLINK,
+ TUXCMD_ERROR_CHMOD,
+ TUXCMD_ERROR_CHOWN,
+ TUXCMD_ERROR_RENAME,
+ TUXCMD_ERROR_TIMESTAMPS,
+ /* File IO */
+ TUXCMD_ERROR_OPEN_FILE,
+ TUXCMD_ERROR_READ_FILE,
+ TUXCMD_ERROR_WRITE_FILE,
+ TUXCMD_ERROR_CLOSE_FILE,
+ TUXCMD_ERROR_SEEK,
+ /* File copy */
+ TUXCMD_ERROR_ALLOC_FAILED,
+ TUXCMD_ERROR_SOURCE_OPEN,
+ TUXCMD_ERROR_TARGET_OPEN,
+ TUXCMD_ERROR_SOURCE_READ,
+ TUXCMD_ERROR_TARGET_WRITE,
+ TUXCMD_ERROR_SOURCE_CLOSE,
+ TUXCMD_ERROR_TARGET_CLOSE
+} TuxcmdError;
+
+#define TUXCMD_ERROR (tuxcmd_error_quark ())
+inline GQuark tuxcmd_error_quark (void) {
+ return g_quark_from_static_string ("tuxcmd-error-quark");
+}
+
+#ifdef __cplusplus
+ }
+#endif
+#endif /* __TUXCMD_ERROR_H__ */