Cockatrice
2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Toggle main menu visibility
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
12
enum class
CardUpdateStage
13
{
14
Download
,
15
Scan
,
16
Import
,
17
Unknown
,
18
};
19
23
struct
CardUpdateProgress
24
{
30
static
std::optional<CardUpdateProgress>
fromProtocolLine
(
const
QByteArray &line);
31
35
QString
stageToken
()
const
;
36
37
CardUpdateStage
stage
=
CardUpdateStage::Unknown
;
38
qint64
done
= 0;
39
qint64
total
= 0;
40
};
41
42
#endif
// CARD_UPDATE_PROGRESS_H
CardUpdateStage
CardUpdateStage
One stage of the card database updater's progress protocol.
Definition
card_update_progress.h:13
CardUpdateStage::Scan
@ Scan
parsing the downloaded data
Definition
card_update_progress.h:15
CardUpdateStage::Import
@ Import
importing cards into the database
Definition
card_update_progress.h:16
CardUpdateStage::Download
@ Download
downloading the source data
Definition
card_update_progress.h:14
CardUpdateStage::Unknown
@ Unknown
a stage the client does not recognize
Definition
card_update_progress.h:17
DeckProvider::Unknown
@ Unknown
Definition
deck_link_to_api_transformer.h:18
CardUpdateProgress
One progress line read from the card database updater's stdout.
Definition
card_update_progress.h:24
CardUpdateProgress::stageToken
QString stageToken() const
Protocol token of the stage ("download", "scan", "import" or "unknown"), for logging.
Definition
card_update_progress.cpp:46
CardUpdateProgress::done
qint64 done
Definition
card_update_progress.h:38
CardUpdateProgress::stage
CardUpdateStage stage
Definition
card_update_progress.h:37
CardUpdateProgress::total
qint64 total
Definition
card_update_progress.h:39
CardUpdateProgress::fromProtocolLine
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
cockatrice
src
interface
card_database_update
card_update_progress.h
Generated by
1.18.0