1
/***************************************************************************
2
* Copyright (C) 2012 by Daniel Nicoletti <dantti12@gmail.com> *
4
* This program is free software; you can redistribute it and/or modify *
5
* it under the terms of the GNU General Public License as published by *
6
* the Free Software Foundation; either version 2 of the License, or *
7
* (at your option) any later version. *
9
* This program is distributed in the hope that it will be useful, *
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12
* GNU General Public License for more details. *
14
* You should have received a copy of the GNU General Public License *
15
* along with this program; see the file COPYING. If not, write to *
16
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
17
* Boston, MA 02110-1301, USA. *
18
***************************************************************************/
20
#ifndef APPERDTHREAD_H
21
#define APPERDTHREAD_H
26
#include <QDBusConnection>
29
class ApperdThread : public QObject
33
explicit ApperdThread(QObject *parent = 0);
39
void configFileChanged();
41
void transactionListChanged(const QStringList &tids);
42
void updatesChanged();
43
void serviceOwnerChanged(const QString &serviceName, const QString &oldOwner, const QString &newOwner);
46
void callApperSentinel(const QString &method,
47
const QList<QVariant> &arguments = QList<QVariant>());
48
QDateTime getTimeSinceRefreshCache() const;
49
QString networkState() const;
50
bool nameHasOwner(const QString &name, const QDBusConnection &connection) const;
51
bool isSystemReady(bool ignoreBattery, bool ignoreMobile) const;
53
bool m_actRefreshCacheChecked;
54
bool m_canRefreshCache;
55
bool m_sentinelIsRunning;
56
QDateTime m_lastRefreshCache;
57
uint m_refreshCacheInterval;
62
#endif // APPERDTHREAD_H