ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

#include <posix.h>

Inheritance diagram for OSystem_POSIX:
Collaboration diagram for OSystem_POSIX:

List of all members.

Public Member Functions

 OSystem_POSIX (Common::String baseConfigName="residualvm.ini")
virtual ~OSystem_POSIX ()
virtual bool hasFeature (Feature f)
 Determine whether the backend supports the specified feature.
virtual bool displayLogFile ()
 Open the log file in a way that allows the user to review it, and possibly email it (or parts of it) to the ScummVM team, e.g.
virtual bool openUrl (const Common::String &url)
 Open the given Url in the default browser (if available on the target system).
virtual void init ()
 Pre-initialize backend.
virtual void initBackend ()
 The following method is called once, from main.cpp, after all config data (including command line params etc.
virtual void addSysArchivesToSearchSet (Common::SearchSet &s, int priority=0)
 Add system specific Common::Archive objects to the given SearchSet.
Common::String getScreenshotsPath () override

Protected Member Functions

virtual Common::String getDefaultConfigFileName ()
 Get the default file name (or even path) where the user configuration of ScummVM will be saved.
virtual Common::WriteStreamcreateLogFile ()
Common::String getXdgUserDir (const char *name)
virtual AudioCDManagercreateAudioCDManager ()
 Create the audio CD manager.
bool launchBrowser (const Common::String &client, const Common::String &url)

Protected Attributes

Common::String _baseConfigName
 Base string for creating the default path and filename for the configuration file.
Common::String _logFilePath
 The path of the currently open log file, if any.

Detailed Description

Definition at line 28 of file posix.h.


Constructor & Destructor Documentation

OSystem_POSIX::OSystem_POSIX ( Common::String  baseConfigName = "residualvm.ini"  ) 
virtual OSystem_POSIX::~OSystem_POSIX (  )  [inline, virtual]

Definition at line 32 of file posix.h.


Member Function Documentation

virtual void OSystem_POSIX::addSysArchivesToSearchSet ( Common::SearchSet s,
int  priority = 0 
) [virtual]

Add system specific Common::Archive objects to the given SearchSet.

E.g. on Unix the dir corresponding to DATA_PATH (if set), or on Mac OS X the 'Resource' dir in the app bundle.

Todo:
Come up with a better name. This one sucks.
Parameters:
s the SearchSet to which the system specific dirs, if any, are added
priority the priority with which those dirs are added

Reimplemented from OSystem_SDL.

Reimplemented in OSystem_MacOSX.

virtual AudioCDManager* OSystem_POSIX::createAudioCDManager (  )  [protected, virtual]

Create the audio CD manager.

Reimplemented from OSystem_SDL.

Reimplemented in OSystem_MacOSX.

virtual Common::WriteStream* OSystem_POSIX::createLogFile (  )  [protected, virtual]

Reimplemented from OSystem_SDL.

virtual bool OSystem_POSIX::displayLogFile (  )  [virtual]

Open the log file in a way that allows the user to review it, and possibly email it (or parts of it) to the ScummVM team, e.g.

as part of a bug report.

On a desktop operating system, this would typically launch some kind of (external) text editor / viewer. On a phone, it might also cause a context switch to another application. Finally, on some ports, it might not be supported at all, and so do nothing.

The kFeatureDisplayLogFile feature flag can be used to test whether this call has been implemented by the active backend.

Returns:
true if all seems to have gone fine, false if an error occurred
Note:
An error could mean that the log file did not exist, or the editor could not launch. However, a return value of true does not guarantee that the user actually will see the log file.
It is up to the backend to ensure that the system is in a state that allows the user to actually see the displayed log files. This might for example require leaving fullscreen mode.

Reimplemented from OSystem.

Reimplemented in OSystem_MacOSX.

virtual Common::String OSystem_POSIX::getDefaultConfigFileName (  )  [protected, virtual]

Get the default file name (or even path) where the user configuration of ScummVM will be saved.

Note that not all ports may use this.

Reimplemented from OSystem.

Common::String OSystem_POSIX::getScreenshotsPath (  )  [override, virtual]

Reimplemented from OSystem_SDL.

Reimplemented in OSystem_MacOSX.

Common::String OSystem_POSIX::getXdgUserDir ( const char *  name  )  [protected]
virtual bool OSystem_POSIX::hasFeature ( Feature  f  )  [virtual]

Determine whether the backend supports the specified feature.

Reimplemented from OSystem_SDL.

Reimplemented in OSystem_MacOSX.

virtual void OSystem_POSIX::init (  )  [virtual]

Pre-initialize backend.

It should be called after instantiating the backend. Early needed managers are created here.

Reimplemented from OSystem_SDL.

Reimplemented in OSystem_MacOSX.

virtual void OSystem_POSIX::initBackend (  )  [virtual]

The following method is called once, from main.cpp, after all config data (including command line params etc.

) are fully loaded.

Note:
Subclasses should always invoke the implementation of their parent class. They should do so near the end of their own implementation.

Reimplemented from OSystem_SDL.

Reimplemented in OSystem_MacOSX.

bool OSystem_POSIX::launchBrowser ( const Common::String client,
const Common::String url 
) [protected]
virtual bool OSystem_POSIX::openUrl ( const Common::String url  )  [virtual]

Open the given Url in the default browser (if available on the target system).

Returns:
true on success, false otherwise.
Note:
It is up to the backend to ensure that the system is in a state that allows the user to actually see the web page. This might for example require leaving fullscreen mode.

url the URL to open

Reimplemented from OSystem.

Reimplemented in OSystem_MacOSX.


Member Data Documentation

Base string for creating the default path and filename for the configuration file.

This allows the Mac OS X subclass to override the config file path and name.

Definition at line 53 of file posix.h.

The path of the currently open log file, if any.

Note:
This is currently a string and not an FSNode for simplicity; e.g. we don't need to include fs.h here, and currently the only use of this value is to use it to open the log file in an editor; for that, we need it only as a string anyway.

Definition at line 63 of file posix.h.


The documentation for this class was generated from the following file:


Generated on Sat Mar 16 2019 05:04:39 for ResidualVM by doxygen 1.7.1
curved edge   curved edge