Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
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
13class AbstractClient;
14class Response;
15
19namespace DeckShareUtils
20{
21
26{
27 QString link;
28 QDateTime expiry;
29};
30
36QString buildShareLink(const AbstractClient *client, const QString &token);
37
42QString copyShareLinkToClipboard(const QString &link);
43
47QString formatShareExpiry(const QDateTime &expiry);
48
55ShareResponse handleShareResponse(const AbstractClient *client, const Response &response);
56
57} // namespace DeckShareUtils
58
59#endif // DECK_SHARE_UTILS_H
Definition abstract_client.h:73
Shared helpers for creating temporary deck shares.
Definition deck_share_utils.cpp:16
QString buildShareLink(const AbstractClient *client, const QString &token)
Builds the cockatrice:// link for a freshly created deck share.
Definition deck_share_utils.cpp:18
QString copyShareLinkToClipboard(const QString &link)
Copies the share link to the clipboard.
Definition deck_share_utils.cpp:33
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
QString formatShareExpiry(const QDateTime &expiry)
Formats the expiration timestamp for a share.
Definition deck_share_utils.cpp:39
EmailType const QString & token
Definition smtpclient.cpp:31
The outcome of a successful share-create response.
Definition deck_share_utils.h:26
QDateTime expiry
When the share expires (UTC).
Definition deck_share_utils.h:28
QString link
The share link that was copied to the clipboard.
Definition deck_share_utils.h:27
Definition response.proto:11