00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _SML_ERROR_INTERNALS_H_
00023 #define _SML_ERROR_INTERNALS_H_
00024
00025 #include "syncml_internals.h"
00026
00029 struct SmlError {
00031 SmlErrorType type;
00033 char *message;
00035 char *printMessage;
00037 gint32 refCount;
00038 };
00039
00040 void smlErrorSetVargs(SmlError **error, SmlErrorType type, const char *format, va_list args);
00041
00042 #define CHECK_ERROR_REF \
00043 smlAssertMsg(error, SML_ASSERT_MSG_ERROR_MUST_NOT_BE_NULL); \
00044 smlAssertMsg(*error == NULL, SML_ASSERT_MSG_ERROR_MUST_BE_EMPTY);
00045
00046
00047 #define SML_ASSERT_MSG_ERROR_MUST_NOT_BE_NULL "The error handling of the function must be used."
00048 #define SML_ASSERT_MSG_ERROR_MUST_BE_EMPTY "The error parameter is already filled (ignored error)."
00049 #define SML_ASSERT_MSG_ERROR_MUST_BE_AVAILABLE "If this function is used then there must be an error."
00050 #define SML_ASSERT_MSG_ERROR_MUST_BE_FILLED "If this function is used then the error message must be present."
00051 #define SML_ASSERT_MSG_SAN_PARSE_REQUIRES_MANAGER "If an OMA DS 1.2 SAN must be parsed then the manager must be present."
00052
00053 #endif //_SML_ERROR_INTERNALS_H_
00054