aboutsummaryrefslogtreecommitdiff
path: root/room.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2017-05-28 13:00:44 +0900
committerGitHub <noreply@github.com>2017-05-28 13:00:44 +0900
commit36dbba9c543b819aec526f18c33f1d95b0ee61c7 (patch)
tree49caf6450be52072d8f1e4e40e2dfb8490d73732 /room.h
parentced7a66686596e74a1f25b5d9634b9b562870943 (diff)
parenta5e14da86c3299ca8d36eb4a4eb58ce2a245dc4e (diff)
downloadlibquotient-36dbba9c543b819aec526f18c33f1d95b0ee61c7.tar.gz
libquotient-36dbba9c543b819aec526f18c33f1d95b0ee61c7.zip
Merge pull request #65 from QMatrixClient/kitsune-simplify-events
Events refactoring
Diffstat (limited to 'room.h')
-rw-r--r--room.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/room.h b/room.h
index 60be33b9..4f7a3c97 100644
--- a/room.h
+++ b/room.h
@@ -43,14 +43,14 @@ namespace QMatrixClient
// a std:: container now
using index_t = int;
- TimelineItem(Event* e, index_t number) : evt(e), idx(number) { }
+ TimelineItem(RoomEvent* e, index_t number) : evt(e), idx(number) { }
- Event* event() const { return evt.get(); }
- Event* operator->() const { return event(); } //< Synonym for event()
+ RoomEvent* event() const { return evt.get(); }
+ RoomEvent* operator->() const { return event(); } //< Synonym for event()
index_t index() const { return idx; }
private:
- std::unique_ptr<Event> evt;
+ std::unique_ptr<RoomEvent> evt;
index_t idx;
};
inline QDebug& operator<<(QDebug& d, const TimelineItem& ti)
@@ -152,8 +152,8 @@ namespace QMatrixClient
void userRenamed(User* user, QString oldName);
signals:
- void aboutToAddHistoricalMessages(const Events& events);
- void aboutToAddNewMessages(const Events& events);
+ void aboutToAddHistoricalMessages(const RoomEvents& events);
+ void aboutToAddNewMessages(const RoomEvents& events);
void addedMessages();
/**
@@ -177,17 +177,17 @@ namespace QMatrixClient
void unreadMessagesChanged(Room* room);
protected:
- virtual void doAddNewMessageEvents(const Events& events);
- virtual void doAddHistoricalMessageEvents(const Events& events);
- virtual void processStateEvents(const Events& events);
+ virtual void doAddNewMessageEvents(const RoomEvents& events);
+ virtual void doAddHistoricalMessageEvents(const RoomEvents& events);
+ virtual void processStateEvents(const RoomEvents& events);
virtual void processEphemeralEvent(Event* event);
private:
class Private;
Private* d;
- void addNewMessageEvents(Events events);
- void addHistoricalMessageEvents(Events events);
+ void addNewMessageEvents(RoomEvents events);
+ void addHistoricalMessageEvents(RoomEvents events);
void markMessagesAsRead(rev_iter_t upToMarker);
};
@@ -209,4 +209,4 @@ namespace QMatrixClient
private:
const Room* room;
};
-}
+} // namespace QMatrixClient