Jeedom Core

recovery
in package

Table of Contents

Constants

CANCEL  = 'jeedomRecoveryCancellation'
DEFAULT_IMGNAME  = 'JeedomSystemUpdate.img.gz'
PROGRESS  = 'jeedomRecovery'

Methods

cancel()  : void
getProgress()  : mixed
install()  : bool
isInstalled()  : bool
start()  : bool
usbConnected()  : string|false
calculPercentProgress()  : float
checkFreeSpace()  : void
downloadAndValidateImage()  : void
downloadImageProgress()  : void|int
getImgInfos()  : array<string|int, mixed>|void
prepareUsbDevice()  : void
setProgress()  : void
validateImage()  : void
writeLog()  : void

Constants

DEFAULT_IMGNAME

private mixed DEFAULT_IMGNAME = 'JeedomSystemUpdate.img.gz'

Methods

install()

public static install([bool $_force = false ]) : bool
Parameters
$_force : bool = false
Return values
bool

isInstalled()

public static isInstalled() : bool
Return values
bool

start()

public static start(string $_hardware[, string $_mode = 'auto' ]) : bool
Parameters
$_hardware : string
$_mode : string = 'auto'
Return values
bool

usbConnected()

public static usbConnected(string $_hardware) : string|false
Parameters
$_hardware : string
Return values
string|false

calculPercentProgress()

private static calculPercentProgress(mixed $_done, mixed $_total[, float $_max = 100 ][, float $_base = 0 ]) : float
Parameters
$_done : mixed
$_total : mixed
$_max : float = 100
$_base : float = 0
Return values
float

checkFreeSpace()

private static checkFreeSpace(string $_path[, int $_imgSize = 1500000 ]) : void
Parameters
$_path : string
$_imgSize : int = 1500000

downloadAndValidateImage()

private static downloadAndValidateImage(string $_url, string $_filepath, string $_sha256) : void
Parameters
$_url : string
$_filepath : string
$_sha256 : string

downloadImageProgress()

private static downloadImageProgress(mixed $_resource, mixed $_downloadSize, mixed $_downloaded) : void|int
Parameters
$_resource : mixed
$_downloadSize : mixed
$_downloaded : mixed
Return values
void|int

getImgInfos()

private static getImgInfos(string $_hardware) : array<string|int, mixed>|void
Parameters
$_hardware : string
Return values
array<string|int, mixed>|void

prepareUsbDevice()

private static prepareUsbDevice(string $_hardware[, string $_mountPath = '/mnt/usb' ]) : void
Parameters
$_hardware : string
$_mountPath : string = '/mnt/usb'

setProgress()

private static setProgress(array<string|int, mixed> $_progress[, int $_pause = null ]) : void
Parameters
$_progress : array<string|int, mixed>
$_pause : int = null

validateImage()

private static validateImage(string $_filepath, string $_sha256[, bool $_downloaded = true ]) : void
Parameters
$_filepath : string
$_sha256 : string
$_downloaded : bool = true

writeLog()

private static writeLog(string $_message[, string $_level = 'info' ]) : void
Parameters
$_message : string
$_level : string = 'info'

        
On this page

Search results