Add deleteMessages() method to Backend interface
This commit is contained in:
parent
f814e4dd17
commit
91e5f629fd
4 changed files with 17 additions and 0 deletions
|
@ -44,6 +44,9 @@ interface Backend {
|
|||
@Throws(MessagingException::class)
|
||||
fun expungeMessages(folderServerId: String, messageServerIds: List<String>)
|
||||
|
||||
@Throws(MessagingException::class)
|
||||
fun deleteMessages(folderServerId: String, messageServerIds: List<String>)
|
||||
|
||||
@Throws(MessagingException::class)
|
||||
fun deleteAllMessages(folderServerId: String)
|
||||
|
||||
|
|
|
@ -146,6 +146,12 @@ public class ImapBackend implements Backend {
|
|||
commandExpunge.expungeMessages(folderServerId, messageServerIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteMessages(@NotNull String folderServerId, @NotNull List<String> messageServerIds)
|
||||
throws MessagingException {
|
||||
commandSetFlag.setFlag(folderServerId, messageServerIds, Flag.DELETED, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteAllMessages(@NotNull String folderServerId) throws MessagingException {
|
||||
commandDeleteAll.deleteAll(folderServerId);
|
||||
|
|
|
@ -65,6 +65,10 @@ class Pop3Backend(
|
|||
throw UnsupportedOperationException("not supported")
|
||||
}
|
||||
|
||||
override fun deleteMessages(folderServerId: String, messageServerIds: List<String>) {
|
||||
commandSetFlag.setFlag(folderServerId, messageServerIds, Flag.DELETED, true)
|
||||
}
|
||||
|
||||
override fun deleteAllMessages(folderServerId: String) {
|
||||
commandDeleteAll.deleteAll(folderServerId)
|
||||
}
|
||||
|
|
|
@ -70,6 +70,10 @@ class WebDavBackend(
|
|||
throw UnsupportedOperationException("not supported")
|
||||
}
|
||||
|
||||
override fun deleteMessages(folderServerId: String, messageServerIds: List<String>) {
|
||||
commandSetFlag.setFlag(folderServerId, messageServerIds, Flag.DELETED, true)
|
||||
}
|
||||
|
||||
override fun deleteAllMessages(folderServerId: String) {
|
||||
commandDeleteAll.deleteAll(folderServerId)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue