Commit d4b67e66 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Remove unimplement plugins

parent 59e106dd
Pipeline #111358 failed with stage
in 11 minutes and 6 seconds
......@@ -14,4 +14,3 @@ if (WIN32)
add_subdirectory(thebat)
add_subdirectory(oe)
endif()
add_subdirectory(nylas-mail)
# SPDX-FileCopyrightText: 2019-2021 Laurent Montel <montel@kde.org>
# SPDX-License-Identifier: BSD-3-Clause
kcoreaddons_add_plugin(nylasmailimporterplugin INSTALL_NAMESPACE importwizard)
target_sources(nylasmailimporterplugin PRIVATE
nylasmailsettings.cpp
nylasmaildata.cpp
nylasmailsettings.h
nylasmaildata.h
)
ecm_qt_declare_logging_category(nylasmailimporterplugin HEADER nylasmailplugin_debug.h IDENTIFIER NYLASMAILPLUGIN_LOG CATEGORY_NAME org.kde.pim.importwizard.nylasmailplugin)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(nylasmailimporterplugin PROPERTIES UNITY_BUILD ON)
endif()
target_link_libraries(nylasmailimporterplugin
KPim::ImportWizard
KF5::XmlGui
KF5::I18n
KF5::Contacts
KF5::MailImporterAkonadi
KF5::MailTransport
KF5::IdentityManagement
KF5::MailCommon
)
/*
SPDX-FileCopyrightText: 2017-2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "nylasmaildata.h"
#include "nylasmailsettings.h"
#include <MailImporter/FilterInfo>
#include <MailImporter/OtherMailerUtil>
#include "nylasmailplugin_debug.h"
#include <KPluginFactory>
#include <QDir>
K_PLUGIN_CLASS_WITH_JSON(NylasMailImportData, "nylasmailimporter.json")
NylasMailImportData::NylasMailImportData(QObject *parent, const QList<QVariant> &)
: LibImportWizard::AbstractImporter(parent)
{
mPath = MailImporter::OtherMailerUtil::nylasMailDefaultPath();
}
NylasMailImportData::~NylasMailImportData() = default;
bool NylasMailImportData::foundMailer() const
{
QDir directory(mPath);
if (directory.exists()) {
return true;
}
return false;
}
QString NylasMailImportData::name() const
{
return QStringLiteral("NylasMail");
}
bool NylasMailImportData::importMails()
{
return false;
}
bool NylasMailImportData::importSettings()
{
QDir directory(mPath);
const QStringList lstDir = directory.entryList(QDir::AllDirs);
qCDebug(NYLASMAILPLUGIN_LOG) << "Number of directory " << lstDir.count();
/*
const QString configName = QStringLiteral("NylasMail.ini");
for (int i = 0; i < lstDir.count(); ++i) {
const QString fullPath = lstDir.at(i) + QLatin1Char('/') + configName;
if (QFileInfo::exists(fullPath)) {
NylasMailSettings setting(fullPath);
setting.setAbstractDisplayInfo(mAbstractDisplayInfo);
setting.importSettings();
}
}
*/
return true;
}
bool NylasMailImportData::importAddressBook()
{
return false;
}
LibImportWizard::AbstractImporter::TypeSupportedOptions NylasMailImportData::supportedOption()
{
TypeSupportedOptions options;
// options |=LibImportWizard::AbstractImporter::Mails;
// Disable it for the moment
// options |= LibImportWizard::AbstractImporter::Settings;
// options |= LibImportWizard::AbstractImporter::AddressBooks;
return options;
}
#include "nylasmaildata.moc"
/*
SPDX-FileCopyrightText: 2017-2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include <ImportWizard/AbstractImporter>
class NylasMailImportData : public LibImportWizard::AbstractImporter
{
public:
explicit NylasMailImportData(QObject *parent, const QList<QVariant> & = QList<QVariant>());
~NylasMailImportData() override;
Q_REQUIRED_RESULT TypeSupportedOptions supportedOption() override;
Q_REQUIRED_RESULT bool foundMailer() const override;
Q_REQUIRED_RESULT bool importMails() override;
Q_REQUIRED_RESULT bool importSettings() override;
Q_REQUIRED_RESULT bool importAddressBook() override;
Q_REQUIRED_RESULT QString name() const override;
};
{
"KPlugin": {
"Id": "nylasmailimporter",
"Name": "Nylas Mail Importer",
"Name[ar]": "مستورد «بريد نايلِس»",
"Name[az]": "Nylas Mail idxalçısı",
"Name[ca@valencia]": "Importador del Nylas Mail",
"Name[ca]": "Importador del Nylas Mail",
"Name[cs]": "Importér Nylas Mail",
"Name[da]": "Nylas Mail-importør",
"Name[de]": "Import-Modul für Nylas Mail",
"Name[en_GB]": "Nylas Mail Importer",
"Name[es]": "Importador de correo Nylas",
"Name[et]": "Nylas Maili importija",
"Name[fi]": "Nylas Mail -tuonti",
"Name[fr]": "Import Nylas Mail",
"Name[gl]": "Importador de Nylas Mail",
"Name[ia]": "Importator de Nylas Mail",
"Name[it]": "Importatore da Nylas Mail",
"Name[ko]": "Nylas Mail 가져오기",
"Name[nl]": "Nylas-e-mail-importeur",
"Name[pl]": "Importer Poczty Nylas",
"Name[pt]": "Importador do Nylas Mail",
"Name[pt_BR]": "Importador do Nylas Mail",
"Name[ru]": "Импорт из Nylas Mail",
"Name[sk]": "Importér Nylas Mail",
"Name[sl]": "Uvoznik iz programa Nylas Mail",
"Name[sr@ijekavian]": "Увозник из Најласове поште",
"Name[sr@ijekavianlatin]": "Uvoznik iz Nylasove pošte",
"Name[sr@latin]": "Uvoznik iz Nylasove pošte",
"Name[sr]": "Увозник из Најласове поште",
"Name[sv]": "Nylas Mail-importverktyg",
"Name[uk]": "Засіб імпортування з Nylas",
"Name[x-test]": "xxNylas Mail Importerxx",
"Name[zh_CN]": "Nylas 邮件导入器",
"Version": "1.0"
}
}
/*
SPDX-FileCopyrightText: 2017-2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "nylasmailsettings.h"
#include <ImportWizard/ImportWizardUtil>
#include <MailTransport/TransportManager>
#include <KIdentityManagement/Identity>
#include <KIdentityManagement/Signature>
NylasMailSettings::NylasMailSettings(const QString &filename)
{
}
NylasMailSettings::~NylasMailSettings() = default;
void NylasMailSettings::importSettings()
{
readImapAccount();
readTransport();
readIdentity();
readGlobalSettings();
}
void NylasMailSettings::readImapAccount()
{
}
void NylasMailSettings::readTransport()
{
}
void NylasMailSettings::readIdentity()
{
}
void NylasMailSettings::readGlobalSettings()
{
// TODO
}
/*
SPDX-FileCopyrightText: 2017-2021 Laurent Montel <montel@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include <ImportWizard/AbstractSettings>
class NylasMailSettings : public AbstractSettings
{
public:
explicit NylasMailSettings(const QString &filename);
~NylasMailSettings() override;
void importSettings();
private:
void readImapAccount();
void readIdentity();
void readGlobalSettings();
void readTransport();
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment