9 #include <QtCore/QUrlQuery>
40 enum SecondaryType :
char { NoSecondaryId = 0x0, EventId =
'$' };
43 enum UriForm :
short { CanonicalUri, MatrixToUri };
55 Uri(
const QString& uriOrId);
58 explicit Uri(QByteArray primaryId, QByteArray secondaryId = {},
61 explicit Uri(QUrl url);
63 static Uri fromUserInput(
const QString& uriOrId);
64 static Uri fromUrl(QUrl url);
72 Q_INVOKABLE Type type()
const;
73 Q_INVOKABLE SecondaryType secondaryType()
const;
74 Q_INVOKABLE QUrl toUrl(UriForm form = CanonicalUri)
const;
75 Q_INVOKABLE QString primaryId()
const;
76 Q_INVOKABLE QString secondaryId()
const;
77 Q_INVOKABLE QString action()
const;
78 Q_INVOKABLE
void setAction(
const QString& newAction);
79 Q_INVOKABLE QStringList viaServers()
const;
80 Q_INVOKABLE
bool isValid()
const;
81 using QUrl::path, QUrl::query, QUrl::fragment;
82 using QUrl::isEmpty, QUrl::toDisplayString;
85 Type primaryType_ = Empty;