Remove unused plumbing to check server settings

This commit is contained in:
cketti 2024-02-10 23:52:33 +01:00
parent 98f0d4ffa4
commit 046d892fe4
6 changed files with 0 additions and 45 deletions

View file

@ -1688,16 +1688,6 @@ public class MessagingController {
return getBackend(account).getSupportsFolderSubscriptions();
}
@Deprecated
public void checkIncomingServerSettings(Account account) throws MessagingException {
getBackend(account).checkIncomingServerSettings();
}
@Deprecated
public void checkOutgoingServerSettings(Account account) throws MessagingException {
getBackend(account).checkOutgoingServerSettings();
}
public void moveMessages(Account srcAccount, long srcFolderId,
List<MessageReference> messageReferences, long destFolderId) {
actOnMessageGroup(srcAccount, srcFolderId, messageReferences, (account, messageFolder, messages) -> {

View file

@ -89,14 +89,8 @@ interface Backend {
@Throws(MessagingException::class)
fun uploadMessage(folderServerId: String, message: Message): String?
@Throws(MessagingException::class)
fun checkIncomingServerSettings()
@Throws(MessagingException::class)
fun sendMessage(message: Message)
@Throws(MessagingException::class)
fun checkOutgoingServerSettings()
fun createPusher(callback: BackendPusherCallback): BackendPusher
}

View file

@ -161,10 +161,6 @@ class DemoBackend(private val backendStorage: BackendStorage) : Backend {
return createNewServerId()
}
override fun checkIncomingServerSettings() = Unit
override fun checkOutgoingServerSettings() = Unit
override fun sendMessage(message: Message) {
val inboxServerId = messageStoreInfo.filterValues { it.type == FolderType.INBOX }.keys.first()
val backendFolder = backendStorage.getFolder(inboxServerId)

View file

@ -145,18 +145,10 @@ class ImapBackend(
return commandUploadMessage.uploadMessage(folderServerId, message)
}
override fun checkIncomingServerSettings() {
imapStore.checkSettings()
}
override fun sendMessage(message: Message) {
smtpTransport.sendMessage(message)
}
override fun checkOutgoingServerSettings() {
smtpTransport.checkSettings()
}
override fun createPusher(callback: BackendPusherCallback): BackendPusher {
return ImapBackendPusher(imapStore, powerManager, idleRefreshManager, pushConfigProvider, callback, accountName)
}

View file

@ -15,7 +15,6 @@ import okhttp3.OkHttpClient
import rs.ltt.jmap.client.JmapClient
import rs.ltt.jmap.client.http.BasicAuthHttpAuthentication
import rs.ltt.jmap.client.http.HttpAuthentication
import rs.ltt.jmap.common.method.call.core.EchoMethodCall
class JmapBackend(
backendStorage: BackendStorage,
@ -134,18 +133,10 @@ class JmapBackend(
return commandUpload.uploadMessage(folderServerId, message)
}
override fun checkIncomingServerSettings() {
jmapClient.call(EchoMethodCall()).get()
}
override fun sendMessage(message: Message) {
throw UnsupportedOperationException("not implemented")
}
override fun checkOutgoingServerSettings() {
checkIncomingServerSettings()
}
override fun createPusher(callback: BackendPusherCallback): BackendPusher {
throw UnsupportedOperationException("not implemented")
}

View file

@ -124,18 +124,10 @@ class Pop3Backend(
throw UnsupportedOperationException("not supported")
}
override fun checkIncomingServerSettings() {
pop3Store.checkSettings()
}
override fun sendMessage(message: Message) {
smtpTransport.sendMessage(message)
}
override fun checkOutgoingServerSettings() {
smtpTransport.checkSettings()
}
override fun createPusher(callback: BackendPusherCallback): BackendPusher {
throw UnsupportedOperationException("not implemented")
}