2015-04-05 22:04:50 +08:00
|
|
|
#ifndef __MESSAGES_H
|
|
|
|
#define __MESSAGES_H
|
|
|
|
|
2015-04-06 19:40:12 +08:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
2015-04-05 22:04:50 +08:00
|
|
|
enum {
|
|
|
|
MESSAGE_TYPE_FINISHED,
|
2015-04-06 19:40:12 +08:00
|
|
|
MESSAGE_TYPE_EXCEPTION,
|
|
|
|
MESSAGE_TYPE_RPC_REQUEST,
|
|
|
|
MESSAGE_TYPE_RPC_REPLY,
|
|
|
|
MESSAGE_TYPE_LOG
|
2015-04-05 22:04:50 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct msg_unknown {
|
|
|
|
int type;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct msg_finished {
|
|
|
|
int type;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct msg_exception {
|
|
|
|
int type;
|
|
|
|
int eid;
|
|
|
|
long long int eparams[3];
|
|
|
|
};
|
|
|
|
|
2015-04-06 19:40:12 +08:00
|
|
|
struct msg_rpc_request {
|
|
|
|
int type;
|
|
|
|
int rpc_num;
|
|
|
|
va_list args;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct msg_rpc_reply {
|
|
|
|
int type;
|
2015-04-06 22:28:10 +08:00
|
|
|
int eid;
|
|
|
|
int retval;
|
2015-04-06 19:40:12 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct msg_log {
|
|
|
|
int type;
|
|
|
|
const char *fmt;
|
|
|
|
va_list args;
|
|
|
|
};
|
|
|
|
|
2015-04-05 22:04:50 +08:00
|
|
|
#endif /* __MESSAGES_H */
|