#5617 Revert "Remove plugin interface from Arch"

This reverts commit 4613edc17ced61d6aca80cff661323ede0cb9d30.
This commit is contained in:
Andrew Nelless 2016-09-27 14:43:14 +01:00
parent c3889667ba
commit 79fc6239fd
4 changed files with 24 additions and 0 deletions

View File

@ -50,6 +50,7 @@
# include "arch/win32/ArchSystemWindows.h" # include "arch/win32/ArchSystemWindows.h"
# include "arch/win32/ArchTaskBarWindows.h" # include "arch/win32/ArchTaskBarWindows.h"
# include "arch/win32/ArchTimeWindows.h" # include "arch/win32/ArchTimeWindows.h"
# include "arch/win32/ArchPluginWindows.h"
# include "arch/win32/ArchInternetWindows.h" # include "arch/win32/ArchInternetWindows.h"
#elif SYSAPI_UNIX #elif SYSAPI_UNIX
# include "arch/unix/ArchConsoleUnix.h" # include "arch/unix/ArchConsoleUnix.h"
@ -65,6 +66,7 @@
# include "arch/unix/ArchSystemUnix.h" # include "arch/unix/ArchSystemUnix.h"
# include "arch/unix/ArchTaskBarXWindows.h" # include "arch/unix/ArchTaskBarXWindows.h"
# include "arch/unix/ArchTimeUnix.h" # include "arch/unix/ArchTimeUnix.h"
# include "arch/unix/ArchPluginUnix.h"
# include "arch/unix/ArchInternetUnix.h" # include "arch/unix/ArchInternetUnix.h"
#endif #endif
@ -120,10 +122,12 @@ public:
static void setInstance(Arch* s) { s_instance = s; } static void setInstance(Arch* s) { s_instance = s; }
ARCH_PLUGIN& plugin() const { return (ARCH_PLUGIN&)m_plugin; }
ARCH_INTERNET& internet() const { return (ARCH_INTERNET&)m_internet; } ARCH_INTERNET& internet() const { return (ARCH_INTERNET&)m_internet; }
private: private:
static Arch* s_instance; static Arch* s_instance;
ARCH_PLUGIN m_plugin;
ARCH_INTERNET m_internet; ARCH_INTERNET m_internet;
}; };

View File

@ -63,6 +63,13 @@ public:
*/ */
virtual std::string getLogDirectory() = 0; virtual std::string getLogDirectory() = 0;
//! Get plugins directory
/*!
Returns the plugin files directory. If no plugin directory is set,
this will return the plugin folder within the user's profile.
*/
virtual std::string getPluginDirectory() = 0;
//! Get user's profile directory //! Get user's profile directory
/*! /*!
Returns the user's profile directory. If no profile directory is set, Returns the user's profile directory. If no profile directory is set,
@ -88,4 +95,11 @@ public:
Returns the user's profile directory. Returns the user's profile directory.
*/ */
virtual void setProfileDirectory(const String& s) = 0; virtual void setProfileDirectory(const String& s) = 0;
//@}
//! Set the user's plugin directory
/*
Returns the user's plugin directory.
*/
virtual void setPluginDirectory(const String& s) = 0;
}; };

View File

@ -34,11 +34,14 @@ public:
virtual std::string getSystemDirectory(); virtual std::string getSystemDirectory();
virtual std::string getInstalledDirectory(); virtual std::string getInstalledDirectory();
virtual std::string getLogDirectory(); virtual std::string getLogDirectory();
virtual std::string getPluginDirectory();
virtual std::string getProfileDirectory(); virtual std::string getProfileDirectory();
virtual std::string concatPath(const std::string& prefix, virtual std::string concatPath(const std::string& prefix,
const std::string& suffix); const std::string& suffix);
virtual void setProfileDirectory(const String& s); virtual void setProfileDirectory(const String& s);
virtual void setPluginDirectory(const String& s);
private: private:
String m_profileDirectory; String m_profileDirectory;
String m_pluginDirectory;
}; };

View File

@ -34,11 +34,14 @@ public:
virtual std::string getSystemDirectory(); virtual std::string getSystemDirectory();
virtual std::string getInstalledDirectory(); virtual std::string getInstalledDirectory();
virtual std::string getLogDirectory(); virtual std::string getLogDirectory();
virtual std::string getPluginDirectory();
virtual std::string getProfileDirectory(); virtual std::string getProfileDirectory();
virtual std::string concatPath(const std::string& prefix, virtual std::string concatPath(const std::string& prefix,
const std::string& suffix); const std::string& suffix);
virtual void setProfileDirectory(const String& s); virtual void setProfileDirectory(const String& s);
virtual void setPluginDirectory(const String& s);
private: private:
String m_profileDirectory; String m_profileDirectory;
String m_pluginDirectory;
}; };