CommonCallbacks
class CommonCallbacks
Description: This class consists of common callback interfaces
interface KeyListener
Description: KeyListener interface
method onValueChange
fun onValueChange(oldValue : T?, newValue: T)
Description: Callback method when value changes
Input parameters: oldValue: old property value for the property key of drone newValue: new property value for the property key of drone。
Output parameter: None。
Related parameters: None。
CompletionCallbackWithProgressAndParam
CompletionCallbackWithProgressAndParam<T>
: CompletionCallbackWithParam<T>
Description: the completion callback with progress and param
method onProgressUpdate
fun onProgressUpdate(progress: Double)
Description: Callback method during the execution of a process or task to update the progress of that task.
Input parameters: progress: the progress for the call。
Output parameter: None。
Related parameters: None。
CompletionCallbackWithParam<T>
Description: the completion callback with param
method onSuccess
fun onSuccess(t: T?)
Description: callback method for success.
Input parameters: t: result return when call successfully。
Output parameter: None。
Related parameters: None。
method onFailure
fun onFailure(error: IAutelCode, msg: String? = null)
Description: callback when failure.
Input parameters: error: error code when call failed msg: msg when call failed。
Output parameter: None。
Related parameters: None。
interface CompletionCallbackWithProgress<T>
Description: the completion callback with progress
method onProgressUpdate
fun onProgressUpdate(progress: T)
Description: callback when call progress changed.
Input parameters: progress: the progress for the call。
Output parameter: None。
Related parameters: None。
method onSuccess
fun onSuccess()
Description: callback method for success.
Input parameters: None。
Output parameter: None。
Related parameters: None。
method onFailure
fun onFailure(error: IAutelCode)
Description: callback when failure.
Input parameters: error: error code when call failed
Output parameter: None。
Related parameters: None。
interface DownLoadCallbackWithProgress<T>
Description: the completion download callback with progress
method onSuccess
fun onSuccess(file : File?)
Description: callback method for success.
Input parameters: file: file path of downloaded file。
Output parameter: None。
Related parameters: None。
method onFailure
fun onFailure(error: IAutelCode)
Description: callback when failure.
Input parameters: error: error code when call failed
Output parameter: None。
Related parameters: None。
interface CompletionCallback
Description: the completion callback with no param
method onSuccess
fun onSuccess()
Description: callback method for success.
Input parameters: None。
Output parameter: None。
Related parameters: None。
method onFailure
fun onFailure(code: IAutelCode, msg: String? = null)
Description: callback when failure.
Input parameters: error: error code when call failed msg: error message
Output parameter: None。
Related parameters: None。