aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/rooms.h
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2022-10-06 19:27:24 +0200
committern-peugnet <n.peugnet@free.fr>2022-10-06 19:27:24 +0200
commit08632625e1a04257b5c7d4a9db2246ac07436748 (patch)
tree9ddadf219a7e352ddd3549ad1683282c944adfb6 /lib/csapi/rooms.h
parente9c2e2a26d3711e755aa5eb8a8478917c71d612b (diff)
parentd911b207f49e936b3e992200796110f0749ed150 (diff)
downloadlibquotient-08632625e1a04257b5c7d4a9db2246ac07436748.tar.gz
libquotient-08632625e1a04257b5c7d4a9db2246ac07436748.zip
Update upstream source from tag 'upstream/0.7.0'
Update to upstream version '0.7.0' with Debian dir 30dcb77a77433e4a54eab77c0b82ae925dead2d8
Diffstat (limited to 'lib/csapi/rooms.h')
-rw-r--r--lib/csapi/rooms.h28
1 files changed, 12 insertions, 16 deletions
diff --git a/lib/csapi/rooms.h b/lib/csapi/rooms.h
index 51af2c65..7823a1b0 100644
--- a/lib/csapi/rooms.h
+++ b/lib/csapi/rooms.h
@@ -4,8 +4,8 @@
#pragma once
-#include "events/eventloader.h"
-#include "events/roommemberevent.h"
+#include "events/roomevent.h"
+#include "events/stateevent.h"
#include "jobs/basejob.h"
namespace Quotient {
@@ -15,7 +15,7 @@ namespace Quotient {
* Get a single event based on `roomId/eventId`. You must have permission to
* retrieve this event e.g. by being a member in the room for this event.
*/
-class GetOneRoomEventJob : public BaseJob {
+class QUOTIENT_API GetOneRoomEventJob : public BaseJob {
public:
/*! \brief Get a single event by event ID.
*
@@ -38,7 +38,7 @@ public:
// Result properties
/// The full event.
- EventPtr event() { return fromJson<EventPtr>(jsonData()); }
+ RoomEventPtr event() { return fromJson<RoomEventPtr>(jsonData()); }
};
/*! \brief Get the state identified by the type and key.
@@ -48,7 +48,7 @@ public:
* state of the room. If the user has left the room then the state is
* taken from the state of the room when they left.
*/
-class GetRoomStateWithKeyJob : public BaseJob {
+class QUOTIENT_API GetRoomStateWithKeyJob : public BaseJob {
public:
/*! \brief Get the state identified by the type and key.
*
@@ -80,7 +80,7 @@ public:
*
* Get the state events for the current state of a room.
*/
-class GetRoomStateJob : public BaseJob {
+class QUOTIENT_API GetRoomStateJob : public BaseJob {
public:
/*! \brief Get all state events in the current state of a room.
*
@@ -106,7 +106,7 @@ public:
*
* Get the list of members for this room.
*/
-class GetMembersByRoomJob : public BaseJob {
+class QUOTIENT_API GetMembersByRoomJob : public BaseJob {
public:
/*! \brief Get the m.room.member events for the room.
*
@@ -146,10 +146,7 @@ public:
// Result properties
/// Get the list of members for this room.
- EventsArray<RoomMemberEvent> chunk()
- {
- return takeFromJson<EventsArray<RoomMemberEvent>>("chunk"_ls);
- }
+ StateEvents chunk() { return takeFromJson<StateEvents>("chunk"_ls); }
};
/*! \brief Gets the list of currently joined users and their profile data.
@@ -157,11 +154,10 @@ public:
* This API returns a map of MXIDs to member info objects for members of the
* room. The current user must be in the room for it to work, unless it is an
* Application Service in which case any of the AS's users must be in the room.
- * This API is primarily for Application Services and should be faster to
- * respond than `/members` as it can be implemented more efficiently on the
- * server.
+ * This API is primarily for Application Services and should be faster to respond
+ * than `/members` as it can be implemented more efficiently on the server.
*/
-class GetJoinedMembersByRoomJob : public BaseJob {
+class QUOTIENT_API GetJoinedMembersByRoomJob : public BaseJob {
public:
// Inner data structures
@@ -175,7 +171,7 @@ public:
/// The display name of the user this object is representing.
QString displayName;
/// The mxc avatar url of the user this object is representing.
- QString avatarUrl;
+ QUrl avatarUrl;
};
// Construction/destruction