package org.ros.chatto.service;

import java.util.List;

import org.ros.chatto.dto.ChatMessageDTO;
import org.ros.chatto.dto.MessageCipherDTO;
import org.ros.chatto.dto.ReencryptionDTO;
import java.time.Instant;

public interface ChatService {
	public ChatMessageDTO createMessage(String fromUser, String toUser,
			MessageCipherDTO messageCipherDTO);

	public List<ChatMessageDTO> getAllMessages(String fromUser, String toUser);

	public List<ChatMessageDTO> getMessagePage(String fromUser, String toUser,
			int page, int size);

	public List<ChatMessageDTO> getNewMessages(String fromUser, String toUser,
			Instant lastMessageTime);

	public void reencryptMessages(List<ReencryptionDTO> reencryptionDTOs);

	public List<ReencryptionDTO> getAllMessagesForReencryption(String fromUser,
			String toUser);
}
