DS-Lab / src / main / java / dslab / protocol / dmap / Dmap.java
Dmap.java
Raw
package dslab.protocol.dmap;

import dslab.authentication.AuthenticationException;
import dslab.mailbox.MessageNotFoundException;
import dslab.protocol.Message;
import dslab.protocol.Protocol;

import java.util.List;

public interface Dmap extends Protocol {

    default String getName(){
        return "DMAP2.0";
    }

    void login(String username, String password) throws AuthenticationException;

    void logout() throws AuthenticationException;

    void quit();

    void delete(Integer id) throws AuthenticationException, MessageNotFoundException;

    Message show(Integer id) throws AuthenticationException, MessageNotFoundException;

    List<MessageMetadata> list() throws AuthenticationException;
}