Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
card_update_progress.h
Go to the documentation of this file.
1#ifndef CARD_UPDATE_PROGRESS_H
2#define CARD_UPDATE_PROGRESS_H
3
4#include <QByteArray>
5#include <QString>
6#include <QtGlobal>
7#include <optional>
8
19
24{
30 static std::optional<CardUpdateProgress> fromProtocolLine(const QByteArray &line);
31
35 QString stageToken() const;
36
38 qint64 done = 0;
39 qint64 total = 0;
40};
41
42#endif // CARD_UPDATE_PROGRESS_H
CardUpdateStage
One stage of the card database updater's progress protocol.
Definition card_update_progress.h:13
@ Scan
parsing the downloaded data
Definition card_update_progress.h:15
@ Import
importing cards into the database
Definition card_update_progress.h:16
@ Download
downloading the source data
Definition card_update_progress.h:14
@ Unknown
a stage the client does not recognize
Definition card_update_progress.h:17
One progress line read from the card database updater's stdout.
Definition card_update_progress.h:24
QString stageToken() const
Protocol token of the stage ("download", "scan", "import" or "unknown"), for logging.
Definition card_update_progress.cpp:46
qint64 done
Definition card_update_progress.h:38
CardUpdateStage stage
Definition card_update_progress.h:37
qint64 total
Definition card_update_progress.h:39
static std::optional< CardUpdateProgress > fromProtocolLine(const QByteArray &line)
Parses one line of the updater stdout protocol: "PROGRESS <stage> <done> <total>".
Definition card_update_progress.cpp:22