diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2022-05-30 19:40:31 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2022-05-31 01:17:58 +0900 |
commit | d95a4fea540b371fa86493d069fdbd54f33c5b40 (patch) | |
tree | 079b038ab559439eb7ded40a07bd79fd92926b3b /tderadio3/src/include/tderadioapp.h | |
parent | e54890e0480e5adee69f5220a7c6dd072bbd75ea (diff) | |
download | tderadio-d95a4fea540b371fa86493d069fdbd54f33c5b40.tar.gz tderadio-d95a4fea540b371fa86493d069fdbd54f33c5b40.zip |
Standardize folder structure.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'tderadio3/src/include/tderadioapp.h')
-rw-r--r-- | tderadio3/src/include/tderadioapp.h | 121 |
1 files changed, 0 insertions, 121 deletions
diff --git a/tderadio3/src/include/tderadioapp.h b/tderadio3/src/include/tderadioapp.h deleted file mode 100644 index 8861f04..0000000 --- a/tderadio3/src/include/tderadioapp.h +++ /dev/null @@ -1,121 +0,0 @@ -/*************************************************************************** - tderadioapp.h - description - ------------------- - begin : Sa Feb 9 2002 - copyright : (C) 2002 by Klas Kalass / Martin Witte / Frank Schwanz - email : klas.kalass@gmx.de - ***************************************************************************/ - -/*************************************************************************** - * * - * 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. * - * * - ***************************************************************************/ - -#ifndef TDERADIO_TDERADIOAPP_H -#define TDERADIO_TDERADIOAPP_H - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <tqdict.h> - -#include <tdeapplication.h> -#include <tdeaboutapplication.h> -#include "pluginmanager.h" -#include "plugins.h" - -class KLibrary; - -class TDERadioAbout : public PluginBase -{ -public: - TDERadioAbout(const TQString &name) : PluginBase(name, "TDERadio Application") {} - - virtual TQString pluginClassName() const { return "TDERadioAbout"; } - - virtual ConfigPageInfo createConfigurationPage () { return ConfigPageInfo(); } - virtual AboutPageInfo createAboutPage (); - - virtual void saveState (TDEConfig *) const {} - virtual void restoreState (TDEConfig *) {} -}; - - - - -typedef PluginBase *(*t_tderadio_plugin_init_func)(const TQString & cls, const TQString &obj); -typedef void (*t_tderadio_plugin_info_func)(TQMap<TQString, TQString> &); -typedef void (*t_tderadio_plugin_libload_func)(); -typedef void (*t_tderadio_plugin_libunload_func)(); - - -struct PluginLibraryInfo { - KLibrary *library; - TQMap<TQString,TQString> plugins; - t_tderadio_plugin_init_func init_func; - t_tderadio_plugin_info_func info_func; - t_tderadio_plugin_libload_func libload_func; - t_tderadio_plugin_libunload_func libunload_func; - - PluginLibraryInfo() : library(NULL), init_func(NULL), info_func(NULL), libload_func(NULL), libunload_func(NULL) {} - PluginLibraryInfo(const TQString &libname); - bool valid() { return init_func && info_func && library && libload_func && libunload_func; } -}; - - -struct PluginClassInfo { - TQString class_name; - TQString description; - t_tderadio_plugin_init_func create_function; - - PluginClassInfo() : create_function(NULL) {} - PluginClassInfo(const TQString &_name, const TQString &descr, t_tderadio_plugin_init_func init_func) - : class_name(_name), description(descr), create_function(init_func) {} - PluginBase *CreateInstance(const TQString &obj_name) { return create_function ? create_function(class_name, obj_name) : NULL; } -}; - - -class TDERadioApp : public TDEApplication -{ -Q_OBJECT - -public: - TDERadioApp(); - virtual ~TDERadioApp(); - - virtual void saveState (TDEConfig *c); - virtual void restoreState (TDEConfig *c); - - virtual PluginManager *createNewInstance(const TQString &name); - - virtual KLibrary *LoadLibrary (const TQString &library); - virtual void UnloadLibrary (const TQString &library); - virtual PluginBase *CreatePlugin (PluginManager *manager, const TQString &name, const TQString &object_name); - - virtual const TQMap<TQString, PluginLibraryInfo> &getPluginLibraries() const { return m_PluginLibraries; } - virtual const TQMap<TQString, PluginClassInfo> &getPluginClasses() const { return m_PluginInfos; } - - virtual void startPlugins(); - -protected slots: - - virtual void saveState(); - virtual void slotAboutToQuit(); - -protected: - - TQDict<PluginManager> m_Instances; - - TQMap<TQString, PluginLibraryInfo> m_PluginLibraries; - TQMap<TQString, PluginClassInfo> m_PluginInfos; - - bool m_quitting; -}; - - -#endif |