![]() |
Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
|
Shared helpers for creating temporary deck shares. More...
Classes | |
| struct | ShareResponse |
| The outcome of a successful share-create response. More... | |
Functions | |
| QString | buildShareLink (const AbstractClient *client, const QString &token) |
| Builds the cockatrice:// link for a freshly created deck share. | |
| QString | copyShareLinkToClipboard (const QString &link) |
| Copies the share link to the clipboard. | |
| QString | formatShareExpiry (const QDateTime &expiry) |
| Formats the expiration timestamp for a share. | |
| ShareResponse | handleShareResponse (const AbstractClient *client, const Response &response) |
| Handles a successful Response_DeckShareCreate: builds the share link, copies it to the clipboard, and derives the share expiry. | |
Shared helpers for creating temporary deck shares.
| QString DeckShareUtils::buildShareLink | ( | const AbstractClient * | client, |
| const QString & | token ) |
Builds the cockatrice:// link for a freshly created deck share.
| client | Used to embed the target server's hostname and port. |
| token | The share token from Response_DeckShareCreate. |
| QString DeckShareUtils::copyShareLinkToClipboard | ( | const QString & | link | ) |
Copies the share link to the clipboard.
| QString DeckShareUtils::formatShareExpiry | ( | const QDateTime & | expiry | ) |
Formats the expiration timestamp for a share.
| ShareResponse DeckShareUtils::handleShareResponse | ( | const AbstractClient * | client, |
| const Response & | response ) |
Handles a successful Response_DeckShareCreate: builds the share link, copies it to the clipboard, and derives the share expiry.
| client | Used to embed the target server's hostname and port. |
| response | The successful response carrying the share token and expiry. |