/*-------------------------------------------------------------------------*/
/**
 [Project ]: 프레임웍 기반 그룹웨어 시제품 개발
 
 [Date] : 1999. 9. 3
 [Source file]: com/etri/groupware/mail/MailControllerInterface.java
 [Vesion] : 1.0
 */
/*--------------------------------------------------------------------------*/

package com.etri.groupware.mail;

import javax.mail.*;
import com.etri.groupware.ResultStatus;


public interface MailControllerInterface {
	
	public void connectMailServer(String host, String id, String password) throws Exception;
	public void disconnectMailServer() throws Exception;
 
    /**
       @roseuid 37C1CAB901DA
     */
    public ResultStatus sendMail( MailInfo mi) throws Exception ;
    
    public ResultStatus sendMail( MailInfo mi, String id, String password) throws Exception ;
    
    /**
       @roseuid 37C1F05203E3
     */
    public Message[] receiveMail() throws Exception ;
    
    /**
       @roseuid 37C1DF570099
     */
    public Message[] receiveMail( String srcFolder) throws Exception ;
    
    /**
       @roseuid 37C1E08E0032
     */
    public Message[] receiveMail( String srcFolder,  int fromIndex,  int endIndex) throws Exception ;
    
    /**
       @roseuid 37C1DF60010A
     */
    public ResultStatus moveMail( String srcFolder,  String dstFolder,  int mailNum) throws Exception ;
    
    /**
       @roseuid 37CEDDA20173
     */
    public ResultStatus moveMail( String srcFolder,  String dstFolder,  int fromIndex,  int endIndex) throws Exception ;
    
    /**
       @roseuid 37C1DF6A024F
     */
    public ResultStatus addMail( String srcFolder,  Message msg) throws Exception ;
    
    /**
       @roseuid 37C1DF780303
     */
    public ResultStatus removeMail( String srcFolder,  int num) throws Exception ;
    
    /**
       @roseuid 37CEDDC40244
     */
    public ResultStatus removeMail( String srcFolder,  int fromIndex,  int endIndex) throws Exception ;
    
    /**
       @roseuid 37C1DF8702A1
     */
    public ResultStatus copyMail( String srcFolder,  String dstFolder,  int MailNum) throws Exception ;
    
    /**
       @roseuid 37CEDD9702F3
     */
    public ResultStatus copyMail( String srcFolder,  String dstFolder,  int fromIndex,  int endIndex) throws Exception ;
    
    /**
       @roseuid 37C1DF90016D
     */
    public Message[] searchMail( String srcFolder,  SearchData st) throws Exception ;
	
	public  ReceiveMailServerManagerInterface createReceiveMailServerManager(String host, String id, String password) throws Exception; 
	
	 public MailSenderInterface createMailSender(String protocol, String host);

}