]> arthur.barton.de Git - ngircd-alex.git/blob - src/ngircd/conn.h
- Semantik der Conn_xxxFlag()-Funktionen geaendert.
[ngircd-alex.git] / src / ngircd / conn.h
1 /*
2  * ngIRCd -- The Next Generation IRC Daemon
3  * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
4  *
5  * Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen
6  * der GNU General Public License (GPL), wie von der Free Software Foundation
7  * herausgegeben, weitergeben und/oder modifizieren, entweder unter Version 2
8  * der Lizenz oder (wenn Sie es wuenschen) jeder spaeteren Version.
9  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
10  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
11  *
12  * $Id: conn.h,v 1.20 2002/11/04 12:31:27 alex Exp $
13  *
14  * conn.h: Verwaltung aller Netz-Verbindungen ("connections") (Header)
15  */
16
17
18 #ifndef __conn_h__
19 #define __conn_h__
20
21
22 #include <time.h>
23
24
25 typedef INT CONN_ID;
26
27
28 GLOBAL VOID Conn_Init PARAMS((VOID ));
29 GLOBAL VOID Conn_Exit PARAMS(( VOID ));
30
31 GLOBAL BOOLEAN Conn_NewListener PARAMS(( CONST UINT Port ));
32
33 GLOBAL VOID Conn_Handler PARAMS(( VOID ));
34
35 GLOBAL BOOLEAN Conn_Write PARAMS(( CONN_ID Idx, CHAR *Data, INT Len ));
36 GLOBAL BOOLEAN Conn_WriteStr PARAMS(( CONN_ID Idx, CHAR *Format, ... ));
37
38 GLOBAL VOID Conn_Close PARAMS(( CONN_ID Idx, CHAR *LogMsg, CHAR *FwdMsg, BOOLEAN InformClient ));
39
40 GLOBAL VOID Conn_UpdateIdle PARAMS(( CONN_ID Idx ));
41 GLOBAL time_t Conn_GetIdle PARAMS(( CONN_ID Idx ));
42 GLOBAL time_t Conn_LastPing PARAMS(( CONN_ID Idx ));
43
44 GLOBAL VOID Conn_SetPenalty PARAMS(( CONN_ID Idx, time_t Seconds ));
45 GLOBAL VOID Conn_ResetPenalty PARAMS(( CONN_ID Idx ));
46
47 GLOBAL VOID Conn_ClearFlags PARAMS(( VOID ));
48 GLOBAL INT Conn_Flag PARAMS(( CONN_ID Idx ));
49 GLOBAL VOID Conn_SetFlag PARAMS(( CONN_ID Idx, INT Flag ));
50
51 GLOBAL CONN_ID Conn_First PARAMS(( VOID ));
52 GLOBAL CONN_ID Conn_Next PARAMS(( CONN_ID Idx ));
53
54
55 GLOBAL INT Conn_MaxFD;
56
57
58 #endif
59
60
61 /* -eof- */