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