/* Copyright (C) 2016 - 2017 Dan Chapman This file is part of Dekko email client for Ubuntu devices 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; either version 2 of the License or (at your option) 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 . */ #include "MailPlugin.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include "qmlenums.h" void MailPlugin::registerTypes(const char *uri) { Q_ASSERT(uri == QLatin1String("Dekko.Mail")); // @uri Dekko.Mail qmlRegisterType(uri, 1, 0, "Folder"); qmlRegisterType(uri, 1, 0, "FolderList"); qmlRegisterType(uri, 1, 0, "MessageFilterCollection"); qmlRegisterType(uri, 1, 0, "MessageList"); qmlRegisterType(uri, 1, 0, "MinimalMessage"); qmlRegisterType(uri, 1, 0, "MailAddress"); qmlRegisterType(uri, 1, 0, "Message"); qmlRegisterType(uri, 1, 0, "MailboxSearch"); qmlRegisterType(uri, 1, 0, "SenderIdentities"); qmlRegisterType(uri, 1, 0, "MessageBuilder"); qmlRegisterType(uri, 1, 0, "SubmissionManager"); qmlRegisterUncreatableType(uri, 1, 0, "MessageSet", "Cannot create MessageSet from QML, c++ only chap!"); qmlRegisterUncreatableType(uri, 1, 0, "StandardFolderSet", "Cannot create MessageSet from QML, c++ only chap!"); qmlRegisterUncreatableType(uri, 1, 0, "SmartFolderSet", "Cannot create SmartFolderSet from QML, c++ only chap!"); qmlRegisterUncreatableType(uri, 1, 0, "SearchService", "Cannot create SearchService from QML, c++ only chap!"); qmlRegisterSingletonType(uri, 1, 0, "Client", Client::factory); qmlRegisterUncreatableType(uri, 1, 0, "RecipientType", "Cannot create an instance in QML"); } void MailPlugin::initializeEngine(QQmlEngine *engine, const char *uri) { QQmlExtensionPlugin::initializeEngine(engine, uri); }