4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #include <sys/types.h>
29 #define MESSAGE_TO_PLUGIN 1
30 #define MESSAGE_FROM_PLUGIN 2
31 #include "messages.inc"
36 Messages(int input_flag, int output_flag, int id = -1);
39 char* get_message_buffer();
41 int read_message(char *text);
42 char* read_message_raw(); // return the raw text in the buffer
43 int read_message(int *command, char *text);
44 long read_message(); // return the number contained in the message
45 int read_message(long *value1, long *value2);
46 int read_message(long *command, long *value1, long *value2);
47 int read_message(long *command, long *value1, long *value2, long *value3);
48 float read_message_f();
49 int read_message_f(float *value1, float *value2);
50 int read_message_f(float *value1, float *value2, float *value3);
51 int read_message_f(float *value1, float *value2, float *value3, float *value4);
53 int write_message(char *text);
54 int write_message_raw(); // send the text currently in the buffer
55 int write_message(int command, char *text);
56 int write_message_flagged(int output_flag, int command);
57 int write_message(int number);
58 int write_message(long command, long value);
59 int write_message(long command, long value1, long value2);
60 int write_message(long command, long value1, long value2, long value3);
61 int write_message_f(float number);
62 int write_message_f(float value1, float value2);
63 int write_message_f(float value1, float value2, float value3);
64 int write_message_f(float value1, float value2, float value3, float value4);
73 char text[MESSAGESIZE];