aboutsummaryrefslogtreecommitdiff
path: root/common/system.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/system.h')
-rw-r--r--common/system.h52
1 files changed, 50 insertions, 2 deletions
diff --git a/common/system.h b/common/system.h
index a11adb4134..54c6fa8df7 100644
--- a/common/system.h
+++ b/common/system.h
@@ -33,8 +33,6 @@
#include "graphics/pixelformat.h"
-#include "backends/audiocd/audiocd.h"
-
namespace Audio {
class Mixer;
}
@@ -54,6 +52,7 @@ namespace Common {
class HardwareKeySet;
}
+class AudioCDManager;
class FilesystemFactory;
/**
@@ -74,6 +73,16 @@ struct TimeDate {
int tm_year; ///< year - 1900
};
+namespace LogMessageType {
+
+enum Type {
+ kError,
+ kWarning,
+ kDebug
+};
+
+} // End of namespace LogMessageType
+
/**
* Interface for ScummVM backends. If you want to port ScummVM to a system
* which is not currently covered by any of our backends, this is the place
@@ -954,6 +963,13 @@ public:
virtual void quit() = 0;
/**
+ * Signals that a fatal error inside the client code has happened.
+ *
+ * This should quit the application.
+ */
+ virtual void fatalError();
+
+ /**
* Set a window caption or any other comparable status display to the
* given value. The caption must be a pure ISO LATIN 1 string. Passing a
* string with a different encoding may lead to unexpected behavior,
@@ -1020,6 +1036,38 @@ public:
*/
virtual Common::WriteStream *createConfigWriteStream() = 0;
+ /**
+ * Logs a given message.
+ *
+ * It is up to the backend where to log the different messages.
+ * The backend should aim at using a non-buffered output for it
+ * so that no log data is lost in case of a crash.
+ *
+ * The default implementation outputs them on stdout/stderr.
+ *
+ * @param type the type of the message
+ * @param message the message itself
+ */
+ virtual void logMessage(LogMessageType::Type type, const char *message);
+
+ /**
+ * Returns the locale of the system.
+ *
+ * This returns the currently set up locale of the system, on which
+ * ScummVM is run.
+ *
+ * The format of the locale is language_country. These should match
+ * the POSIX locale values.
+ *
+ * For information about POSIX locales read here:
+ * http://en.wikipedia.org/wiki/Locale#POSIX-type_platforms
+ *
+ * The default implementation returns "en_US".
+ *
+ * @return locale of the system
+ */
+ virtual Common::String getSystemLanguage() const;
+
//@}
};