[gnome-games] dreamcast: Move errors to their own files



commit 69d613123eeb10e6fc6cdc50ba0e7c14bcfc8095
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Tue Nov 3 09:23:10 2020 +0100

    dreamcast: Move errors to their own files
    
    This is needed as we will add more error types not directly related to
    the header.

 plugins/dreamcast/src/dreamcast-error.vala  | 5 +++++
 plugins/dreamcast/src/dreamcast-header.vala | 4 ----
 plugins/dreamcast/src/meson.build           | 1 +
 3 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/plugins/dreamcast/src/dreamcast-error.vala b/plugins/dreamcast/src/dreamcast-error.vala
new file mode 100644
index 00000000..2a521659
--- /dev/null
+++ b/plugins/dreamcast/src/dreamcast-error.vala
@@ -0,0 +1,5 @@
+// This file is part of GNOME Games. License: GPL-3.0+.
+
+errordomain Games.DreamcastError {
+       INVALID_HEADER,
+}
diff --git a/plugins/dreamcast/src/dreamcast-header.vala b/plugins/dreamcast/src/dreamcast-header.vala
index 672eda11..9f2a5516 100644
--- a/plugins/dreamcast/src/dreamcast-header.vala
+++ b/plugins/dreamcast/src/dreamcast-header.vala
@@ -66,7 +66,3 @@ private class Games.DreamcastHeader : Object {
                return header.length == HEADER_SIZE && header.is_ascii ();
        }
 }
-
-errordomain Games.DreamcastError {
-       INVALID_HEADER,
-}
diff --git a/plugins/dreamcast/src/meson.build b/plugins/dreamcast/src/meson.build
index c5bd577f..a938bb73 100644
--- a/plugins/dreamcast/src/meson.build
+++ b/plugins/dreamcast/src/meson.build
@@ -1,4 +1,5 @@
 vala_sources = [
+  'dreamcast-error.vala',
   'dreamcast-header.vala',
   'dreamcast-plugin.vala',
 ]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]