src/lua_irc.h
author Tero Marttila <terom@fixme.fi>
Wed, 27 May 2009 23:57:48 +0300
branchnew-lib-errors
changeset 217 7728d6ec3abf
parent 116 92e71129074d
child 219 cefec18b8268
permissions -rw-r--r--
nexus.c 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 "nexus_lua.h"
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     8
#include "lua_objs.h"
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
     9
#include "irc_client.h"
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    10
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    11
/**
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    12
 * Our lua wrapper for irc_chan
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    13
 */
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    14
struct lua_chan {
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    15
    struct irc_chan *chan;
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    16
};
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
 * Our lua wrapper for irc_net
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    20
 */
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    21
struct lua_net {
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    22
    struct irc_net *net;
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    23
};
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
 * Our lua wrapper for irc_client
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    27
 */
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    28
struct lua_client {
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    29
    struct irc_client *client;
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    30
    
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    31
    /** Any defaults set using lua_client_set_defaults */
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    32
    struct irc_client_defaults defaults;
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    33
};
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
 * 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
    37
 *
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    38
 * Call in protected mode.
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    39
 */
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    40
void lua_irc_init (struct nexus_lua *lua);
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    41
92e71129074d split off lua_irc from lua_objs
Tero Marttila <terom@fixme.fi>
parents:
diff changeset
    42
#endif