| 1 |
/* |
| 2 |
* Copyright (C) 2014 Canonical Ltd. |
| 3 |
* |
| 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; version 3. |
| 7 |
* |
| 8 |
* This program is distributed in the hope that it will be useful, |
| 9 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 |
* GNU General Public License for more details. |
| 12 |
* |
| 13 |
* You should have received a copy of the GNU General Public License |
| 14 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 |
* |
| 16 |
* Authored by: Nick Dedekind <[email protected] |
| 17 |
*/ |
| 18 |
|
| 19 |
#ifndef MOCKTELEPATHYHELPER_H |
| 20 |
#define MOCKTELEPATHYHELPER_H |
| 21 |
|
| 22 |
#include <QObject> |
| 23 |
|
| 24 |
class MockTelepathyHelper : public QObject |
| 25 |
{ |
| 26 |
Q_OBJECT |
| 27 |
Q_PROPERTY(bool ready |
| 28 |
READ ready |
| 29 |
WRITE setReady // only in mock |
| 30 |
NOTIFY readyChanged) |
| 31 |
Q_PROPERTY(bool emergencyCallsAvailable |
| 32 |
READ emergencyCallsAvailable |
| 33 |
WRITE setEmergencyCallsAvailable // only in mock |
| 34 |
NOTIFY emergencyCallsAvailableChanged) |
| 35 |
Q_DISABLE_COPY(MockTelepathyHelper) |
| 36 |
public: |
| 37 |
MockTelepathyHelper(QObject *parent = 0); |
| 38 |
|
| 39 |
static MockTelepathyHelper *instance(); |
| 40 |
|
| 41 |
Q_INVOKABLE void registerChannelObserver(const QString& name); |
| 42 |
|
| 43 |
bool ready() const; |
| 44 |
void setReady(bool value); |
| 45 |
|
| 46 |
bool emergencyCallsAvailable() const; |
| 47 |
void setEmergencyCallsAvailable(bool value); |
| 48 |
|
| 49 |
Q_SIGNALS: |
| 50 |
void readyChanged(); |
| 51 |
void emergencyCallsAvailableChanged(); |
| 52 |
|
| 53 |
private: |
| 54 |
bool m_ready; |
| 55 |
bool m_emergencyCallsAvailable; |
| 56 |
}; |
| 57 |
|
| 58 |
#endif // MOCKCONTACTWATCHER_H |