src/lua_irc.h
author Tero Marttila <terom@fixme.fi>
Thu, 28 May 2009 01:17:36 +0300
branchnew-lib-errors
changeset 219 cefec18b8268
parent 116 92e71129074d
permissions -rw-r--r--
some of the lib/transport stuff compiles
116
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     1
#ifndef LUA_IRC_H
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     2
#define LUA_IRC_H
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     3
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     4
/**
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     5
 * Defines lua wrappers for the irc_* objects
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     6
 */
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     7
#include "irc_client.h"
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     8
219
cefec18b8268 some of the lib/transport stuff compiles
Tero Marttila <terom@fixme.fi>
parents: 116
diff changeset
     9
// XXX: remove this dep ASAP.
cefec18b8268 some of the lib/transport stuff compiles
Tero Marttila <terom@fixme.fi>
parents: 116
diff changeset
    10
#include <spbot/nexus_lua.h>
cefec18b8268 some of the lib/transport stuff compiles
Tero Marttila <terom@fixme.fi>
parents: 116
diff changeset
    11
116
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    12
/**
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    13
 * Our lua wrapper for irc_chan
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    14
 */
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    15
struct lua_chan {
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    16
    struct irc_chan *chan;
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    17
};
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    18
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    19
/**
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    20
 * Our lua wrapper for irc_net
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    21
 */
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    22
struct lua_net {
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    23
    struct irc_net *net;
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    24
};
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    25
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    26
/**
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    27
 * Our lua wrapper for irc_client
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    28
 */
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    29
struct lua_client {
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    30
    struct irc_client *client;
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    31
    
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    32
    /** Any defaults set using lua_client_set_defaults */
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    33
    struct irc_client_defaults defaults;
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    34
};
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    35
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    36
/**
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    37
 * Initialize the various lua_irc object types for the given lua state.
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    38
 *
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    39
 * Call in protected mode.
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    40
 */
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    41
void lua_irc_init (struct nexus_lua *lua);
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    42
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    43
#endif