![]() |
Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
|
Parses cockatrice:// links and runs them as serialized intent chains. More...
#include <url_parser.h>
Signals | |
| void | urlChainFinished (bool connected) |
| Emitted when the last queued chain ended; carries whether the client is logged in. | |
Public Member Functions | |
| IntentUrlParser (QObject *parent, MainWindow *mainWindow) | |
| void | handle (const QString &urlStr) |
Private Member Functions | |
| Intent * | createJoinGameIntent (const QUrlQuery &query, PendingIntentChain &chain) |
| Intent * | createOpenDeckIntent (const QUrlQuery &query, PendingIntentChain &chain) |
| QString | generateJoinGameMessage (const ContextJoinGame &context, const QString &gameDescription) |
| bool | isConnectedTo (const QString &hostname, const QString &port) const |
| void | startNextChain () |
| void | chainEnded (bool chainSucceeded) |
| void | onChainIntentDestroyed () |
| void | restorePreviousServer (const PendingIntentChain &chain) |
| void | restoreToPreviousServer (const PendingIntentChain &chain) |
Private Attributes | |
| MainWindow * | mainWindow |
| QList< PendingIntentChain > | pendingChains |
| bool | chainRunning = false |
| QMetaObject::Connection | chainBackstopConnection |
Parses cockatrice:// links and runs them as serialized intent chains.
Links are parsed by action (joingame/opendeck) and translated into an intent chain. Chains are queued and run one at a time: a document can hand multiple links to the window while an earlier chain still connects, and running two connect chains concurrently tears the connection down. urlChainFinished is emitted once the queue has fully drained.
| IntentUrlParser::IntentUrlParser | ( | QObject * | parent, |
| MainWindow * | mainWindow ) |
|
private |
|
private |
|
private |
|
private |
| void IntentUrlParser::handle | ( | const QString & | urlStr | ) |
|
nodiscardprivate |
|
private |
|
private |
|
private |
|
private |
|
signal |
Emitted when the last queued chain ended; carries whether the client is logged in.
|
private |
|
private |
|
private |
|
private |