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 TypeMethodDescriptionlong
Gets 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.int
Get the status code from the low level protocol (ex a SIP status code).Get reason code from the error info.int
Get Retry-After delay second from the error info.Get pointer to chainedErrorInfo
set in sub_ei.Gets the object stored in this object user's dataProvides additional information regarding the failure.void
Assign information to aErrorInfo
object.void
Assign phrase to aErrorInfo
object.void
setProtocol
(String protocol) Assign protocol name to aErrorInfo
object.void
setProtocolCode
(int code) Assign protocol code to aErrorInfo
object.void
void
setRetryAfter
(int retryAfter) Assign retry-after value to aErrorInfo
object.void
setSubErrorInfo
(ErrorInfo appendedErrorInfo) void
setUserData
(Object data) Sets the object to store in this object user's datavoid
setWarnings
(String warnings) Assign warnings to aErrorInfo
object.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
Reason
object
-
setReason
- Parameters:
reason
- reason fromReason
enum
-
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 chainedErrorInfo
set in sub_ei.
It corresponds to a Reason header in a received SIP response.- Returns:
ErrorInfo
pointer defined in the ei object.
-
setSubErrorInfo
Set the sub_ei inErrorInfo
to anotherErrorInfo
.
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.- Parameters:
appendedErrorInfo
-ErrorInfo
to 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 fromReason
enumcode
- 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()
-