Files
briar/briar-api/src/org/briarproject/api/messaging/MessagingManager.java
2016-11-08 11:17:52 -02:00

36 lines
1.2 KiB
Java

package org.briarproject.api.messaging;
import org.briarproject.api.clients.MessageTracker;
import org.briarproject.api.contact.ContactId;
import org.briarproject.api.db.DbException;
import org.briarproject.api.sync.ClientId;
import org.briarproject.api.sync.GroupId;
import org.briarproject.api.sync.MessageId;
import java.util.Collection;
public interface MessagingManager extends MessageTracker {
/** The unique ID of the messaging client. */
ClientId CLIENT_ID = new ClientId("org.briarproject.briar.messaging");
/** Stores a local private message. */
void addLocalMessage(PrivateMessage m) throws DbException;
/** Returns the ID of the contact with the given private conversation. */
ContactId getContactId(GroupId g) throws DbException;
/** Returns the ID of the private conversation with the given contact. */
GroupId getConversationId(ContactId c) throws DbException;
/**
* Returns the headers of all messages in the given private conversation.
*/
Collection<PrivateMessageHeader> getMessageHeaders(ContactId c)
throws DbException;
/** Returns the body of the private message with the given ID. */
String getMessageBody(MessageId m) throws DbException;
}