Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

messages.h

Go to the documentation of this file.
00001 #ifndef MESSAGES_H
00002 #define MESSAGES_H
00003 
00004 #include <sys/types.h>
00005 #include <sys/ipc.h>
00006 #include <sys/msg.h>
00007 
00008 #define MESSAGE_TO_PLUGIN 1
00009 #define MESSAGE_FROM_PLUGIN 2
00010 #include "messages.inc"
00011 
00012 class Messages
00013 {
00014 public:
00015         Messages(int input_flag, int output_flag, int id = -1);
00016         ~Messages();
00017 
00018         char* get_message_buffer();
00019 
00020         int read_message(char *text);
00021         char* read_message_raw();        // return the raw text in the buffer
00022         int read_message(int *command, char *text);
00023         long read_message();    // return the number contained in the message
00024         int read_message(long *value1, long *value2);
00025         int read_message(long *command, long *value1, long *value2);
00026         int read_message(long *command, long *value1, long *value2, long *value3);
00027         float read_message_f();
00028         int read_message_f(float *value1, float *value2);
00029         int read_message_f(float *value1, float *value2, float *value3);
00030         int read_message_f(float *value1, float *value2, float *value3, float *value4);
00031 
00032         int write_message(char *text);
00033         int write_message_raw();                 // send the text currently in the buffer
00034         int write_message(int command, char *text);
00035         int write_message_flagged(int output_flag, int command);
00036         int write_message(int number);
00037         int write_message(long command, long value);
00038         int write_message(long command, long value1, long value2);
00039         int write_message(long command, long value1, long value2, long value3);
00040         int write_message_f(float number);
00041         int write_message_f(float value1, float value2);
00042         int write_message_f(float value1, float value2, float value3);
00043         int write_message_f(float value1, float value2, float value3, float value4);
00044         int get_id();
00045 
00046         int msgid;
00047         int client;
00048         int input_flag;
00049         int output_flag;
00050         struct buffer_ {
00051                 long mtype;
00052                 char text[MESSAGESIZE];
00053         } buffer;
00054 };
00055 
00056 #endif

Generated on Sun Jan 8 13:38:57 2006 for Cinelerra-svn by  doxygen 1.4.4