26 SML_PARSER_RESULT_ERROR = 0,
27 SML_PARSER_RESULT_OPEN = 1,
28 SML_PARSER_RESULT_CLOSE = 2,
29 SML_PARSER_RESULT_NORMAL = 3,
30 SML_PARSER_RESULT_STATUS = 4,
31 SML_PARSER_RESULT_OTHER = 5
34 typedef void (* SmlParserFreeFunction) (
void *userdata);
35 typedef SmlBool (* SmlParserStartFunction) (
void *userdata,
const char *data,
unsigned int size,
SmlError **error);
36 typedef SmlBool (* SmlParserEndFunction) (
void *userdata, SmlBool *
final, SmlBool *end,
SmlError **error);
38 typedef SmlBool (* SmlParserStatusFunction) (
void *userdata,
SmlStatus **status,
SmlError **error);
39 typedef SmlParserResult (* SmlParserCommandFunction) (
void *userdata,
SmlCommand **cmd,
SmlError **error);
42 SmlParserFreeFunction free;
43 SmlParserStartFunction start;
44 SmlParserEndFunction end;
45 SmlParserHeaderFunction get_header;
46 SmlParserStatusFunction get_status;
47 SmlParserCommandFunction get_cmd;
50 typedef void (* SmlAssemblerFreeFunction) (
void *userdata);
51 typedef SmlBool (* SmlAssemblerStartFunction) (
void *userdata,
SmlSession *session,
SmlError **error);
52 typedef SmlBool (* SmlAssemblerEndFunction) (
void *userdata,
SmlError **error);
53 typedef SmlBool (* SmlAssemblerRunFunction) (
void *userdata,
char **data,
unsigned int *size, SmlBool *end, SmlBool
final,
unsigned int maxsize,
SmlError **error);
54 typedef unsigned int (* SmlAssemblerFlushFunction) (
void *userdata);
55 typedef SmlBool (* SmlAssemblerStatusFunction) (
void *userdata,
SmlStatus *status,
SmlError **error);
56 typedef SmlBool (* SmlAssemblerRemStatusFunction) (
void *userdata,
SmlError **error);
57 typedef SmlBool (* SmlAssemblerReserveStatusFunction) (
void *userdata,
unsigned int cmdRef,
unsigned int msgRef,
unsigned int cmdID,
SmlError **error);
58 typedef SmlBool (* SmlAssemblerStatusMissingFunction) (
void *userdata);
59 typedef SmlBool (* SmlAssemblerStartCommandFunction) (
void *userdata,
unsigned int parentID,
SmlCommand *cmd,
SmlError **error);
60 typedef SmlBool (* SmlAssemblerEndCommandFunction) (
void *userdata,
unsigned int parentID,
SmlError **error);
61 typedef SmlBool (* SmlAssemblerRemCommandFunction) (
void *userdata,
unsigned int parentID,
SmlError **error);
62 typedef SmlBool (* SmlAssemblerHeaderFunction) (
void *userdata,
SmlSession *session,
SmlError **error);
63 typedef unsigned int (* SmlAssemblerCheckFunction) (
void *userdata, SmlBool headeronly,
SmlError **error);
64 typedef SmlBool (* SmlAssemblerNextCmdRefFunction) (
void *userdata,
unsigned int *cmdRef,
unsigned int *msgRef);
65 typedef void (* SmlAssemblerRestoreCommandsFunction) (
void *userdata);
68 SmlAssemblerFreeFunction free;
69 SmlAssemblerStartFunction start;
70 SmlAssemblerEndFunction end;
71 SmlAssemblerRunFunction run;
72 SmlAssemblerFlushFunction flush;
73 SmlAssemblerStatusFunction add_status;
74 SmlAssemblerRemStatusFunction rem_status;
75 SmlAssemblerReserveStatusFunction reserve_status;
76 SmlAssemblerStatusMissingFunction missing_status;
77 SmlAssemblerStartCommandFunction start_cmd;
78 SmlAssemblerEndCommandFunction end_cmd;
79 SmlAssemblerRemCommandFunction rem_cmd;
80 SmlAssemblerHeaderFunction add_header;
81 SmlAssemblerCheckFunction check_size;
82 SmlAssemblerNextCmdRefFunction next_cmdref;
83 SmlAssemblerRestoreCommandsFunction restore_cmds;
87 SML_ASSEMBLER_RESULT_ERROR = 0,
88 SML_ASSEMBLER_RESULT_OK = 1,
89 SML_ASSEMBLER_RESULT_MISMATCH =2
116 unsigned int smlAssemblerSetRemoteMaxMsgSize(
SmlAssembler *assm,
unsigned int limit);
117 unsigned int smlAssemblerGetRemoteMaxMsgSize(
SmlAssembler *assm);
120 unsigned int smlAssemblerGetRemoteMaxObjSize(
SmlAssembler *assm);
121 unsigned int smlAssemblerSetRemoteMaxObjSize(
SmlAssembler *assm,
unsigned int limit);
125 SmlBool smlAssemblerGetNextCmdRef(
SmlAssembler *assm,
unsigned int *cmdRef,
unsigned int *msgRef);
128 void smlAssemblerSetRequestedLimit(
SmlAssembler *assm,
unsigned int limit) LIBSYNCML_DEPRECATED;
129 void smlAssemblerSetLimit(
SmlAssembler *assm,
unsigned int limit) LIBSYNCML_DEPRECATED;
130 unsigned int smlAssemblerGetLimit(
SmlAssembler *assm) LIBSYNCML_DEPRECATED;
131 void smlAssemblerSetRequestedMaxObjSize(
SmlAssembler *assm,
int limit) LIBSYNCML_DEPRECATED;
132 void smlAssemblerSetSendingMaxObjSize(
SmlAssembler *assm,
int limit) LIBSYNCML_DEPRECATED;
133 int smlAssemblerGetSendingMaxObjSize(
SmlAssembler *assm) LIBSYNCML_DEPRECATED;
134 int smlAssemblerGetRequestedMaxObjSize(
SmlAssembler *assm) LIBSYNCML_DEPRECATED;
139 #endif //_SML_PARSE_H_