]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/typedefs.h
Introduce Stats::Context, pass it to the OnStats hook and switch all code to it
[user/henk/code/inspircd.git] / include / typedefs.h
1 /*
2  * InspIRCd -- Internet Relay Chat Daemon
3  *
4  *   Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
5  *   Copyright (C) 2005, 2008 Craig Edwards <craigedwards@brainbox.cc>
6  *   Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
7  *
8  * This file is part of InspIRCd.  InspIRCd is free software: you can
9  * redistribute it and/or modify it under the terms of the GNU General Public
10  * License as published by the Free Software Foundation, version 2.
11  *
12  * This program is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14  * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
15  * details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19  */
20
21
22 #pragma once
23
24 class BanCacheManager;
25 class BufferedSocket;
26 class Channel;
27 class Command;
28 class ConfigStatus;
29 class ConfigTag;
30 class Extensible;
31 class FakeUser;
32 class InspIRCd;
33 class Invitation;
34 class LocalUser;
35 class Membership;
36 class Module;
37 class OperInfo;
38 class ProtocolServer;
39 class RemoteUser;
40 class Server;
41 class ServerConfig;
42 class ServerLimits;
43 class Thread;
44 class User;
45 class XLine;
46 class XLineManager;
47 class XLineFactory;
48 struct ConnectClass;
49 struct ModResult;
50
51 #include "hashcomp.h"
52 #include "base.h"
53
54 typedef TR1NS::unordered_map<std::string, User*, irc::insensitive, irc::StrHashComp> user_hash;
55 typedef TR1NS::unordered_map<std::string, Channel*, irc::insensitive, irc::StrHashComp> chan_hash;
56
57 /** A list of failed port bindings, used for informational purposes on startup */
58 typedef std::vector<std::pair<std::string, std::string> > FailedPortList;
59
60 /** List of channels to consider when building the neighbor list of a user
61  */
62 typedef std::vector<Membership*> IncludeChanList;
63
64 /** A cached text file stored with its contents as lines
65  */
66 typedef std::vector<std::string> file_cache;
67
68 /** A configuration key and value pair
69  */
70 typedef std::pair<std::string, std::string> KeyVal;
71
72 /** The entire configuration
73  */
74 typedef std::multimap<std::string, reference<ConfigTag> > ConfigDataHash;
75
76 /** Iterator of ConfigDataHash */
77 typedef ConfigDataHash::const_iterator ConfigIter;
78 /** Iterator pair, used for tag-name ranges */
79 typedef std::pair<ConfigIter,ConfigIter> ConfigTagList;
80
81 /** Files read by the configuration */
82 typedef std::map<std::string, file_cache> ConfigFileCache;
83
84 /** Generic user list, used for exceptions */
85 typedef std::set<User*> CUList;
86
87 /** A set of strings.
88  */
89 typedef std::vector<std::string> string_list;
90
91 /** Contains an ident and host split into two strings
92  */
93 typedef std::pair<std::string, std::string> IdentHostPair;
94
95 /** A map of xline factories
96  */
97 typedef std::map<std::string, XLineFactory*> XLineFactMap;
98
99 /** A map of XLines indexed by string
100  */
101 typedef std::map<irc::string, XLine *> XLineLookup;
102
103 /** A map of XLineLookup maps indexed by string
104  */
105 typedef std::map<std::string, XLineLookup > XLineContainer;
106
107 /** An iterator in an XLineContainer
108  */
109 typedef XLineContainer::iterator ContainerIter;
110
111 /** An interator in an XLineLookup
112  */
113 typedef XLineLookup::iterator LookupIter;
114
115 namespace Stats
116 {
117         class Context;
118 }