[6.2.9] extends the crtfile

This commit is contained in:
EmArrow
2024-01-23 18:22:07 +08:00
parent 79c208e87e
commit b5431c3685
6 changed files with 36 additions and 8 deletions

View File

@@ -12,6 +12,12 @@ object CallerCloudListenerManager : CallerBase<IMoGoCloudListener>() {
@Volatile
private var sn: String? = null
@Volatile
private var deviceCrtFile: String? = null
@Volatile
private var rootCrtFile: String? = null
override fun doSomeAfterAddListener(tag: String, listener: IMoGoCloudListener) {
super.doSomeAfterAddListener(tag, listener)
if (!token.isNullOrEmpty() && !sn.isNullOrEmpty()) {
@@ -19,6 +25,23 @@ object CallerCloudListenerManager : CallerBase<IMoGoCloudListener>() {
}
}
fun getRootCrtF(): String? {
return rootCrtFile
}
fun getDeviceCrtF(): String? {
return deviceCrtFile
}
fun invokeCloudCrtFile(deviceCrtFile: String, rootCrtFile: String) {
this.deviceCrtFile = deviceCrtFile
this.rootCrtFile = rootCrtFile
M_LISTENERS.forEach {
val listener = it.value
listener.authCrtFile(deviceCrtFile, rootCrtFile)
}
}
/**
* 分发获取到的设备sn
*/