• UserStatusPayload
  • UserStatusPayload Class

    Represents the online status of a single user. More...

    Header: #include <UserStatusPayload>

    Properties

    Public Functions

    UserStatusPayload(const QJsonObject &json)
    QString id() const
    bool isConnected() const
    QString username() const

    Detailed Description

    This payload is typically included in "connected_users" or "user_status" messages sent by the server.

    Property Documentation

    [read-only] id : const QString

    Returns the unique identifier of the user.

    Access functions:

    QString id() const

    [read-only] isConnected : const bool

    Returns true if the user is currently online.

    Access functions:

    bool isConnected() const

    [read-only] username : const QString

    Returns the user's username.

    Access functions:

    QString username() const

    Member Function Documentation

    [explicit] UserStatusPayload::UserStatusPayload(const QJsonObject &json)

    Constructs a UserStatusPayload from a json object.

    Extracts the id, username, and status fields from the JSON structure.