tdlight-java/src/main/java/it/tdlight/common/internal/NativeClientAccess.java

25 lines
819 B
Java
Raw Normal View History

2021-04-07 19:48:10 +02:00
package it.tdlight.common.internal;
2020-10-13 01:31:32 +02:00
import it.tdlight.jni.TdApi;
import it.tdlight.jni.TdApi.Function;
2021-10-22 12:54:28 +02:00
import it.tdlight.tdnative.NativeClient;
2020-10-13 01:31:32 +02:00
2021-09-27 19:27:13 +02:00
final class NativeClientAccess extends NativeClient {
2020-10-13 01:31:32 +02:00
public static int create() {
return NativeClientAccess.createNativeClient();
}
public static <R extends TdApi.Object> TdApi.Object execute(Function<R> function) {
2020-10-13 01:31:32 +02:00
return NativeClientAccess.nativeClientExecute(function);
}
public static <R extends TdApi.Object> void send(int nativeClientId, long eventId, TdApi.Function<R> function) {
2020-10-13 01:31:32 +02:00
NativeClientAccess.nativeClientSend(nativeClientId, eventId, function);
}
public static int receive(int[] clientIds, long[] eventIds, TdApi.Object[] events, double timeout) {
return NativeClientAccess.nativeClientReceive(clientIds, eventIds, events, timeout);
}
}