feat: expose ES10c.EuiccMemoryReset #88
4 changed files with 17 additions and 0 deletions
|
@ -37,6 +37,8 @@ interface LocalProfileAssistant {
|
|||
fun deleteNotification(seqNumber: Long): Boolean
|
||||
fun handleNotification(seqNumber: Long): Boolean
|
||||
|
||||
fun euiccMemoryReset()
|
||||
|
||||
fun setNickname(
|
||||
iccid: String, nickname: String
|
||||
): Boolean
|
||||
|
|
|
@ -33,6 +33,8 @@ internal object LpacJni {
|
|||
// Cancel any ongoing es9p and/or es10b sessions
|
||||
external fun cancelSessions(handle: Long)
|
||||
|
||||
// ES10c
|
||||
external fun es10cEuiccMemoryReset(handle: Long): Int
|
||||
// es10cex (actually part of es10b)
|
||||
external fun es10cexGetEuiccInfo2(handle: Long): Long
|
||||
|
||||
|
|
|
@ -241,6 +241,10 @@ class LocalProfileAssistantImpl(
|
|||
override fun setNickname(iccid: String, nickname: String): Boolean =
|
||||
LpacJni.es10cSetNickname(contextHandle, iccid, nickname) == 0
|
||||
|
||||
override fun euiccMemoryReset() {
|
||||
LpacJni.es10cEuiccMemoryReset(contextHandle)
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
override fun close() {
|
||||
if (!finalized) {
|
||||
|
|
|
@ -245,6 +245,15 @@ Java_net_typeblog_lpac_1jni_LpacJni_es10cexGetEuiccInfo2(JNIEnv *env, jobject th
|
|||
return (jlong) info;
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_net_typeblog_lpac_1jni_LpacJni_es10cEuiccMemoryReset(JNIEnv *env, jobject thiz, jlong handle) {
|
||||
struct euicc_ctx *ctx = (struct euicc_ctx *) handle;
|
||||
int ret;
|
||||
ret = es10c_euicc_memory_reset(ctx);
|
||||
return ret
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_net_typeblog_lpac_1jni_LpacJni_stringDeref(JNIEnv *env, jobject thiz, jlong curr) {
|
||||
return toJString(env, *((char **) curr));
|
||||
|
|
Loading…
Add table
Reference in a new issue