2026-03-10 19:12:14 +00:00
|
|
|
#ifndef XPCG_MSG_H_
|
|
|
|
|
#define XPCG_MSG_H_
|
2026-02-26 19:44:21 +00:00
|
|
|
|
|
|
|
|
#include <blue/core/queue.h>
|
|
|
|
|
|
|
|
|
|
struct type;
|
|
|
|
|
|
|
|
|
|
struct msg_parameter {
|
|
|
|
|
char *p_name;
|
|
|
|
|
const struct type *p_type;
|
|
|
|
|
b_queue_entry p_entry;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct msg_definition {
|
|
|
|
|
char *msg_name;
|
2026-03-10 19:12:14 +00:00
|
|
|
long long msg_id;
|
2026-02-26 19:44:21 +00:00
|
|
|
b_queue_entry msg_entry;
|
|
|
|
|
|
|
|
|
|
b_queue msg_params;
|
|
|
|
|
b_queue msg_results;
|
|
|
|
|
};
|
|
|
|
|
|
2026-03-10 19:12:14 +00:00
|
|
|
extern struct msg_definition *msg_definition_create(
|
|
|
|
|
const char *name,
|
|
|
|
|
long long id);
|
2026-02-26 19:44:21 +00:00
|
|
|
extern void msg_definition_destroy(struct msg_definition *msg);
|
|
|
|
|
|
|
|
|
|
extern bool msg_definition_has_param(
|
|
|
|
|
struct msg_definition *msg,
|
|
|
|
|
const char *name);
|
|
|
|
|
extern bool msg_definition_has_result(
|
|
|
|
|
struct msg_definition *msg,
|
|
|
|
|
const char *name);
|
|
|
|
|
|
|
|
|
|
extern int msg_definition_add_param(
|
|
|
|
|
struct msg_definition *msg,
|
|
|
|
|
const struct type *type,
|
|
|
|
|
const char *name);
|
|
|
|
|
extern int msg_definition_add_result(
|
|
|
|
|
struct msg_definition *msg,
|
|
|
|
|
const struct type *type,
|
|
|
|
|
const char *name);
|
|
|
|
|
|
|
|
|
|
#endif
|