Warning, file /network/ktp-kded-module/telepathy-kded-module-plugin.cpp 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 #include "telepathy-kded-module-plugin.h" 0023 0024 #include "ktp_kded_debug.h" 0025 0026 TelepathyKDEDModulePlugin::TelepathyKDEDModulePlugin(QObject *parent) 0027 : QObject(parent), 0028 m_pluginState(Disabled) 0029 { 0030 m_requestedPresence.setStatus(Tp::ConnectionPresenceTypeUnset, QLatin1String("unset"), QString()); 0031 } 0032 0033 TelepathyKDEDModulePlugin::~TelepathyKDEDModulePlugin() 0034 { 0035 } 0036 0037 void TelepathyKDEDModulePlugin::setPlugin(State state) 0038 { 0039 m_pluginState = state; 0040 0041 qCDebug(KTP_KDED_MODULE) << pluginName() << "state change:" << m_pluginState; 0042 0043 Q_EMIT pluginChanged(); 0044 } 0045 0046 void TelepathyKDEDModulePlugin::setPlugin(const Tp::Presence &presence) 0047 { 0048 m_requestedPresence = presence; 0049 m_pluginState = Active; 0050 0051 qCDebug(KTP_KDED_MODULE) << pluginName() << "presence change request:" << m_requestedPresence.status() << m_requestedPresence.statusMessage(); 0052 0053 Q_EMIT pluginChanged(); 0054 }