Liblinphone
5.3.0
|
Object representing full details about a signaling error or status. More...
#include <error_info.hh>
Public Member Functions | |
LINPHONECXX_PUBLIC | ErrorInfo (void *ptr, bool takeRef=true) |
LINPHONECXX_PUBLIC _LinphoneErrorInfo * | cPtr () |
LINPHONECXX_PUBLIC std::string | getPhrase () const |
Get textual phrase from the error info. More... | |
LINPHONECXX_PUBLIC void | setPhrase (const std::string &phrase) |
Assign phrase to a ErrorInfo object. More... | |
LINPHONECXX_PUBLIC std::string | getProtocol () const |
Get protocol from the error info. More... | |
LINPHONECXX_PUBLIC void | setProtocol (const std::string &protocol) |
Assign protocol name to a ErrorInfo object. More... | |
LINPHONECXX_PUBLIC int | getProtocolCode () const |
Get the status code from the low level protocol (ex a SIP status code). More... | |
LINPHONECXX_PUBLIC void | setProtocolCode (int code) |
Assign protocol code to a ErrorInfo object. More... | |
LINPHONECXX_PUBLIC linphone::Reason | getReason () const |
Get reason code from the error info. More... | |
LINPHONECXX_PUBLIC void | setReason (linphone::Reason reason) |
Assign reason Reason to a ErrorInfo object. More... | |
LINPHONECXX_PUBLIC int | getRetryAfter () const |
Get Retry-After delay second from the error info. More... | |
LINPHONECXX_PUBLIC void | setRetryAfter (int retryAfter) |
Assign retry-after value to a ErrorInfo object. More... | |
LINPHONECXX_PUBLIC std::shared_ptr< linphone::ErrorInfo > | getSubErrorInfo () const |
Get pointer to chained ErrorInfo set in sub_ei. More... | |
LINPHONECXX_PUBLIC void | setSubErrorInfo (const std::shared_ptr< linphone::ErrorInfo > &appendedErrorInfo) |
Set the sub_ei in ErrorInfo to another ErrorInfo. More... | |
LINPHONECXX_PUBLIC std::string | getWarnings () const |
Provides additional information regarding the failure. More... | |
LINPHONECXX_PUBLIC void | setWarnings (const std::string &warnings) |
Assign warnings to a ErrorInfo object. More... | |
LINPHONECXX_PUBLIC void | set (const std::string &protocol, linphone::Reason reason, int code, const std::string &status, const std::string &warning) |
Assign information to a ErrorInfo object. More... | |
Object representing full details about a signaling error or status.
All ErrorInfo object returned by the liblinphone API are readonly and transcients. For safety they must be used immediately after obtaining them. Any other function call to the liblinphone may change their content or invalidate the pointer.
LINPHONECXX_PUBLIC std::string linphone::ErrorInfo::getPhrase | ( | ) | const |
Get textual phrase from the error info.
This is the text that is provided by the peer in the protocol (SIP).
LINPHONECXX_PUBLIC std::string linphone::ErrorInfo::getProtocol | ( | ) | const |
Get protocol from the error info.
LINPHONECXX_PUBLIC int linphone::ErrorInfo::getProtocolCode | ( | ) | const |
Get the status code from the low level protocol (ex a SIP status code).
LINPHONECXX_PUBLIC linphone::Reason linphone::ErrorInfo::getReason | ( | ) | const |
Get reason code from the error info.
LINPHONECXX_PUBLIC int linphone::ErrorInfo::getRetryAfter | ( | ) | const |
Get Retry-After delay second from the error info.
LINPHONECXX_PUBLIC std::shared_ptr<linphone::ErrorInfo> linphone::ErrorInfo::getSubErrorInfo | ( | ) | const |
LINPHONECXX_PUBLIC std::string linphone::ErrorInfo::getWarnings | ( | ) | const |
Provides additional information regarding the failure.
With SIP protocol, the content of "Warning" headers are returned.
LINPHONECXX_PUBLIC void linphone::ErrorInfo::set | ( | const std::string & | protocol, |
linphone::Reason | reason, | ||
int | code, | ||
const std::string & | status, | ||
const std::string & | warning | ||
) |
LINPHONECXX_PUBLIC void linphone::ErrorInfo::setPhrase | ( | const std::string & | phrase | ) |
Assign phrase to a ErrorInfo object.
phrase | the phrase explaining the error |
LINPHONECXX_PUBLIC void linphone::ErrorInfo::setProtocol | ( | const std::string & | protocol | ) |
Assign protocol name to a ErrorInfo object.
protocol | the protocol name |
LINPHONECXX_PUBLIC void linphone::ErrorInfo::setProtocolCode | ( | int | code | ) |
Assign protocol code to a ErrorInfo object.
code | the protocol code |
LINPHONECXX_PUBLIC void linphone::ErrorInfo::setReason | ( | linphone::Reason | reason | ) |
LINPHONECXX_PUBLIC void linphone::ErrorInfo::setRetryAfter | ( | int | retryAfter | ) |
Assign retry-after value to a ErrorInfo object.
retryAfter | the retry-after value |
LINPHONECXX_PUBLIC void linphone::ErrorInfo::setSubErrorInfo | ( | const std::shared_ptr< linphone::ErrorInfo > & | appendedErrorInfo | ) |
Set the sub_ei in ErrorInfo to another ErrorInfo.
Used when a reason header is to be added in a SIP response. The first level ErrorInfo defines the SIP response code and phrase, the second (sub) #LinphoneErroInfo defining the content of the Reason header.
appendedErrorInfo | ErrorInfo to append |
LINPHONECXX_PUBLIC void linphone::ErrorInfo::setWarnings | ( | const std::string & | warnings | ) |
Assign warnings to a ErrorInfo object.
warnings | the warnings |