from .core import send_message, ControlFloorResponse
from .cfagent_generated_api import *

def ping( allow_errors: bool = False ) -> ControlFloorResponse :
    return send_message("ping", allow_errors=allow_errors)

def getDeviceName( allow_errors: bool = False ) -> ControlFloorResponse :
    return send_message("getDeviceName", allow_errors=allow_errors)

def relaunchApplication( bundleId: str, allow_errors: bool = False ) -> ControlFloorResponse :
    return send_message("launchApplication",args=locals(), allow_errors=allow_errors)

def killApplication( bundleId: str, allow_errors: bool = False ) -> ControlFloorResponse :
    return send_message("killApplication",args=locals(), allow_errors=allow_errors)

def home( allow_errors: bool = False ) -> 'ControlFloorResponse' :
    return send_message("simulateHomeButton", allow_errors=allow_errors)

def lock( allow_errors: bool = False ) -> 'ControlFloorResponse' :
    return send_message("simulateLockButton", allow_errors=allow_errors)

def volumeDown( allow_errors: bool = False ) -> 'ControlFloorResponse' :
    return send_message("simulateVolumeDownButton", allow_errors=allow_errors)

def volumeUp( allow_errors: bool = False ) -> 'ControlFloorResponse' :
    return send_message("simulateVolumeUpButton", allow_errors=allow_errors)

def backspace( allow_errors: bool = False ) -> 'ControlFloorResponse' :
    return typeSpecialKey( "Backspace" , allow_errors=allow_errors)

def arrowLeft( allow_errors: bool = False ) -> 'ControlFloorResponse' :
    return typeSpecialKey( "ArrowLeft" , allow_errors=allow_errors)

def arrowRight( allow_errors: bool = False ) -> 'ControlFloorResponse' :
    return typeSpecialKey( "ArrowRight" , allow_errors=allow_errors)

def getDeviceStatus( allow_errors: bool = False ) -> 'ControlFloorResponse' :
    return send_message( "getDeviceStatus" , allow_errors=allow_errors)

def getDeviceInformation( allow_errors: bool = False ) -> 'ControlFloorResponse' :
    return send_message( "getDeviceInformation" , allow_errors=allow_errors)

def pageUp( allow_errors: bool = False ) -> 'ControlFloorResponse' :
    return send_message( "performGesture", {"gesture":"PageUp"} , allow_errors=allow_errors)

def pageDown( allow_errors: bool = False ) -> 'ControlFloorResponse' :
    return send_message( "performGesture", {"gesture":"PageDown"} , allow_errors=allow_errors)

def getApplicationInformation( bundleId: str, allow_errors: bool = False ) -> 'ControlFloorResponse' :
    return send_message( "getApplicationInformation", {"bundleId":bundleId} , allow_errors=allow_errors)

def getInstalledApplications( allow_errors: bool = False ) -> 'ControlFloorResponse' :
    return send_message( "getInstalledApplications", {"bundleId":bundleId} , allow_errors=allow_errors)

def getCFAgentDeviceInformation( allow_errors: bool = False ) -> ControlFloorResponse :
    return send_message("getCFAgentDeviceInformation", allow_errors=allow_errors)

def getCFAgentCapabilities( allow_errors: bool = False ) -> ControlFloorResponse :
    return send_message("getCFAgentCapabilities", allow_errors=allow_errors)

def licenseDevice( allow_errors: bool = False ) -> ControlFloorResponse :
    return send_message("licenseDevice", allow_errors=allow_errors)

def claimExclusiveAccess( message: str, allow_errors: bool = False) -> ControlFloorResponse :
    return send_message("claimExclusiveAccess", args=locals(), allow_errors=allow_errors)

def releaseExclusiveAccess( allow_errors: bool = False ) -> ControlFloorResponse :
    return send_message("releaseExclusiveAccess", allow_errors=allow_errors)

def interruptExclusiveAccess( allow_errors: bool = False ) -> ControlFloorResponse :
    return send_message("interruptExclusiveAccess", allow_errors=allow_errors)
