[6.4.0] add func of auth cert show
This commit is contained in:
@@ -11,11 +11,16 @@ object CallerAutopilotCarConfigListenerManager : CallerBase<IMoGoAutopilotCarCon
|
||||
|
||||
private var mCarConfigResp: MessagePad.CarConfigResp? = null
|
||||
|
||||
@Volatile
|
||||
private var certFileMsg = "未开启认证"
|
||||
|
||||
override fun doSomeAfterAddListener(tag: String, listener: IMoGoAutopilotCarConfigListener) {
|
||||
mCarConfigResp?.let {
|
||||
listener.onAutopilotCarConfig(it)
|
||||
}
|
||||
listener.onCertificationResult(certFileMsg)
|
||||
}
|
||||
|
||||
/**
|
||||
* 工控机基础信息回调
|
||||
* @param carConfigResp
|
||||
@@ -33,5 +38,17 @@ object CallerAutopilotCarConfigListenerManager : CallerBase<IMoGoAutopilotCarCon
|
||||
}
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
fun invokeAutopilotCertFileResult(msg: String) {
|
||||
certFileMsg = msg
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onCertificationResult(msg)
|
||||
}
|
||||
}
|
||||
|
||||
fun getCertFileResult(): String {
|
||||
return certFileMsg
|
||||
}
|
||||
|
||||
}
|
||||
@@ -41,4 +41,8 @@ object CallerCloudCertManager {
|
||||
}
|
||||
return crt
|
||||
}
|
||||
|
||||
fun getCrtFileErrorMsg(): String? {
|
||||
return certProviderApi.getCrtFileErrorMsg()
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,12 @@ object CallerCloudListenerManager : CallerBase<IMoGoCloudListener>() {
|
||||
if (!token.isNullOrEmpty() && !sn.isNullOrEmpty()) {
|
||||
listener.tokenGot(token!!, sn!!)
|
||||
}
|
||||
if(CallerCloudCertManager.getDeviceCrtF()!= null && CallerCloudCertManager.getRootCrtF()!= null){
|
||||
listener.authCrtFile(CallerCloudCertManager.getDeviceCrtF()!!, CallerCloudCertManager.getRootCrtF()!!)
|
||||
}
|
||||
if(CallerCloudCertManager.getCrtFileErrorMsg()!= null){
|
||||
listener.authCrtError(CallerCloudCertManager.getCrtFileErrorMsg()!!)
|
||||
}
|
||||
}
|
||||
|
||||
fun invokeCloudCrtFile(deviceCrtFile: String, rootCrtFile: String) {
|
||||
@@ -26,6 +32,13 @@ object CallerCloudListenerManager : CallerBase<IMoGoCloudListener>() {
|
||||
}
|
||||
}
|
||||
|
||||
fun invokeCloudCrtError(errorMsg: String){
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.authCrtError(errorMsg)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分发获取到的设备sn
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user