package foundation.e.mail.activity;


import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;

import foundation.e.mail.Account.DeletePolicy;
import foundation.e.mail.Account.FolderMode;
import foundation.e.mail.activity.setup.CheckDirection;
import foundation.e.mail.mail.AuthType;
import foundation.e.mail.mail.ConnectionSecurity;
import foundation.e.mail.mail.MessagingException;
import foundation.e.mail.mail.NetworkType;
import foundation.e.mail.mail.Store;
import foundation.e.mail.mail.store.StoreConfig;


public interface AccountConfig extends StoreConfig {
    public ConnectionSecurity getIncomingSecurityType();
    public AuthType getIncomingAuthType();
    public String getIncomingPort();
    public ConnectionSecurity getOutgoingSecurityType();
    public AuthType getOutgoingAuthType();
    public String getOutgoingPort();
    public boolean isNotifyNewMail();
    public boolean isShowOngoing();
    public int getAutomaticCheckIntervalMinutes();
    public int getDisplayCount();
    public FolderMode getFolderPushMode();
    public String getName();
    DeletePolicy getDeletePolicy();

    void init(String email, String password);

    public String getEmail();
    public String getDescription();
    Store getRemoteStore() throws MessagingException;

    public void setName(String name);
    public void setDescription(String description);
    public void setDeletePolicy(DeletePolicy deletePolicy);
    public void setEmail(String email);
    void setCompression(NetworkType networkType, boolean useCompression);

    void addCertificate(CheckDirection direction, X509Certificate certificate) throws CertificateException;

    void setSubscribedFoldersOnly(boolean subscribedFoldersOnly);

    void deleteCertificate(String newHost, int newPort, CheckDirection direction);
}

