ErrorInfo

public class ErrorInfo : LinphoneObject

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.

  • Undocumented

    Declaration

    Swift

    public static func getSwiftObject(cObject: OpaquePointer) -> ErrorInfo
  • Undocumented

    Declaration

    Swift

    public var getCobject: OpaquePointer? { get }
  • Assign phrase to a ErrorInfo object.

    Declaration

    Swift

    public var phrase: String { get set }

    Parameters

    phrase

    the phrase explaining the error
    Get textual phrase from the error info. This is the text that is provided by the peer in the protocol (SIP).

    Return Value

    The error phrase

  • Assign protocol name to a ErrorInfo object.

    Declaration

    Swift

    public var proto: String { get set }

    Parameters

    proto

    the protocol name
    Get protocol from the error info.

    Return Value

    The protocol.

  • Assign protocol code to a ErrorInfo object.

    Declaration

    Swift

    public var protocolCode: Int { get set }

    Parameters

    code

    the protocol code Get the status code from the low level protocol (ex a SIP status code).

    Return Value

    The status code

  • Assign reason Reason to a ErrorInfo object.

    Declaration

    Swift

    public var reason: Reason { get set }

    Parameters

    reason

    reason from Reason enum Get reason code from the error info.

    Return Value

    A Reason object

  • Assign retry-after value to a ErrorInfo object.

    Declaration

    Swift

    public var retryAfter: Int { get set }

    Parameters

    retryAfter

    the retry-after value Get Retry-After delay second from the error info.

    Return Value

    The Retry-After delay second

  • 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.

    Declaration

    Swift

    public var subErrorInfo: ErrorInfo? { get set }

    Parameters

    appendedErrorInfo

    ErrorInfo to append
    Get pointer to chained ErrorInfo set in sub_ei. It corresponds to a Reason header in a received SIP response.

    Return Value

    ErrorInfo pointer defined in the ei object.

  • Assign warnings to a ErrorInfo object.

    Declaration

    Swift

    public var warnings: String { get set }

    Parameters

    warnings

    the warnings
    Provides additional information regarding the failure. With SIP protocol, the content of “Warning” headers are returned.

    Return Value

    More details about the failure.

  • Assign information to a ErrorInfo object.

    Declaration

    Swift

    public func set(proto: String?, reason: Reason, code: Int, status: String?, warning: String?)

    Parameters

    proto

    protocol name

    reason

    reason from Reason enum

    code

    protocol code

    status

    description of the reason

    warning

    warning message