Refactoring ...

FossilOrigin-Name: 0e582e687c5fe1fc78b2f5a0545c6be8633bbbe011d8ac04dae76866e3347c48
This commit is contained in:
7u83@mail.ru
2018-02-24 23:52:45 +00:00
parent 8ec78cea1b
commit 864da8a92f
4 changed files with 34 additions and 16 deletions

View File

@ -114,7 +114,11 @@ typedef struct {
int id;
int min_len;
int max_len;
}cw_msgelemdef_t;
int (*start_in)(struct conn *conn,struct cw_action_in *a,uint8_t*data,int len,struct sockaddr *from);
int (*end_in)(struct conn *conn,struct cw_action_in *a,uint8_t*elem,int len,struct sockaddr *from);
}cw_elem_handler_t;
typedef struct {
mavl_t messages;
@ -122,8 +126,9 @@ typedef struct {
}cw_message_set_t;
typedef struct{
cw_msgelemdef_t * elem;
cw_elem_handler_t * elem;
int mand;
int op;
}cw_msgelemprops_t;
typedef struct {
@ -467,6 +472,12 @@ struct cw_descriptor_subelem_def {
int mand;
};
#define CW_DELETE 1
#define CW_APPEND 2
#define CW_PREPEND 3
#define CW_REPLACE 4
extern int cw_read_descriptor_subelems(mbag_t store, uint8_t * data, int len,
struct cw_descriptor_subelem_def *elems);