X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Ftypedefs.h;h=20fc596be444ac29c0665da90af031d0019e0676;hb=914d8140d98dd0adc54f739dfe550765cc466bac;hp=03593d40f45e616998a9509d37fad8b400d8c280;hpb=9375c633371ee8d25adc5cf756590077e5100bb5;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/typedefs.h b/include/typedefs.h index 03593d40f..20fc596be 100644 --- a/include/typedefs.h +++ b/include/typedefs.h @@ -19,127 +19,97 @@ */ -#ifndef TYPEDEFS_H -#define TYPEDEFS_H +#pragma once class BanCacheManager; -class BanItem; class BufferedSocket; class Channel; class Command; -class ConfigReader; +class ConfigStatus; class ConfigTag; -class DNSHeader; -class DNSRequest; class Extensible; class FakeUser; class InspIRCd; class Invitation; -class InviteBase; +class IOHookProvider; class LocalUser; class Membership; class Module; class OperInfo; +class ProtocolServer; class RemoteUser; +class Server; class ServerConfig; class ServerLimits; class Thread; class User; -class UserResolver; class XLine; class XLineManager; class XLineFactory; struct ConnectClass; struct ModResult; -struct ResourceRecord; + +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" -#ifdef HASHMAP_DEPRECATED - typedef nspace::hash_map user_hash; - typedef nspace::hash_map chan_hash; -#else - typedef nspace::hash_map, irc::StrHashComp> user_hash; - typedef nspace::hash_map, irc::StrHashComp> chan_hash; -#endif - -/** A list holding local users, this is the type of UserManager::local_users - */ -typedef std::list LocalUserList; - -/** A list of failed port bindings, used for informational purposes on startup */ -typedef std::vector > FailedPortList; - -/** Holds a complete list of all channels to which a user has been invited and has not yet joined, and the time at which they'll expire. - */ -typedef std::vector InviteList; +typedef TR1NS::unordered_map user_hash; +typedef TR1NS::unordered_map chan_hash; -/** Holds a complete list of all allow and deny tags from the configuration file (connection classes) +/** List of channels to consider when building the neighbor list of a user */ -typedef std::vector > ClassVector; - -/** Typedef for the list of user-channel records for a user - */ -typedef std::set UserChanList; - -/** Shorthand for an iterator into a UserChanList - */ -typedef UserChanList::iterator UCListIter; - -/** Holds a complete ban list - */ -typedef std::vector BanList; - -/** A list of custom modes parameters on a channel - */ -typedef std::map CustomModeList; +typedef std::vector IncludeChanList; /** A cached text file stored with its contents as lines */ 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; /** Iterator pair, used for tag-name ranges */ typedef std::pair ConfigTagList; -/** Index of valid oper blocks and types */ -typedef std::map > OperIndex; - /** Files read by the configuration */ typedef std::map ConfigFileCache; -/** A hash of commands used by the core - */ -#ifdef HASHMAP_DEPRECATED - typedef nspace::hash_map Commandtable; -#else - typedef nspace::hash_map, irc::StrHashComp> Commandtable; -#endif - -/** Membership list of a channel */ -typedef std::map UserMembList; -/** Iterator of UserMembList */ -typedef UserMembList::iterator UserMembIter; -/** const Iterator of UserMembList */ -typedef UserMembList::const_iterator UserMembCIter; - /** 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; @@ -150,7 +120,7 @@ typedef std::map XLineFactMap; /** A map of XLines indexed by string */ -typedef std::map XLineLookup; +typedef std::map XLineLookup; /** A map of XLineLookup maps indexed by string */ @@ -164,6 +134,7 @@ typedef XLineContainer::iterator ContainerIter; */ typedef XLineLookup::iterator LookupIter; - -#endif - +namespace Stats +{ + class Context; +}