Warning, file /network/ktp-kded-module/telepathy-kded-module-plugin.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 Parent class for Telepathy KDED Plugins 0003 Copyright (C) 2017 James D. Smith <smithjd15@gmail.com> 0004 Copyright (C) 2011 Martin Klapetek <martin.klapetek@gmail.com> 0005 0006 This library is free software; you can redistribute it and/or 0007 modify it under the terms of the GNU Lesser General Public 0008 License as published by the Free Software Foundation; either 0009 version 2.1 of the License, or (at your option) any later version. 0010 0011 This library is distributed in the hope that it will be useful, 0012 but WITHOUT ANY WARRANTY; without even the implied warranty of 0013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0014 Lesser General Public License for more details. 0015 0016 You should have received a copy of the GNU Lesser General Public 0017 License along with this library; if not, write to the Free Software 0018 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 0019 */ 0020 0021 0022 #ifndef TELEPATHY_KDED_MODULE_PLUGIN_H 0023 #define TELEPATHY_KDED_MODULE_PLUGIN_H 0024 0025 #include <QObject> 0026 #include <TelepathyQt/Presence> 0027 0028 class TelepathyKDEDModulePlugin : public QObject 0029 { 0030 Q_OBJECT 0031 0032 /* The parent class for the Telepathy KDED plugins. */ 0033 0034 public: 0035 explicit TelepathyKDEDModulePlugin(QObject *parent = 0); 0036 virtual ~TelepathyKDEDModulePlugin(); 0037 0038 enum State { 0039 Disabled = false, 0040 Enabled = true, 0041 Active 0042 }; 0043 Q_ENUM(State) 0044 0045 /** 0046 * \brief The plugin operating state, i.e. if it is active, enabled, or 0047 * disabled. 0048 * 0049 * \return State enum indicating the plugin's operating state. 0050 */ 0051 State pluginState() const { return m_pluginState; } 0052 0053 /** 0054 * \brief Plugin name. Deriving classes must return a valid plugin name in this method. 0055 */ 0056 virtual QString pluginName() const = 0; 0057 0058 /** 0059 * \brief A plugin presence. 0060 * 0061 * \return A KTp::Presence. 0062 */ 0063 Tp::Presence requestedPresence() const { return m_requestedPresence; } 0064 0065 public Q_SLOTS: 0066 /** 0067 * \brief Plugin-specific configuration reload. Deriving classes must have this method reimplemented. 0068 */ 0069 virtual void reloadConfig() = 0; 0070 0071 Q_SIGNALS: 0072 void pluginChanged(); 0073 0074 protected: 0075 void setPlugin(State state); 0076 void setPlugin(const Tp::Presence &presence); 0077 0078 private: 0079 Tp::Presence m_requestedPresence; 0080 State m_pluginState; 0081 }; 0082 0083 #endif // TELEPATHY_KDED_MODULE_PLUGIN_H