Document pollevent
This commit is contained in:
@@ -8,16 +8,43 @@
|
|||||||
|
|
||||||
namespace Quotient
|
namespace Quotient
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @class PollStartEvent
|
||||||
|
*
|
||||||
|
* Class to define a poll start event.
|
||||||
|
*
|
||||||
|
* See MSC3381 for full details on polls in the matrix spec
|
||||||
|
* https://github.com/matrix-org/matrix-spec-proposals/blob/travis/msc/polls/proposals/3381-polls.md.
|
||||||
|
*
|
||||||
|
* @sa Quotient::RoomEvent
|
||||||
|
*/
|
||||||
class PollStartEvent : public RoomEvent
|
class PollStartEvent : public RoomEvent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QUO_EVENT(PollStartEvent, "org.matrix.msc3381.poll.start");
|
QUO_EVENT(PollStartEvent, "org.matrix.msc3381.poll.start");
|
||||||
explicit PollStartEvent(const QJsonObject &obj);
|
explicit PollStartEvent(const QJsonObject &obj);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The maximum number of options a user can select in a poll.
|
||||||
|
*/
|
||||||
int maxSelections() const;
|
int maxSelections() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The question being asked in the poll.
|
||||||
|
*/
|
||||||
QString question() const;
|
QString question() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @class PollResponseEvent
|
||||||
|
*
|
||||||
|
* Class to define a poll response event.
|
||||||
|
*
|
||||||
|
* See MSC3381 for full details on polls in the matrix spec
|
||||||
|
* https://github.com/matrix-org/matrix-spec-proposals/blob/travis/msc/polls/proposals/3381-polls.md.
|
||||||
|
*
|
||||||
|
* @sa Quotient::RoomEvent
|
||||||
|
*/
|
||||||
class PollResponseEvent : public RoomEvent
|
class PollResponseEvent : public RoomEvent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -26,6 +53,16 @@ public:
|
|||||||
explicit PollResponseEvent(const QString &pollStartEventId, QStringList responses);
|
explicit PollResponseEvent(const QString &pollStartEventId, QStringList responses);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @class PollEndEvent
|
||||||
|
*
|
||||||
|
* Class to define a poll end event.
|
||||||
|
*
|
||||||
|
* See MSC3381 for full details on polls in the matrix spec
|
||||||
|
* https://github.com/matrix-org/matrix-spec-proposals/blob/travis/msc/polls/proposals/3381-polls.md.
|
||||||
|
*
|
||||||
|
* @sa Quotient::RoomEvent
|
||||||
|
*/
|
||||||
class PollEndEvent : public RoomEvent
|
class PollEndEvent : public RoomEvent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user