Package org.linphone.core
Interface ErrorInfo
public interface ErrorInfo
Object representing full details about a signaling error or status.
All
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.
All
ErrorInfo object returned by the liblinphone API are readonly andtranscients. 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.
-
Method Summary
Modifier and TypeMethodDescriptionlongGets the native pointer used by this class to make native method calls.Get textual phrase from the error info.Get protocol from the error info.intGet the status code from the low level protocol (ex a SIP status code).Get reason code from the error info.intGet Retry-After delay second from the error info.Get pointer to chainedErrorInfoset in sub_ei.Gets the object stored in this object user's dataProvides additional information regarding the failure.voidAssign information to aErrorInfoobject.voidAssign phrase to aErrorInfoobject.voidsetProtocol(String protocol) Assign protocol name to aErrorInfoobject.voidsetProtocolCode(int code) Assign protocol code to aErrorInfoobject.voidvoidsetRetryAfter(int retryAfter) Assign retry-after value to aErrorInfoobject.voidsetSubErrorInfo(ErrorInfo appendedErrorInfo) voidsetUserData(Object data) Sets the object to store in this object user's datavoidsetWarnings(String warnings) Assign warnings to aErrorInfoobject.toString()
-
Method Details
-
getPhrase
Get textual phrase from the error info.
This is the text that is provided by the peer in the protocol (SIP).- Returns:
- The error phrase
-
setPhrase
- Parameters:
phrase- the phrase explaining the error
-
getProtocol
Get protocol from the error info.
- Returns:
- The protocol.
-
setProtocol
- Parameters:
protocol- the protocol name
-
getProtocolCode
int getProtocolCode()Get the status code from the low level protocol (ex a SIP status code).
- Returns:
- The status code
-
setProtocolCode
void setProtocolCode(int code) - Parameters:
code- the protocol code
-
getReason
Reason getReason()Get reason code from the error info.
- Returns:
- A
Reasonobject
-
setReason
- Parameters:
reason- reason fromReasonenum
-
getRetryAfter
int getRetryAfter()Get Retry-After delay second from the error info.
- Returns:
- The Retry-After delay second
-
setRetryAfter
void setRetryAfter(int retryAfter) - Parameters:
retryAfter- the retry-after value
-
getSubErrorInfo
Get pointer to chainedErrorInfoset in sub_ei.
It corresponds to a Reason header in a received SIP response.- Returns:
ErrorInfopointer defined in the ei object.
-
setSubErrorInfo
Set the sub_ei inErrorInfoto anotherErrorInfo.
Used when a reason header is to be added in a SIP response. The first level
ErrorInfodefines the SIP response code and phrase, the second (sub)
#LinphoneErroInfo defining the content of the Reason header.- Parameters:
appendedErrorInfo-ErrorInfoto append
-
getWarnings
Provides additional information regarding the failure.
With SIP protocol, the content of "Warning" headers are returned.- Returns:
- More details about the failure.
-
setWarnings
- Parameters:
warnings- the warnings
-
set
void set(@Nullable String protocol, Reason reason, int code, @Nullable String status, @Nullable String warning) - Parameters:
protocol- protocol namereason- reason fromReasonenumcode- protocol codestatus- description of the reasonwarning- warning message
-
setUserData
Sets the object to store in this object user's data- Parameters:
data- the object to store
-
getUserData
Object getUserData()Gets the object stored in this object user's data- Returns:
- the object store if any, null otherwise
-
getNativePointer
long getNativePointer()Gets the native pointer used by this class to make native method calls.- Returns:
- the nativer pointer, as long
-
toString
String toString()
-