QtPass 2.0.0
Developer documentation
Loading...
Searching...
No Matches
simpletransaction.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2017 Anne Jan Brouwer
2// SPDX-License-Identifier: GPL-3.0-or-later
8#ifndef SRC_SIMPLETRANSACTION_H_
9#define SRC_SIMPLETRANSACTION_H_
10
11#include "enums.h"
12#include <queue>
13
41 std::queue<std::pair<Enums::PROCESS, Enums::PROCESS>> transactionQueue;
42
43public:
52 void transactionStart();
60 void transactionAdd(Enums::PROCESS process);
68 void transactionEnd(Enums::PROCESS process);
78};
79
80#endif // SRC_SIMPLETRANSACTION_H_
void transactionAdd(Enums::PROCESS process)
Note that process has been queued.
auto transactionIsOver(Enums::PROCESS current) -> Enums::PROCESS
Tell whether the process that just finished ends the oldest pending transaction, and take that transa...
void transactionStart()
Open a transaction: the processes added until the matching transactionEnd() are reported as one opera...
void transactionEnd(Enums::PROCESS process)
Close the transaction opened by the matching transactionStart().
int transactionDepth
How many transactionStart() calls are still open.
std::queue< std::pair< Enums::PROCESS, Enums::PROCESS > > transactionQueue
Closed transactions awaiting completion, oldest first: the process that ends each one,...
SimpleTransaction()
Construct a SimpleTransaction in its initial idle state.
Enums::PROCESS lastInTransaction
The process most recently added to the open transaction, or Enums::INVALID when none was added yet.
The Enums namespace: clipboard behaviour and the identifiers of the subprocess kinds QtPass queues.
PROCESS
Identifies different subprocess operations used in QtPass.
Definition enums.h:43
@ INVALID
Definition enums.h:63