treewide: Removed unused Yahoo imap engine

This is not useful now we have autoconfig support
This commit is contained in:
Cédric Bellegarde 2022-08-25 23:16:22 +02:00
parent a14f5d4799
commit ddb8a273ce
9 changed files with 1 additions and 109 deletions

View file

@ -329,10 +329,6 @@ private class Accounts.AccountListRow : AccountRow<EditorListPane,Gtk.Grid> {
details = _("Outlook.com");
break;
case Geary.ServiceProvider.YAHOO:
details = _("Yahoo");
break;
case Geary.ServiceProvider.OTHER:
// no-op: Use the generated label
break;

View file

@ -283,10 +283,6 @@ internal class Accounts.ServiceProviderRow<PaneType> :
label = _("Outlook.com");
break;
case Geary.ServiceProvider.YAHOO:
label = _("Yahoo");
break;
case Geary.ServiceProvider.OTHER:
label = other_type_label;
break;

View file

@ -115,7 +115,6 @@ internal class Accounts.EditorServersPane :
this.account, this.commands, this.op_cancellable
);
switch (account.service_provider) {
case YAHOO:
case OTHER:
add_row(this.details_list, this.save_sent);
break;

View file

@ -218,26 +218,17 @@ public class Geary.Engine : BaseObject {
);
break;
case ServiceProvider.YAHOO:
account = new ImapEngine.YahooAccount(
config, local, incoming_remote, outgoing_remote
);
break;
case ServiceProvider.OUTLOOK:
account = new ImapEngine.OutlookAccount(
config, local, incoming_remote, outgoing_remote
);
break;
case ServiceProvider.OTHER:
default:
account = new ImapEngine.OtherAccount(
config, local, incoming_remote, outgoing_remote
);
break;
default:
assert_not_reached();
}
config.notify["ordinal"].connect(on_account_ordinal_changed);

View file

@ -12,7 +12,6 @@
public enum Geary.ServiceProvider {
GMAIL,
YAHOO,
OUTLOOK,
OTHER;
@ -34,9 +33,6 @@ public enum Geary.ServiceProvider {
case GMAIL:
ImapEngine.GmailAccount.setup_account(service);
break;
case YAHOO:
ImapEngine.YahooAccount.setup_account(service);
break;
case OUTLOOK:
ImapEngine.OutlookAccount.setup_account(service);
break;
@ -51,9 +47,6 @@ public enum Geary.ServiceProvider {
case GMAIL:
ImapEngine.GmailAccount.setup_service(service);
break;
case YAHOO:
ImapEngine.YahooAccount.setup_service(service);
break;
case OUTLOOK:
ImapEngine.OutlookAccount.setup_service(service);
break;

View file

@ -1,60 +0,0 @@
/*
* Copyright 2016 Software Freedom Conservancy Inc.
* Copyright 2019 Michael Gratton <mike@vee.net>
*
* This software is licensed under the GNU Lesser General Public License
* (version 2.1 or later). See the COPYING file in this distribution.
*/
private class Geary.ImapEngine.YahooAccount : Geary.ImapEngine.GenericAccount {
public static void setup_account(AccountInformation account) {
// noop
}
public static void setup_service(ServiceInformation service) {
switch (service.protocol) {
case Protocol.IMAP:
service.host = "imap.mail.yahoo.com";
service.port = Imap.IMAP_TLS_PORT;
service.transport_security = TlsNegotiationMethod.TRANSPORT;
break;
case Protocol.SMTP:
service.host = "smtp.mail.yahoo.com";
service.port = Smtp.SUBMISSION_TLS_PORT;
service.transport_security = TlsNegotiationMethod.TRANSPORT;
break;
}
}
public YahooAccount(AccountInformation config,
ImapDB.Account local,
Endpoint incoming_remote,
Endpoint outgoing_remote) {
base(config, local, incoming_remote, outgoing_remote);
}
protected override MinimalFolder new_folder(ImapDB.Folder local_folder) {
FolderPath path = local_folder.get_path();
Folder.SpecialUse use = NONE;
if (Imap.MailboxSpecifier.folder_path_is_inbox(path)) {
use = INBOX;
} else {
// Despite Yahoo not advertising that it supports
// SPECIAL-USE via its CAPABILITIES, it lists the
// appropriate attributes in LIST results anyway, so we
// can just consult that. :|
use = local_folder.get_properties().attrs.get_special_use();
// There can be only one Inbox
if (use == INBOX) {
use = NONE;
}
}
return new YahooFolder(this, local_folder, use);
}
}

View file

@ -1,13 +0,0 @@
/* Copyright 2016 Software Freedom Conservancy Inc.
*
* This software is licensed under the GNU Lesser General Public License
* (version 2.1 or later). See the COPYING file in this distribution.
*/
private class Geary.ImapEngine.YahooFolder : GenericFolder {
public YahooFolder(YahooAccount account,
ImapDB.Folder local_folder,
Folder.SpecialUse use) {
base (account, local_folder, use);
}
}

View file

@ -222,8 +222,6 @@ engine_vala_sources = files(
'imap-engine/replay-ops/imap-engine-replay-update.vala',
'imap-engine/replay-ops/imap-engine-server-search-email.vala',
'imap-engine/replay-ops/imap-engine-user-close.vala',
'imap-engine/yahoo/imap-engine-yahoo-account.vala',
'imap-engine/yahoo/imap-engine-yahoo-folder.vala',
'memory/memory-buffer.vala',
'memory/memory-byte-buffer.vala',

View file

@ -41,14 +41,6 @@ class Geary.AccountInformationTest : TestCase {
new RFC822.MailboxAddress(null, "test1@example.com")
).save_sent
);
assert_true(
new AccountInformation(
"test",
ServiceProvider.YAHOO,
new Mock.CredentialsMediator(),
new RFC822.MailboxAddress(null, "test1@example.com")
).save_sent
);
}
public void test_sender_mailboxes() throws GLib.Error {