20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
* POSSIBILITY OF SUCH DAMAGE.
*/
#import <ObjFW/ObjFW.h>
OF_ASSUME_NONNULL_BEGIN
/**
* @brief A protocol for a storage to be used by @ref MTXClient.
*/
@protocol MTXStorage <OFObject>
/**
* @brief Stores the next batch for the specified device.
*
* @param nextBatch The next batch for the device
* @param deviceID The device for which to store the next batch
*/
- (void)setNextBatch: (OFString *)nextBatch
|
>
>
>
>
>
>
>
>
>
>
>
>
>
|
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
* POSSIBILITY OF SUCH DAMAGE.
*/
#import <ObjFW/ObjFW.h>
OF_ASSUME_NONNULL_BEGIN
/**
* @brief A block which will be treated as a single transaction for the storage.
*
* @return Whether the transaction should be committed (`true`) or rolled back
* (`false`).
*/
typedef bool (^mtx_storage_transaction_block_t)(void);
/**
* @brief A protocol for a storage to be used by @ref MTXClient.
*/
@protocol MTXStorage <OFObject>
/**
* @brief Performs all operations inside the block as a transaction.
*/
- (void)transactionWithBlock: (mtx_storage_transaction_block_t)block;
/**
* @brief Stores the next batch for the specified device.
*
* @param nextBatch The next batch for the device
* @param deviceID The device for which to store the next batch
*/
- (void)setNextBatch: (OFString *)nextBatch
|