]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/typedefs.h
Use meaningful variable names in consolecolors.
[user/henk/code/inspircd.git] / include / typedefs.h
index 879ef062741453846fcfc3ce794628327375ee97..20fc596be444ac29c0665da90af031d0019e0676 100644 (file)
@@ -49,15 +49,40 @@ 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"
 
 typedef TR1NS::unordered_map<std::string, User*, irc::insensitive, irc::StrHashComp> user_hash;
 typedef TR1NS::unordered_map<std::string, Channel*, irc::insensitive, irc::StrHashComp> chan_hash;
 
-/** A list of failed port bindings, used for informational purposes on startup */
-typedef std::vector<std::pair<std::string, std::string> > FailedPortList;
-
 /** List of channels to consider when building the neighbor list of a user
  */
 typedef std::vector<Membership*> IncludeChanList;
@@ -66,13 +91,13 @@ typedef std::vector<Membership*> IncludeChanList;
  */
 typedef std::vector<std::string> file_cache;
 
-/** A configuration key and value pair
+/** A mapping of configuration keys to their assigned values.
  */
-typedef std::pair<std::string, std::string> KeyVal;
+typedef insp::flat_map<std::string, std::string, irc::insensitive_swo> ConfigItems;
 
 /** The entire configuration
  */
-typedef std::multimap<std::string, reference<ConfigTag> > ConfigDataHash;
+typedef std::multimap<std::string, reference<ConfigTag>, irc::insensitive_swo> ConfigDataHash;
 
 /** Iterator of ConfigDataHash */
 typedef ConfigDataHash::const_iterator ConfigIter;
@@ -85,10 +110,6 @@ typedef std::map<std::string, file_cache> ConfigFileCache;
 /** Generic user list, used for exceptions */
 typedef std::set<User*> CUList;
 
-/** A set of strings.
- */
-typedef std::vector<std::string> string_list;
-
 /** Contains an ident and host split into two strings
  */
 typedef std::pair<std::string, std::string> IdentHostPair;