author | Tero Marttila <terom@fixme.fi> |
Mon, 30 Mar 2009 01:31:27 +0300 | |
changeset 87 | f0db6ebf18b9 |
parent 70 | a9a4c5e6aa30 |
child 92 | 99661e5aac91 |
permissions | -rw-r--r-- |
53
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
1 |
#ifndef NEXUS_H |
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
2 |
#define NEXUS_H |
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
3 |
|
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
4 |
/** |
87 | 5 |
* @file |
6 |
* |
|
53
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
7 |
* A nexus is the central brain of the application; the place where the main() method is implemented |
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
8 |
*/ |
57
ce1accba5fc7
slight cleanup to move module funcs to a 'struct module_funcs'
Tero Marttila <terom@fixme.fi>
parents:
55
diff
changeset
|
9 |
struct nexus; |
ce1accba5fc7
slight cleanup to move module funcs to a 'struct module_funcs'
Tero Marttila <terom@fixme.fi>
parents:
55
diff
changeset
|
10 |
|
53
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
11 |
#include <event2/event.h> |
70
a9a4c5e6aa30
implement module unloading, although module_destroy is currently never called
Tero Marttila <terom@fixme.fi>
parents:
57
diff
changeset
|
12 |
#include "signals.h" |
55
6f7f6ae729d0
'working' modules code, and convert irc_log to use said interface, but we've hit the limits on our Makefile, and the compiled module doesn't really work
Tero Marttila <terom@fixme.fi>
parents:
53
diff
changeset
|
13 |
#include "module.h" |
53
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
14 |
#include "irc_client.h" |
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
15 |
|
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
16 |
/** |
87 | 17 |
* The central brain, as created in the main() function. |
53
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
18 |
*/ |
55
6f7f6ae729d0
'working' modules code, and convert irc_log to use said interface, but we've hit the limits on our Makefile, and the compiled module doesn't really work
Tero Marttila <terom@fixme.fi>
parents:
53
diff
changeset
|
19 |
struct nexus { |
53
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
20 |
/** The libevent base */ |
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
21 |
struct event_base *ev_base; |
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
22 |
|
70
a9a4c5e6aa30
implement module unloading, although module_destroy is currently never called
Tero Marttila <terom@fixme.fi>
parents:
57
diff
changeset
|
23 |
/** Our signal handlers */ |
a9a4c5e6aa30
implement module unloading, although module_destroy is currently never called
Tero Marttila <terom@fixme.fi>
parents:
57
diff
changeset
|
24 |
struct signals *signals; |
a9a4c5e6aa30
implement module unloading, although module_destroy is currently never called
Tero Marttila <terom@fixme.fi>
parents:
57
diff
changeset
|
25 |
|
55
6f7f6ae729d0
'working' modules code, and convert irc_log to use said interface, but we've hit the limits on our Makefile, and the compiled module doesn't really work
Tero Marttila <terom@fixme.fi>
parents:
53
diff
changeset
|
26 |
/** Our loaded modules */ |
6f7f6ae729d0
'working' modules code, and convert irc_log to use said interface, but we've hit the limits on our Makefile, and the compiled module doesn't really work
Tero Marttila <terom@fixme.fi>
parents:
53
diff
changeset
|
27 |
struct modules *modules; |
6f7f6ae729d0
'working' modules code, and convert irc_log to use said interface, but we've hit the limits on our Makefile, and the compiled module doesn't really work
Tero Marttila <terom@fixme.fi>
parents:
53
diff
changeset
|
28 |
|
53
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
29 |
/** The IRC client state */ |
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
30 |
struct irc_client *client; |
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
31 |
}; |
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
32 |
|
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
33 |
/** |
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
34 |
* The nexus main function, application entry point, etc. |
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
35 |
*/ |
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
36 |
int main (int argc, char **argv); |
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
37 |
|
12d806823775
add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff
changeset
|
38 |
#endif /* NEXUS_H */ |