00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #pragma once
00024 #ifndef SEAP_MESSAGE_H
00025 #define SEAP_MESSAGE_H
00026
00027 #include <stdint.h>
00028 #include <stdbool.h>
00029 #include <sexp-types.h>
00030
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif
00034
00035 #if SEAP_MSGID_BITS == 64
00036 typedef uint64_t SEAP_msgid_t;
00037 #else
00038 typedef uint32_t SEAP_msgid_t;
00039 #endif
00040
00041 typedef struct SEAP_msg SEAP_msg_t;
00042 typedef struct SEAP_attr SEAP_attr_t;
00043
00044 SEAP_msg_t *SEAP_msg_new (void);
00045 SEAP_msg_t *SEAP_msg_clone (SEAP_msg_t *msg);
00046 void SEAP_msg_free (SEAP_msg_t *msg);
00047
00048 SEAP_msgid_t SEAP_msg_id (SEAP_msg_t *msg);
00049
00050 int SEAP_msg_set (SEAP_msg_t *msg, SEXP_t *sexp);
00051 void SEAP_msg_unset (SEAP_msg_t *msg);
00052 SEXP_t *SEAP_msg_get (SEAP_msg_t *msg);
00053
00054 SEXP_t *SEAP_msgattr_get (SEAP_msg_t *msg, const char *name);
00055 int SEAP_msgattr_set (SEAP_msg_t *msg, const char *name, SEXP_t *value);
00056 int SEAP_msgattr_del (SEAP_msg_t *msg, const char *name);
00057 bool SEAP_msgattr_exists (SEAP_msg_t *msg, const char *name);
00058
00059 #include <stdio.h>
00060 void SEAP_msg_print (FILE *fp, SEAP_msg_t *msg);
00061
00062 #ifdef __cplusplus
00063 }
00064 #endif
00065
00066 #endif