aboutsummaryrefslogtreecommitdiff
path: root/room.h
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2016-04-12 16:03:29 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2016-05-02 19:22:40 +0900
commit32b055f56287e97d84a4431a36909027991ef1fc (patch)
tree8c24e1de55ea3b582cdae03111399fa4854cec92 /room.h
parentd5bde8fbf3f8a47fe1140f307be0dcd39d1c0307 (diff)
downloadlibquotient-32b055f56287e97d84a4431a36909027991ef1fc.tar.gz
libquotient-32b055f56287e97d84a4431a36909027991ef1fc.zip
Change the way room members are stored to the one recommended by the CS spec.
According to section 11.2.2.3 of the CS spec, clients SHOULD follow a certain algorithm of making a non-ambiguous display name of a user in the room context. This algorithm implies checking whether other room members have the same display name. This commit prepares for implementation of the algorithm: 1. Use a hash map instead of a list to store room members. The external Room::users() API is kept intact. 2. Convenience CRUD methods are implemented to deal with the hash map. 3. An additional slot for user renaming is introduced (because renaming affects the hash map). Binding of actual signals is left for the next commit. 4. nullptr is the recommended representation of a null pointer since C++11. Use that and mandate compiler support of that.
Diffstat (limited to 'room.h')
-rw-r--r--room.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/room.h b/room.h
index fd49f2ef..72a1f249 100644
--- a/room.h
+++ b/room.h
@@ -68,6 +68,7 @@ namespace QMatrixClient
public slots:
void getPreviousContent();
+ void memberRenamed(User* user, QString oldName);
signals:
void newMessage(Event* event);