chiark / gitweb /
admin.scala: Start on understanding the administration protocol.
[tripe-android] / jni.java
CommitLineData
3a2f1a4b
MW
1package uk.org.distorted.tripe;
2
3class JNI {
4 static { System.loadLibrary("toy"); }
5 static class NativeObjectTypeException extends RuntimeException {
6 NativeObjectTypeException() { super(); }
7 NativeObjectTypeException(String msg) { super(msg); }
8 }
9
10 static final int CF_CLOSERD = 1, CF_CLOSEWR = 2;
11 static final int CF_CLOSEMASK = CF_CLOSERD | CF_CLOSEWR;
12
13 static native void test();
14
15 static native Object make();
16 static native void check(Object toy);
17
18 static native Object connect();
19 static native void send(Object conn, byte[] buf, int start, int len);
20 static native int recv(Object conn, byte[] buf, int start, int len);
21 static native void close(Object conn, int how);
22}