#ifndef __HWS_SESSION_H__ #define __HWS_SESSION_H__ #include <QByteArray> #include <QJsonDocument> #include <QString> #include <QSharedPointer> #include <QUrl> #include <QDebug> namespace hws { /// \brief The HWS Session, that owns our security token. /// /// This is the data associated with a web session. This should be /// locally serializable. Each web session gets assigned a security token /// for making subsequent calls to the web API. /// /// Additionally, you *also* get a P4 Ticket for use on the local machine. /// This is an extension to our core authorization mechanism. class Session { public: /// New empty session Session(); /// Copy a session from an existing Session state Session(const Session & s); /// Typical destructor ~Session(); /// Copy session state from an existing session Session & operator=(const Session & s); /// This is the Helix Web Services URL. You can't reuse /// a session from one server to another. const QUrl & url() const; /// Set the Helix Web Services URL. void setUrl(const QUrl & url); /// The Perforce login associated with this session const QString & user() const; /// Set the Perforce login name. void setUser(const QString & user); /// The p4 ticket that should be host-locked to the user's machine /// that created the session. const QString & p4Ticket() const; /// Set the P4 ticket to be used by the client void setP4Ticket(const QString & ticket); /// Debugging representation of the Session QString toString() { return QString("Session [url=%1] [user=%2] [ticket=%3]") .arg(mUrl.toString()) .arg(mUser) .arg(mTicket); } private: QUrl mUrl; QString mUser; QString mTicket; }; typedef QSharedPointer<Session> SessionPtr; } #endif // __HWS_SESSION_H__
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 15688 | Doug Scheirer |
Populate -o //guest/perforce_software/helix-web-services/... //guest/doug_scheirer/helix-web-services/.... |
||
//guest/perforce_software/helix-web-services/main/build/helix_web_services_client_qt/hws/Session.h | |||||
#3 | 15601 | tjuricek | validateSessionFinished should not emit a signal if an error occurred on the request | ||
#2 | 15448 | tjuricek |
Qt SDK revision: remove higher-level objects from the SDK. It's likely we could add higher-level objects that adapt the executeMethodDone and convert the variant maps to something, well, typed and easier to use. That's not in my current scope of work, however. |
||
#1 | 14050 | tjuricek | Prep versioned release directory for inclusion into Helix Sync app. |