]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/typedefs.h
Implement IRCv3 message tag support.
[user/henk/code/inspircd.git] / include / typedefs.h
index 9a015d4450b44ca8f2b4e02c867b3af6c83b0a2a..20fc596be444ac29c0665da90af031d0019e0676 100644 (file)
@@ -49,6 +49,34 @@ class XLineFactory;
 struct ConnectClass;
 struct ModResult;
 
+namespace ClientProtocol
+{
+       class Event;
+       class EventProvider;
+       class Message;
+       class MessageTagProvider;
+       class Serializer;
+
+       typedef std::vector<Message*> MessageList;
+       typedef std::vector<std::string> ParamList;
+       typedef std::string SerializedMessage;
+
+       struct MessageTagData
+       {
+               MessageTagProvider* tagprov;
+               std::string value;
+               void* provdata;
+
+               MessageTagData(MessageTagProvider* prov, const std::string& val, void* data = NULL);
+       };
+
+       /** Map of message tag values and providers keyed by their name.
+        * Sorted in descending order to ensure tag names beginning with symbols (such as '+') come later when iterating
+        * the container than tags with a normal name.
+        */
+       typedef insp::flat_map<std::string, MessageTagData, std::greater<std::string> > TagMap;
+}
+
 #include "hashcomp.h"
 #include "base.h"