mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-11 18:29:05 +01:00
Add ConversationManager method for deleting all messages
Note that this does not yet delete special conversation messages such as invitations or introductions and their responses.
This commit is contained in:
@@ -24,7 +24,7 @@ public interface ConversationManager {
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
@@ -36,6 +36,13 @@ public interface ConversationManager {
|
||||
*/
|
||||
GroupCount getGroupCount(ContactId c) throws DbException;
|
||||
|
||||
/**
|
||||
* Deletes all messages exchanged with the given contact.
|
||||
*
|
||||
* @return true if all messages could be deleted, false otherwise
|
||||
*/
|
||||
boolean deleteAllMessages(ContactId c) throws DbException;
|
||||
|
||||
@NotNullByDefault
|
||||
interface ConversationClient {
|
||||
|
||||
@@ -49,6 +56,14 @@ public interface ConversationManager {
|
||||
|
||||
void setReadFlag(GroupId g, MessageId m, boolean read)
|
||||
throws DbException;
|
||||
|
||||
/**
|
||||
* Deletes all messages associated with the given contact.
|
||||
*
|
||||
* @return true if all messages could be deleted, false otherwise
|
||||
*/
|
||||
boolean deleteAllMessages(Transaction txn,
|
||||
ContactId c) throws DbException;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user