* Prune empty code files * delete file * Restore * refactor * fix warnings * Fix tasks * Add diag * tweak * Log load times * changelog
43 lines
1.2 KiB
Plaintext
43 lines
1.2 KiB
Plaintext
import "pkg:/source/AsyncTask/AsyncTask.bs"
|
|
import "pkg:/source/AsyncTask/Tasks.bs"
|
|
import "pkg:/source/services/ApplicationInfo.bs"
|
|
|
|
function Init()
|
|
m.service = new ApplicationInfo(m.top)
|
|
end function
|
|
|
|
function GetAppInfo(_unused as dynamic) as object
|
|
return m.service.GetAppInfo()
|
|
end function
|
|
|
|
function GetDeviceInfo(_unused as dynamic) as object
|
|
return m.service.GetDeviceInfo()
|
|
end function
|
|
|
|
function GetUserCountryCode(_unused as dynamic) as string
|
|
return m.service.GetUserCountryCode()
|
|
end function
|
|
|
|
function GetLocalIpAddress(_unused as dynamic) as dynamic
|
|
return m.service.GetLocalIpAddress()
|
|
end function
|
|
|
|
function GetLatestPlayletLibVersion(_unused as dynamic) as dynamic
|
|
if not StringUtils.IsNullOrEmpty(m.top.lib_version_latest)
|
|
return m.top.lib_version_latest
|
|
end if
|
|
|
|
if m.latestLibVersionTask <> invalid and m.latestLibVersionTask.state = "run"
|
|
return invalid
|
|
end if
|
|
|
|
m.latestLibVersionTask = AsyncTask.Start(Tasks.LatestLibVersionTask, {}, function(output as object) as void
|
|
m.latestLibVersionTask = invalid
|
|
if output.success and output.result.latest <> invalid
|
|
m.top.lib_version_latest = output.result.latest
|
|
end if
|
|
end function)
|
|
|
|
return invalid
|
|
end function
|