]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/typedefs.h
...because every now and again, i have to do a massive commit.
[user/henk/code/inspircd.git] / include / typedefs.h
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
6  * See: http://wiki.inspircd.org/Credits
7  *
8  * This program is free but copyrighted software; see
9  *            the file COPYING for details.
10  *
11  * ---------------------------------------------------
12  */
13
14 #ifndef __TYPEDEF_H__
15 #define __TYPEDEF_H__
16
17 class BanCacheManager;
18 class BanItem;
19 class BufferedSocket;
20 class Channel;
21 class Command;
22 class ConfigReader;
23 class ConfigTag;
24 class DNSHeader;
25 class DNSRequest;
26 class Extensible;
27 class FakeUser;
28 class InspIRCd;
29 class LocalUser;
30 class Membership;
31 class Module;
32 class OperInfo;
33 class RemoteUser;
34 class ServerConfig;
35 class ServerLimits;
36 class Thread;
37 class User;
38 class UserResolver;
39 class XLine;
40 class XLineManager;
41 class XLineFactory;
42 struct ConnectClass;
43 struct ModResult;
44 struct ResourceRecord;
45
46 #include "hashcomp.h"
47 #include "base.h"
48
49 #if defined(WINDOWS) && !defined(HASHMAP_DEPRECATED)
50         typedef nspace::hash_map<std::string, User*, nspace::hash_compare<std::string, std::less<std::string> > > user_hash;
51         typedef nspace::hash_map<std::string, Channel*, nspace::hash_compare<std::string, std::less<std::string> > > chan_hash;
52 #else
53         #ifdef HASHMAP_DEPRECATED
54                 typedef nspace::hash_map<std::string, User*, nspace::insensitive, irc::StrHashComp> user_hash;
55                 typedef nspace::hash_map<std::string, Channel*, nspace::insensitive, irc::StrHashComp> chan_hash;
56         #else
57                 typedef nspace::hash_map<std::string, User*, nspace::hash<std::string>, irc::StrHashComp> user_hash;
58                 typedef nspace::hash_map<std::string, Channel*, nspace::hash<std::string>, irc::StrHashComp> chan_hash;
59         #endif
60 #endif
61
62 /** A list of failed port bindings, used for informational purposes on startup */
63 typedef std::vector<std::pair<std::string, std::string> > FailedPortList;
64
65 /** 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.
66  */
67 typedef std::vector< std::pair<irc::string, time_t> > InvitedList;
68
69 /** Holds a complete list of all allow and deny tags from the configuration file (connection classes)
70  */
71 typedef std::vector<reference<ConnectClass> > ClassVector;
72
73 /** Typedef for the list of user-channel records for a user
74  */
75 typedef std::set<Channel*> UserChanList;
76
77 /** Shorthand for an iterator into a UserChanList
78  */
79 typedef UserChanList::iterator UCListIter;
80
81 /** Holds a complete ban list
82  */
83 typedef std::vector<BanItem> BanList;
84
85 /** A list of custom modes parameters on a channel
86  */
87 typedef std::map<char,std::string> CustomModeList;
88
89 /** A cached text file stored with its contents as lines
90  */
91 typedef std::vector<std::string> file_cache;
92
93 /** A configuration key and value pair
94  */
95 typedef std::pair<std::string, std::string> KeyVal;
96
97 /** The entire configuration
98  */
99 typedef std::multimap<std::string, reference<ConfigTag> > ConfigDataHash;
100 /** Iterator of ConfigDataHash */
101 typedef ConfigDataHash::const_iterator ConfigIter;
102 /** Iterator pair, used for tag-name ranges */
103 typedef std::pair<ConfigIter,ConfigIter> ConfigTagList;
104
105 /** Index of valid oper blocks and types */
106 typedef std::map<std::string, reference<OperInfo> > OperIndex;
107
108 /** A hash of commands used by the core
109  */
110 typedef nspace::hash_map<std::string,Command*> Commandtable;
111
112 /** Membership list of a channel */
113 typedef std::map<User*, Membership*> UserMembList;
114 /** Iterator of UserMembList */
115 typedef UserMembList::iterator UserMembIter;
116 /** const Iterator of UserMembList */
117 typedef UserMembList::const_iterator UserMembCIter;
118
119 /** Generic user list, used for exceptions */
120 typedef std::set<User*> CUList;
121
122 /** A set of strings.
123  */
124 typedef std::vector<std::string> string_list;
125
126 /** Contains an ident and host split into two strings
127  */
128 typedef std::pair<std::string, std::string> IdentHostPair;
129
130 /** A map of xline factories
131  */
132 typedef std::map<std::string, XLineFactory*> XLineFactMap;
133
134 /** A map of XLines indexed by string
135  */
136 typedef std::map<irc::string, XLine *> XLineLookup;
137
138 /** A map of XLineLookup maps indexed by string
139  */
140 typedef std::map<std::string, XLineLookup > XLineContainer;
141
142 /** An iterator in an XLineContainer
143  */
144 typedef XLineContainer::iterator ContainerIter;
145
146 /** An interator in an XLineLookup
147  */
148 typedef XLineLookup::iterator LookupIter;
149
150
151 #endif
152