mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
[core] Add API to add messages with attachments
This commit is contained in:
@@ -8,6 +8,8 @@ import org.briarproject.bramble.api.sync.GroupId;
|
||||
import org.briarproject.bramble.api.sync.MessageId;
|
||||
import org.briarproject.briar.api.conversation.ConversationManager.ConversationClient;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
@NotNullByDefault
|
||||
public interface MessagingManager extends ConversationClient {
|
||||
|
||||
@@ -31,6 +33,12 @@ public interface MessagingManager extends ConversationClient {
|
||||
*/
|
||||
void addLocalMessage(PrivateMessage m) throws DbException;
|
||||
|
||||
/**
|
||||
* Stores a local attachment message.
|
||||
*/
|
||||
AttachmentHeader addLocalAttachment(GroupId groupId, long timestamp,
|
||||
String contentType, ByteBuffer data) throws DbException;
|
||||
|
||||
/**
|
||||
* Returns the ID of the contact with the given private conversation.
|
||||
*/
|
||||
|
||||
@@ -4,10 +4,13 @@ import org.briarproject.bramble.api.FormatException;
|
||||
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
|
||||
import org.briarproject.bramble.api.sync.GroupId;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@NotNullByDefault
|
||||
public interface PrivateMessageFactory {
|
||||
|
||||
PrivateMessage createPrivateMessage(GroupId groupId, long timestamp,
|
||||
String text) throws FormatException;
|
||||
String text, List<AttachmentHeader> attachments)
|
||||
throws FormatException;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user