ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/include/uplink.h
Revision: 1.5
Committed: Sat Sep 22 14:27:26 2007 UTC (16 years, 8 months ago) by pippijn
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +8 -4 lines
Log Message:
split up ermyth into ermyth-modules, libermyth (currently just ermyth-util) and ermyth-core

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.5 * $Id: uplink.h,v 1.4 2007-09-16 18:54:42 pippijn Exp $
13 pippijn 1.1 */
14    
15     #ifndef _UPLINK_H
16     #define _UPLINK_H
17    
18 pippijn 1.5 #include <util/containers.h>
19    
20 pippijn 1.3 struct uplink_t : zero_initialised
21 pippijn 1.1 {
22 pippijn 1.5 unsigned index;
23     typedef indexing_vector<uplink_t> list_type;
24    
25 pippijn 1.1 char *name;
26     char *host;
27     char *pass;
28     char *vhost;
29    
30     unsigned int port;
31    
32     connection_t *conn;
33    
34     unsigned int flags;
35     };
36    
37     #define UPF_ILLEGAL 0x80000000 /* not in conf anymore, delete when disconnected */
38    
39     /* uplink.c */
40 pippijn 1.5 E uplink_t::list_type uplinks;
41 pippijn 1.1 E uplink_t *curr_uplink;
42    
43     E void init_uplinks (void);
44     E uplink_t *uplink_add (char *name, char *host, char *password, char *vhost, int port);
45     E void uplink_delete (uplink_t *u);
46     E uplink_t *uplink_find (char *name);
47     E void uplink_connect (void);
48 pippijn 1.5 E void uplink_cleanup ();
49 pippijn 1.1
50     /* packet.c */
51     /* bursting timer */
52     #if HAVE_GETTIMEOFDAY
53     E struct timeval burstime;
54     #endif
55    
56     E void init_ircpacket (void);
57    
58     /* parse.c */
59     E void (*parse) (char *line);
60     E void irc_parse (char *line);
61     E void p10_parse (char *line);
62    
63     /* send.c */
64 pippijn 1.3 E int sts (char const * const fmt, ...);
65 pippijn 1.1 E void reconn (void *arg);
66     E void io_loop (void);
67    
68     #endif