mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-11 18:29:05 +01:00
add transactional versions to introductionManager and privateGroupManager
This commit is contained in:
@@ -29,6 +29,12 @@ public interface IntroductionManager extends ConversationClient {
|
||||
*/
|
||||
boolean canIntroduce(Contact c1, Contact c2) throws DbException;
|
||||
|
||||
/**
|
||||
* Returns true if both contacts can be introduced at this moment.
|
||||
*/
|
||||
boolean canIntroduce(Transaction txn, Contact c1, Contact c2)
|
||||
throws DbException;
|
||||
|
||||
/**
|
||||
* The current minor version of the introduction client.
|
||||
*/
|
||||
@@ -40,6 +46,12 @@ public interface IntroductionManager extends ConversationClient {
|
||||
void makeIntroduction(Contact c1, Contact c2, @Nullable String text)
|
||||
throws DbException;
|
||||
|
||||
/**
|
||||
* Sends two initial introduction messages.
|
||||
*/
|
||||
void makeIntroduction(Transaction txn, Contact c1, Contact c2,
|
||||
@Nullable String text) throws DbException;
|
||||
|
||||
/**
|
||||
* Responds to an introduction.
|
||||
*/
|
||||
|
||||
@@ -52,11 +52,21 @@ public interface PrivateGroupManager {
|
||||
void addPrivateGroup(Transaction txn, PrivateGroup group,
|
||||
GroupMessage joinMsg, boolean creator) throws DbException;
|
||||
|
||||
/**
|
||||
* Removes a dissolved private group.
|
||||
*/
|
||||
void removePrivateGroup(Transaction txn, GroupId g) throws DbException;
|
||||
|
||||
/**
|
||||
* Removes a dissolved private group.
|
||||
*/
|
||||
void removePrivateGroup(GroupId g) throws DbException;
|
||||
|
||||
/**
|
||||
* Returns the ID of the user's previous message sent to the group
|
||||
*/
|
||||
MessageId getPreviousMsgId(Transaction txn, GroupId g) throws DbException;
|
||||
|
||||
/**
|
||||
* Returns the ID of the user's previous message sent to the group
|
||||
*/
|
||||
@@ -112,7 +122,8 @@ public interface PrivateGroupManager {
|
||||
/**
|
||||
* Returns true if the given private group was created by us.
|
||||
*/
|
||||
boolean isOurPrivateGroup(Transaction txn, PrivateGroup g) throws DbException;
|
||||
boolean isOurPrivateGroup(Transaction txn, PrivateGroup g)
|
||||
throws DbException;
|
||||
|
||||
/**
|
||||
* Returns the text of the private group message with the given ID.
|
||||
@@ -161,6 +172,12 @@ public interface PrivateGroupManager {
|
||||
*/
|
||||
GroupCount getGroupCount(GroupId g) throws DbException;
|
||||
|
||||
/**
|
||||
* Marks a message as read or unread and updates the group count.
|
||||
*/
|
||||
void setReadFlag(Transaction txn, GroupId g, MessageId m, boolean read)
|
||||
throws DbException;
|
||||
|
||||
/**
|
||||
* Marks a message as read or unread and updates the group count.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user