1 package org.columba.mail.imap; 2 3 import java.io.IOException ; 4 import java.io.InputStream ; 5 import java.util.List ; 6 import java.util.Observable ; 7 8 import org.columba.api.command.IStatusObservable; 9 import org.columba.core.command.CommandCancelledException; 10 import org.columba.core.filter.FilterRule; 11 import org.columba.core.filter.IFilterRule; 12 import org.columba.mail.config.ImapItem; 13 import org.columba.mail.folder.command.MarkMessageCommand; 14 import org.columba.mail.folder.imap.IMAPFolder; 15 import org.columba.mail.message.IHeaderList; 16 import org.columba.ristretto.imap.IMAPException; 17 import org.columba.ristretto.imap.IMAPFlags; 18 import org.columba.ristretto.imap.ListInfo; 19 import org.columba.ristretto.imap.MailboxStatus; 20 import org.columba.ristretto.imap.NamespaceCollection; 21 import org.columba.ristretto.imap.SearchKey; 22 import org.columba.ristretto.imap.SequenceSet; 23 import org.columba.ristretto.message.Header; 24 import org.columba.ristretto.message.MailboxInfo; 25 import org.columba.ristretto.message.MimePart; 26 import org.columba.ristretto.message.MimeTree; 27 28 public interface IImapServer { 29 30 37 public String getDelimiter() throws IOException , IMAPException, 38 CommandCancelledException; 39 40 45 public void logout() throws Exception ; 46 47 public List checkSupportedAuthenticationMethods() throws IOException ; 48 49 53 public boolean isSupported(String command) throws IOException ; 54 55 public void setFirstLoginAction(IFirstLoginAction action); 56 57 66 public void ensureSelectedState(IMAPFolder folder) throws IOException , 67 IMAPException, CommandCancelledException; 68 69 public MailboxStatus getStatus(IMAPFolder folder) throws IOException , 70 IMAPException, CommandCancelledException; 71 72 80 public ListInfo[] list(String reference, String pattern) throws Exception ; 81 82 92 public Integer append(InputStream messageSource, IMAPFlags flags, 93 IMAPFolder folder) throws Exception ; 94 95 105 public Integer append(InputStream messageSource, IMAPFolder folder) 106 throws Exception ; 107 108 117 public void createMailbox(String mailboxName, IMAPFolder folder) 118 throws IOException , IMAPException, CommandCancelledException; 119 120 128 public void deleteFolder(String path) throws Exception ; 129 130 140 public void renameFolder(String oldMailboxName, String newMailboxName) 141 throws IOException , IMAPException, CommandCancelledException; 142 143 151 public void subscribeFolder(String mailboxName) throws IOException , 152 IMAPException, CommandCancelledException; 153 154 162 public void unsubscribeFolder(String mailboxName) throws IOException , 163 IMAPException, CommandCancelledException; 164 165 175 public void expunge(IMAPFolder folder) throws IOException , IMAPException, 176 CommandCancelledException; 177 178 194 public Integer [] copy(IMAPFolder destFolder, Object [] uids, 195 IMAPFolder folder) throws Exception ; 196 197 207 public int fetchUid(SequenceSet set, IMAPFolder folder) throws IOException , 208 IMAPException, CommandCancelledException; 209 210 219 public Integer [] fetchUids(SequenceSet set, IMAPFolder folder) 220 throws IOException , IMAPException, CommandCancelledException; 221 222 231 public IMAPFlags[] fetchFlagsListStartFrom(int startIdx, IMAPFolder folder) 232 throws IOException , IMAPException, CommandCancelledException; 233 234 243 public IMAPFlags[] fetchFlagsListStartFrom2(int startIdx, IMAPFolder folder) 244 throws IOException , IMAPException, CommandCancelledException; 245 246 public NamespaceCollection fetchNamespaces() throws IOException , 247 IMAPException, CommandCancelledException; 248 249 264 public void fetchHeaderList(IHeaderList headerList, List list, 265 IMAPFolder folder) throws Exception ; 266 267 277 public MimeTree getMimeTree(Object uid, IMAPFolder folder) 278 throws IOException , IMAPException, CommandCancelledException; 279 280 295 public InputStream getMimePartBodyStream(Object uid, Integer [] address, 296 IMAPFolder folder) throws IOException , IMAPException, 297 CommandCancelledException; 298 299 314 public Header getHeaders(Object uid, String [] keys, IMAPFolder folder) 315 throws IOException , IMAPException, CommandCancelledException; 316 317 330 public Header getAllHeaders(Object uid, IMAPFolder folder) 331 throws IOException , IMAPException, CommandCancelledException; 332 333 348 public InputStream getMimePartSourceStream(Object uid, Integer [] address, 349 IMAPFolder folder) throws IOException , IMAPException, 350 CommandCancelledException; 351 352 365 public InputStream getMessageSourceStream(Object uid, IMAPFolder folder) 366 throws IOException , IMAPException, CommandCancelledException; 367 368 385 public void markMessage(Object [] uids, int variant, IMAPFolder folder) 386 throws IOException , IMAPException, CommandCancelledException; 387 388 public void setFlags(Object [] uids, IMAPFlags flags, IMAPFolder folder) 389 throws IOException , IMAPException, CommandCancelledException; 390 391 403 public List search(Object [] uids, IFilterRule filterRule, IMAPFolder folder) 404 throws Exception ; 405 406 public int getIndex(Integer uid, IMAPFolder folder) throws IOException , 407 IMAPException, CommandCancelledException; 408 409 public Integer [] search(SearchKey key, IMAPFolder folder) 410 throws IOException , IMAPException, CommandCancelledException; 411 412 422 public List search(IFilterRule filterRule, IMAPFolder folder) 423 throws IOException , IMAPException, CommandCancelledException; 424 425 433 public MailboxInfo getMessageFolderInfo(IMAPFolder folder) 434 throws IOException , IMAPException, CommandCancelledException; 435 436 439 public ListInfo[] fetchSubscribedFolders() throws IOException , 440 IMAPException, CommandCancelledException; 441 442 449 public boolean isSelected(IMAPFolder folder) throws IOException , 450 IMAPException, CommandCancelledException; 451 452 455 public void alertMessage(String arg0); 456 457 461 public void connectionClosed(String arg0, String arg1); 462 463 467 public void existsChanged(String arg0, int arg1); 468 469 473 public void flagsChanged(String arg0, IMAPFlags arg1); 474 475 478 public void parseError(String arg0); 479 480 484 public void recentChanged(String arg0, int arg1); 485 486 489 public void warningMessage(String arg0); 490 491 494 public ImapItem getItem(); 495 496 public void update(Observable o, Object arg); 497 498 501 public void setExistsChangedAction(IExistsChangedAction existsChangedAction); 502 503 506 public void setUpdateFlagAction(IUpdateFlagAction updateFlagAction); 507 508 511 public void setObservable(IStatusObservable observable); 512 513 514 public int getLargestRemoteUid(IMAPFolder folder) throws IOException , IMAPException, CommandCancelledException; 515 516 } | Popular Tags |