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
deck_share_utils.h
Go to the documentation of this file.
1
6
7
#ifndef DECK_SHARE_UTILS_H
8
#define DECK_SHARE_UTILS_H
9
10
#include <QDateTime>
11
#include <QString>
12
13
class
AbstractClient
;
14
class
Response
;
15
19
namespace
DeckShareUtils
20
{
21
25
struct
ShareResponse
26
{
27
QString
link
;
28
QDateTime
expiry
;
29
};
30
36
QString
buildShareLink
(
const
AbstractClient
*client,
const
QString &
token
);
37
42
QString
copyShareLinkToClipboard
(
const
QString &link);
43
47
QString
formatShareExpiry
(
const
QDateTime &expiry);
48
55
ShareResponse
handleShareResponse
(
const
AbstractClient
*client,
const
Response
&response);
56
57
}
// namespace DeckShareUtils
58
59
#endif
// DECK_SHARE_UTILS_H
AbstractClient
Definition
abstract_client.h:73
DeckShareUtils
Shared helpers for creating temporary deck shares.
Definition
deck_share_utils.cpp:16
DeckShareUtils::buildShareLink
QString buildShareLink(const AbstractClient *client, const QString &token)
Builds the cockatrice:// link for a freshly created deck share.
Definition
deck_share_utils.cpp:18
DeckShareUtils::copyShareLinkToClipboard
QString copyShareLinkToClipboard(const QString &link)
Copies the share link to the clipboard.
Definition
deck_share_utils.cpp:33
DeckShareUtils::handleShareResponse
ShareResponse handleShareResponse(const AbstractClient *client, const Response &response)
Handles a successful Response_DeckShareCreate: builds the share link, copies it to the clipboard,...
Definition
deck_share_utils.cpp:44
DeckShareUtils::formatShareExpiry
QString formatShareExpiry(const QDateTime &expiry)
Formats the expiration timestamp for a share.
Definition
deck_share_utils.cpp:39
token
EmailType const QString & token
Definition
smtpclient.cpp:31
DeckShareUtils::ShareResponse
The outcome of a successful share-create response.
Definition
deck_share_utils.h:26
DeckShareUtils::ShareResponse::expiry
QDateTime expiry
When the share expires (UTC).
Definition
deck_share_utils.h:28
DeckShareUtils::ShareResponse::link
QString link
The share link that was copied to the clipboard.
Definition
deck_share_utils.h:27
Response
Definition
response.proto:11
cockatrice
src
interface
widgets
deck_share
deck_share_utils.h
Generated by
1.18.0