X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Ftypedefs.h;h=20fc596be444ac29c0665da90af031d0019e0676;hb=e844a2cef9aeadbeea26531f98e5fe8b0b2f4dd1;hp=879ef062741453846fcfc3ce794628327375ee97;hpb=bcdc3b0bb0ba957a9e99cd6db7f1242a9e587400;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/typedefs.h b/include/typedefs.h index 879ef0627..20fc596be 100644 --- a/include/typedefs.h +++ b/include/typedefs.h @@ -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 MessageList; + typedef std::vector 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 > TagMap; +} + #include "hashcomp.h" #include "base.h" typedef TR1NS::unordered_map user_hash; typedef TR1NS::unordered_map chan_hash; -/** A list of failed port bindings, used for informational purposes on startup */ -typedef std::vector > FailedPortList; - /** List of channels to consider when building the neighbor list of a user */ typedef std::vector IncludeChanList; @@ -66,13 +91,13 @@ typedef std::vector IncludeChanList; */ typedef std::vector file_cache; -/** A configuration key and value pair +/** A mapping of configuration keys to their assigned values. */ -typedef std::pair KeyVal; +typedef insp::flat_map ConfigItems; /** The entire configuration */ -typedef std::multimap > ConfigDataHash; +typedef std::multimap, irc::insensitive_swo> ConfigDataHash; /** Iterator of ConfigDataHash */ typedef ConfigDataHash::const_iterator ConfigIter; @@ -85,10 +110,6 @@ typedef std::map ConfigFileCache; /** Generic user list, used for exceptions */ typedef std::set CUList; -/** A set of strings. - */ -typedef std::vector string_list; - /** Contains an ident and host split into two strings */ typedef std::pair IdentHostPair;