diff options
Diffstat (limited to 'pjsip/include/pjsip-simple/errno.h')
-rw-r--r-- | pjsip/include/pjsip-simple/errno.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/pjsip/include/pjsip-simple/errno.h b/pjsip/include/pjsip-simple/errno.h index 911333c8..ab3d4ec3 100644 --- a/pjsip/include/pjsip-simple/errno.h +++ b/pjsip/include/pjsip-simple/errno.h @@ -19,9 +19,10 @@ #ifndef __PJSIP_SIMPLE_ERRNO_H__ #define __PJSIP_SIMPLE_ERRNO_H__ - #include <pjsip/sip_errno.h> +PJ_BEGIN_DECL + /** * Start of error code relative to PJ_ERRNO_START_USER. */ @@ -87,6 +88,25 @@ */ #define PJSIP_SIMPLE_EBADISCOMPOSE (PJSIP_SIMPLE_ERRNO_START+40) /*270040*/ +/** + * Get error message for the specified error code. Note that this + * function is only able to decode PJSIP-SIMPLE specific error code. + * Application should use pj_strerror(), which should be able to + * decode all error codes belonging to all subsystems (e.g. pjlib, + * pjmedia, pjsip, etc). + * + * @param status The error code. + * @param buffer The buffer where to put the error message. + * @param bufsize Size of the buffer. + * + * @return The error message as NULL terminated string, + * wrapped with pj_str_t. + */ +PJ_DECL(pj_str_t) pjsipsimple_strerror(pj_status_t status, + char *buffer, pj_size_t bufsize); + + +PJ_END_DECL #endif /* __PJSIP_SIMPLE_ERRNO_H__ */ |