mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-11 18:29:05 +01:00
add transactional versions of some API calls
This commit is contained in:
@@ -38,6 +38,15 @@ public interface ConversationManager {
|
||||
Collection<ConversationMessageHeader> getMessageHeaders(ContactId c)
|
||||
throws DbException;
|
||||
|
||||
/**
|
||||
* Returns the headers of all messages in the given private conversation.
|
||||
* <p>
|
||||
* Only {@link MessagingManager} returns only headers.
|
||||
* The others also return the message text.
|
||||
*/
|
||||
Collection<ConversationMessageHeader> getMessageHeaders(Transaction txn, ContactId c)
|
||||
throws DbException;
|
||||
|
||||
/**
|
||||
* Returns the unified group count for all private conversation messages.
|
||||
*/
|
||||
@@ -72,6 +81,9 @@ public interface ConversationManager {
|
||||
void setReadFlag(GroupId g, MessageId m, boolean read)
|
||||
throws DbException;
|
||||
|
||||
void setReadFlag(Transaction txn, GroupId g, MessageId m, boolean read)
|
||||
throws DbException;
|
||||
|
||||
/**
|
||||
* Returns a timestamp for an outgoing message, which is later than the
|
||||
* timestamp of any message in the conversation with the given contact.
|
||||
|
||||
@@ -74,6 +74,13 @@ public interface MessagingManager extends ConversationClient {
|
||||
@Nullable
|
||||
String getMessageText(MessageId m) throws DbException;
|
||||
|
||||
/**
|
||||
* Returns the text of the private message with the given ID, or null if
|
||||
* the private message has no text.
|
||||
*/
|
||||
@Nullable
|
||||
String getMessageText(Transaction txn, MessageId m) throws DbException;
|
||||
|
||||
/**
|
||||
* Returns the private message format supported by the given contact.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user