aboutsummaryrefslogtreecommitdiff
path: root/rb_ivy.h
blob: a1b8f954711c4ff450ceec377819455bde25c13a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/**
 * Copyright (C) 2006 Gregoire Lejeune <gregoire.lejeune@free.fr>
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 */

#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sysexits.h>
#include <unistd.h>

#include <ruby.h>
#include <rubyio.h>
#include <intern.h>

#include "ivyloop.h"
#include "ivysocket.h"
#include "ivychannel.h"
#include "ivybind.h"
#include "ivy.h"
#include "timer.h"

#ifndef bool
# define bool	int
# define TRUE	1
# define FALSE	0
#endif /* ! bool */

#define RUBY_RBIVY_VERSION "0.1.0"
#define RUBY_RBIVY_VERNUM  010
#define RUBY_IVY_VERSION  "IVYMAJOR_VERSION.IVYMINOR_VERSION"

typedef struct RbTIvy {

  VALUE strAgentName;
  VALUE strReadyMsg;
  
} RbTIvy;
VALUE cIvy;

typedef struct RbTIvyMsg {

  MsgRcvPtr id;
  VALUE cb;
  VALUE data;
  VALUE regexp;

} RbTIvyMsg;
VALUE cIvyMsg;

typedef struct RbTIvyClient {
  IvyClientPtr client;
} RbTIvyClient;
VALUE cIvyClient;

static void callback( IvyClientPtr, void *, int, char ** );