RVS_ONVIFDelegate

public protocol RVS_ONVIFDelegate : AnyObject

This is the delegate protocol for use with the RVS_ONVIF framework.

This is a “pure” Swift protocol, requiring that it be applied to a class.

There can only be one Delegate at a time for an RVS_ONVIF instance (as opposed to Dispatchers, which can be more than one).

None of the Delegate methods are required.

These methods are all called in the main thread.

  • This is a “general purpose” callback that is made immediately before any other callback. It allows the client to interrupt the parsing process. It contains the information that would be sent to the following specialized callback, but as the initial partially-parsed dictionary from SOAPEngine. This is not called for errors.

    Default Implementation

    This is a “general purpose” callback that is made immediately before any other callback. It allows the client to interrupt the parsing process. It contains the information that would be sent to the following specialized callback, but as the initial partially-parsed dictionary from SOAPEngine. This is not called for errors.

    Declaration

    Swift

    func onvifInstance(_ instance: RVS_ONVIF, rawDataPreview: [String : Any]!, deviceRequest: RVS_ONVIF_DeviceRequestProtocol!) -> Bool

    Parameters

    instance

    The RVS_ONVIF instance that is calling the delegate.

    rawDataPreview

    The partially-parsed data to be sent for specific parsing in the next callback (can be nil).

    deviceRequest

    The request object (can be nil).

    Return Value

    false, if the following specialized callback should be made. If true, then the following callback will not be made.

  • onvifInstance(_:failureWithReason:) Default implementation

    This is called whenever an error is encountered by the RVS_ONVIF framework.

    This is not required, but you’d be well-advised to implement it.

    Default Implementation

    This is called whenever an error is encountered by the RVS_ONVIF framework.

    This is not required, but you’d be well-advised to implement it.

    Declaration

    Swift

    func onvifInstance(_ instance: RVS_ONVIF, failureWithReason: RVS_ONVIF.RVS_Fault!)

    Parameters

    instance

    The RVS_ONVIF instance that is calling the delegate.

    failureWithReason

    An enumeration, with associated values that refine the issue.

  • This is called when a response is a simple empty packet. It is a simple “ack.”

    This is not required, but it’s a good idea to implement it, as many responses use it.

    Default Implementation

    This is called when a response is a simple empty packet. It is a simple “ack.”

    This is not required, but it’s a good idea to implement it, as many responses use it.

    Declaration

    Swift

    func onvifInstance(_ instance: RVS_ONVIF, simpleResponseToRequest: RVS_ONVIF_DeviceRequestProtocol!)

    Parameters

    instance

    The RVS_ONVIF instance that is calling the delegate.

    simpleResponseToRequest

    An enumeration, with the request that is being satisfied by this response.

  • onvifInstanceInitialized(_:) Default implementation

    This is called if the instance is completely initialized. It is optional.

    Default Implementation

    This is called if the instance is completely initialized. It is optional.

    Declaration

    Swift

    func onvifInstanceInitialized(_ instance: RVS_ONVIF)

    Parameters

    instance

    The RVS_ONVIF instance that is calling the delegate.

  • onvifInstanceDeinitialized(_:) Default implementation

    This is called if the instance is “deinitialized.” It is optional.

    Default Implementation

    This is called if the instance is “deinitialized.” It is optional.

    Declaration

    Swift

    func onvifInstanceDeinitialized(_ instance: RVS_ONVIF)

    Parameters

    instance

    The RVS_ONVIF instance that is calling the delegate.