Commit Graph

41 Commits

Author SHA1 Message Date
Torsten Grote
e690bcb3cc Add introduced contacts as UNVERIFIED
Closes #580
2016-08-19 12:31:00 -03:00
Torsten Grote
59320f02b7 Remove MAX_GROUP_DESCRIPTOR_LENGTH
Closes #441
2016-06-22 11:47:38 -03:00
Torsten Grote
b03d0a206b Add Message Dependencies to Database
This adds a new table to the database to hold message dependencies.
It introduces two more message states: pending and delivered
The valid column in the database was renamed to state to better reflect
its new extended meaning.

The DatabaseComponent was extended with three methods for:
* adding dependencies
* getting dependencies of a message
* getting messages that depend on a message (dependents)
* getting messages to be delivered (by startup hook)
* getting pending messages to be possibly delivered (by startup hook)

In order to reflect the new states, things that were previously true for
VALID messages have been changed to now be true for DELIVERED messages.

Since pending messages should not be available to clients, many database
queries have been modified to only return results for delivered
messages.

All added methods and changes should come with updated unit tests.

Please note that the database version was bumped in this commit.
2016-05-26 13:49:03 -03:00
akwizgran
f2ab0eff53 Simple metadata queries. #222
Added support for retrieving metadata that matches all key/value pairs in a query.
2016-05-12 17:40:11 +01:00
akwizgran
40022b8326 Don't allow local identities to be added as contacts. 2016-04-11 13:24:25 +01:00
akwizgran
205dc66572 Test cleanup. #280 2016-04-05 14:19:10 +01:00
akwizgran
7e3d3625aa Don't allow reentrant transactions.
The database's transaction lock is reentrant, meaning that a thread that's already holding the lock can acquire it again. This would allow a thread that already has a transaction in progress to start another transaction, which could cause transaction isolation issues and/or lock timeouts on the database's internal locks.

Check that the current thread isn't already holding the lock when starting a transaction.
2016-03-31 11:02:52 +01:00
akwizgran
1855dbbd2d Use a lock to ensure transaction isolation. #272 2016-03-28 13:52:12 +01:00
akwizgran
8a20f330be Broadcast status event when active contact is added. 2016-02-19 12:10:44 +00:00
akwizgran
a6baa5821e Added active flag to contacts. 2016-02-17 18:10:52 +00:00
akwizgran
6b76b75d08 More efficient database joins.
Don't keep message status rows for groups that are invisible to the contact - this avoids the need to join the groupVisibilities table when selecting messages to offer or send. Add or remove status rows when group visibility changes.
2016-02-17 17:24:44 +00:00
akwizgran
9f8baab60f Code cleanup. 2016-02-11 16:26:23 +00:00
akwizgran
074892b677 StorageStatus is no longer needed. 2016-02-11 16:26:23 +00:00
akwizgran
146dac056d Broadcast events after committing transactions. 2016-02-11 16:26:22 +00:00
akwizgran
de8cc50fb4 Moved transactions out of database component. 2016-02-11 16:26:19 +00:00
akwizgran
ef2b2b9710 Removed unneeded visibility methods. 2016-02-11 16:21:53 +00:00
akwizgran
3fa1bbe33e Expose transactions through DatabaseComponent interface. 2016-02-11 16:21:53 +00:00
akwizgran
a91d500263 Added method for deleting metadata. 2016-02-10 14:01:55 +00:00
akwizgran
18db17bf5b Moved subscription updates to the client layer. 2016-02-10 10:47:30 +00:00
akwizgran
225d0ebeef DB interface cleanup, removed unnecessary exceptions. 2016-02-10 10:47:29 +00:00
akwizgran
3837efca6b Updated group-related events and exceptions. 2016-02-10 10:47:26 +00:00
akwizgran
9fdc510843 Removed SubscriptionUpdate and SubscriptionAck. 2016-02-10 10:46:41 +00:00
akwizgran
3d948ed461 Don't broadcast an event unless settings have changed. 2016-02-08 11:17:45 +00:00
akwizgran
e76aef3dc8 Unshared messages. 2016-01-29 13:45:22 +00:00
akwizgran
0fd8a67ee0 Allow multiple identities to have the same contact. #224 2016-01-28 15:57:22 +00:00
akwizgran
cd175fd119 Removed TransportUpdate and TransportAck. 2016-01-27 12:51:54 +00:00
akwizgran
88a8081351 Metadata for groups. #221 2016-01-20 15:03:42 +00:00
akwizgran
281ca734e3 Addressed issues from code review. 2016-01-20 14:43:47 +00:00
akwizgran
c4692a7007 Identity manager hooks. #209 2016-01-20 14:43:47 +00:00
akwizgran
82cf12040f Contact manager hooks. #209 2016-01-20 14:43:46 +00:00
akwizgran
77054cbae7 Small improvements to DB interface. 2016-01-20 10:35:14 +00:00
akwizgran
5355951466 Separate the sync layer from its clients. #112 2016-01-20 10:35:09 +00:00
Santiago Torres
190bb12964 ENH: Replaces transport config with namespaced settings 2016-01-20 00:57:16 -05:00
akwizgran
c5282c5b17 Moved some API classes into packages. 2015-12-17 16:56:57 +00:00
akwizgran
60a5b28e57 Renamed DatabaseComponentTest. 2015-12-16 12:17:38 +00:00
akwizgran
6e61504d24 Removed message expiry code. #180 2015-12-16 12:17:38 +00:00
akwizgran
123dff3a3d Don't mix JUnit 4 annotations with JUnit3 TestCase. 2015-12-08 14:53:50 +00:00
akwizgran
8b8df435a5 Separated event infrastructure from DB. 2014-10-03 09:44:54 +01:00
akwizgran
839f67dd44 Replaced last connection time with time of last private message. 2014-04-05 18:14:36 +01:00
akwizgran
8886d954d7 Reorganised Guice modules. Contribute entropy to pool on Linux/Android. 2014-01-14 19:33:17 +00:00
akwizgran
832476412c Changed the root package from net.sf.briar to org.briarproject. 2014-01-08 16:18:30 +00:00