src/nexus.h
author Tero Marttila <terom@fixme.fi>
Sun, 15 Mar 2009 01:17:22 +0200
branchmodules
changeset 55 6f7f6ae729d0
parent 53 12d806823775
child 57 ce1accba5fc7
permissions -rw-r--r--
'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
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
/**
12d806823775 add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     5
 * 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
     6
 */
12d806823775 add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     7
#include <event2/event.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
     8
#include "module.h"
53
12d806823775 add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     9
#include "irc_client.h"
12d806823775 add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    10
12d806823775 add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    11
/**
12d806823775 add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    12
 * Context for async nexus operation
12d806823775 add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    13
 */
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
    14
struct nexus {
53
12d806823775 add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    15
    /** The libevent base */
12d806823775 add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    16
    struct event_base *ev_base;
12d806823775 add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    17
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
    18
    /** 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
    19
    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
    20
53
12d806823775 add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    21
    /** The IRC client state */
12d806823775 add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    22
    struct irc_client *client;
12d806823775 add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    23
};
12d806823775 add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    24
12d806823775 add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    25
/**
12d806823775 add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    26
 * 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
    27
 */
12d806823775 add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    28
int main (int argc, char **argv);
12d806823775 add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    29
12d806823775 add irc_client module, plus nexus.h header
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    30
#endif /* NEXUS_H */