API reference
API reference
Select your platform
No SDKs available
No versions available

VoiceRequest Class

Extends ILogSource
Abstract class for all voice requests
Others
TRequest
The type of request to be returned in event callbacks
TOptions
The type containing all specific options to be passed to the end service.
TEvents
The type containing all events of TSession to be called throughout the lifecycle of the request.
TResults
The type containing all data that can be returned from the end service.

Properties

IVLogger Logger[Get]
The states of a voice request
The completion source for the voice request
Whether transmission should hold prior to send
Download progress of the current request transmission if available
Upload progress of the current request transmission if available
Options sent as the request parameters
Events specific to this voice request
Results returned from the request

Public Statics

static SimulatedResponse simulatedResponse[Get]

Fields

Active if not currently canceled, failed or successful
Whether request can currently transmit data

Member Functions

Constructor class for voice requests
Parameters
newOptions
The request parameters to be used
newEvents
The request events to be called throughout it's lifecycle
Adds listeners for all events provided
Removes listeners for all events provided
Public request to transmit data
Cancel the request immediately

Protected Functions

Method for generating results, can be overwritten for custom generation
Subscribes or unsubscribes all provided events from this request's Events callbacks.
Parameters
newEvents
The events to subscribe or unsubscribe to the request.Events
addListeners
Whether to add listeners or remove listeners
Raises a voice request event
Parameters
requestEvent
Event to be performed
Call after initialization
Apply the voice request state
Method for calling state change delegates
void WaitForHold
( Action onReady )
virtual void HoldSend ( )
Set current request download progress
Parameters
newProgress
New progress value
Set current request upload progress
Parameters
newProgress
New progress value
Internal method for
void LogW
( string log )
void LogE
( string log,
Exception e )
Internal way to determine send error
Call after transmission begins
Child class send implementation Call HandleFailure, HandleCancel from this class
Determines if response is being simulated
Method for handling failure with only an error string
Parameters
error
The error to be returned
Method for handling failure that takes an error status code or an error itself
Parameters
errorStatusCode
The error status code if applicable
errorMessage
The error to be returned
Check for ignored error status codes & messages.
Parameters
errorStatusCode
The error status code if applicable
errorMessage
The error to be returned
Call after failure state set
Method for handling success with a full result object
Parameters
error
The error to be returned
Call after success state set
Handle cancelation in subclass
Call after cancellation state set
Call after failure, success or cancellation
void MainThreadCallback
( Action action )
Did you find this page helpful?
Thumbs up icon
Thumbs down icon