ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/include/uplink.h
Revision: 1.4
Committed: Sun Sep 16 18:54:42 2007 UTC (16 years, 8 months ago) by pippijn
Content type: text/plain
Branch: MAIN
Changes since 1.3: +9 -5 lines
Log Message:
#defines to enum

File Contents

# User Rev Content
1 pippijn 1.4 /**
2     * uplink.h: Data structures related to our uplink. Modules usually don't need this.
3     *
4     * Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team
5     * Rights to this code are as documented in COPYING.
6     *
7     *
8     * Portions of this file were derived from sources bearing the following license:
9 pippijn 1.3 * Copyright © 2005 William Pitcock, et al.
10 pippijn 1.2 * Rights to this code are as documented in doc/pod/license.pod.
11 pippijn 1.1 *
12 pippijn 1.4 * $Id: uplink.h,v 1.3 2007-08-28 17:08:07 pippijn Exp $
13 pippijn 1.1 */
14    
15     #ifndef _UPLINK_H
16     #define _UPLINK_H
17    
18 pippijn 1.3 struct uplink_t : zero_initialised
19 pippijn 1.1 {
20     char *name;
21     char *host;
22     char *pass;
23     char *vhost;
24    
25     node_t *node;
26    
27     unsigned int port;
28    
29     connection_t *conn;
30    
31     unsigned int flags;
32     };
33    
34     #define UPF_ILLEGAL 0x80000000 /* not in conf anymore, delete when disconnected */
35    
36     /* uplink.c */
37     E list_t uplinks;
38     E uplink_t *curr_uplink;
39    
40     E void init_uplinks (void);
41     E uplink_t *uplink_add (char *name, char *host, char *password, char *vhost, int port);
42     E void uplink_delete (uplink_t *u);
43     E uplink_t *uplink_find (char *name);
44     E void uplink_connect (void);
45    
46     /* packet.c */
47     /* bursting timer */
48     #if HAVE_GETTIMEOFDAY
49     E struct timeval burstime;
50     #endif
51    
52     E void init_ircpacket (void);
53    
54     /* parse.c */
55     E void (*parse) (char *line);
56     E void irc_parse (char *line);
57     E void p10_parse (char *line);
58    
59     /* send.c */
60 pippijn 1.3 E int sts (char const * const fmt, ...);
61 pippijn 1.1 E void reconn (void *arg);
62     E void io_loop (void);
63    
64     #endif