From e40e702d3ae8234b24c6ac4432c1abcfc4dbfacb Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 24 Sep 2010 13:12:43 +0200 Subject: [PATCH] add error reason reporting api --- coreapi/linphonecore.c | 12 ++++++++++++ coreapi/linphonecore.h | 18 ++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index c0f7d83fd..384943a93 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -3919,3 +3919,15 @@ LinphoneCallParams *linphone_core_create_default_call_parameters(LinphoneCore *l p->has_video=linphone_core_video_enabled(lc); return p; } + +const char *linphone_error_to_string(LinphoneError err){ + switch(err){ + case LinphoneErrorNone: + return "No error"; + case LinphoneErrorNoResponse: + return "No response"; + case LinphoneErrorBadCredentials: + return "Bad credentials"; + } + return "unknown error"; +} diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 35623d590..40c231dff 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -166,6 +166,19 @@ typedef struct _LinphoneCallParams LinphoneCallParams; void linphone_call_params_enable_video(LinphoneCallParams *cp, bool_t enabled); void linphone_call_params_destroy(LinphoneCallParams *cp); +/** + * Enum describing failure reasons. +**/ +enum _LinphoneError{ + LinphoneErrorNone, + LinphoneErrorNoResponse, /**