/*
* Copyright (C) 2014 Canonical, Ltd.
*
* 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; version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*
* Authored by: Nick Dedekind
#include
#include
void FakeUbuntuTelephonyQmlPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
{
Q_ASSERT(engine);
Q_UNUSED(uri);
mRootContext = engine->rootContext();
Q_ASSERT(mRootContext);
mRootContext->setContextProperty("telepathyHelper", MockTelepathyHelper::instance());
mRootContext->setContextProperty("callManager", MockCallManager::instance());
mRootContext->setContextProperty("contactWactherData", ContactWatcherData::instance());
}
void FakeUbuntuTelephonyQmlPlugin::registerTypes(const char *uri)
{
// @uri Telephony
qmlRegisterUncreatableType(uri, 0, 1, "TelepathyHelper", "This is a singleton helper class");
qmlRegisterUncreatableType(uri, 0, 1, "CallManager", "This is a singleton manager class");
qmlRegisterUncreatableType(uri, 0, 1, "ContactWatcherData", "This is a singleton data class");
qmlRegisterType(uri, 0, 1, "CallEntry");
qmlRegisterType(uri, 0, 1, "ContactWatcher");
}