File: calls.java

package info (click to toggle)
pilot-link 0.8.7-2
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 2,256 kB
  • ctags: 3,233
  • sloc: ansic: 24,039; java: 2,162; cpp: 1,641; sh: 1,585; makefile: 1,363; perl: 723; yacc: 660; python: 239; tcl: 14
file content (78 lines) | stat: -rw-r--r-- 6,164 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78

package Pdapilot;

import java.io.*;

public class calls {
	static public native int pi_close(int socket) throws IOException;
	static public native int pi_socket(int domain, int type, int protocol) throws IOException;
	static public native int pi_bind(int socket, String device) throws IOException;
	static public native int pi_listen(int socket, int backlog) throws IOException;
	static public native int pi_accept(int socket) throws IOException;
	static public native int pi_version(int socket) throws IOException;
	static public native int pi_tickle(int socket) throws IOException;
	static public native int pi_watchdog(int socket, int interval) throws IOException;
	static public native int pi_read(int socket, byte[] data, int len) throws IOException;
	static public native int pi_write(int socket, byte[] data, int len) throws IOException;
	static public native int dlp_OpenDB(int socket, int card, int mode, String name) throws DlpException;
	static public native int dlp_DeleteDB(int socket, int card, String name) throws DlpException;
	static public native int dlp_EndOfSync(int socket, int status) throws DlpException;
	static public native int dlp_DeleteCategory(int socket, int handle, int category) throws DlpException;
	static public native int dlp_CloseDB(int socket, int handle) throws DlpException;
	static public native int dlp_AddSyncLogEntry(int socket, String entry) throws DlpException;
	static public native String dlp_strerror(int error);

	static public native java.util.Date dlp_GetSysDateTime(int socket) throws DlpException;
	static public native int dlp_SetSysDateTime(int socket, java.util.Date date) throws DlpException;
	static public native AppBlock dlp_ReadAppBlock(int socket, int handle, Database dbClass) throws DlpException;
	static public native SortBlock dlp_ReadSortBlock(int socket, int handle, Database dbClass) throws DlpException;
	static public native Pref dlp_ReadAppPreference(int socket, Char4 creator, int id, boolean backup, Database dbClass) throws DlpException;
	static public native Record dlp_ReadRecordByIndex(int socket, int handle, int index, Database dbClass) throws DlpException;
	static public native Record dlp_ReadNextModifiedRec(int socket, int handle, Database dbClass) throws DlpException;
	static public native Record dlp_ReadNextModifiedRecInCategory(int socket, int handle, int category, Database dbClass) throws DlpException;
	static public native Record dlp_ReadNextRecInCategory(int socket, int handle, int category, Database dbClass) throws DlpException;
	static public native Record dlp_ReadRecordByID(int socket, int handle, RecordID id, Database dbClass) throws DlpException;
	static public native Resource dlp_ReadResourceByType(int socket, int handle, Char4 type, int id, Database dbClass) throws DlpException;
	static public native Resource dlp_ReadResourceByIndex(int socket, int handle, int index, Database dbClass) throws DlpException;
	static public native int dlp_WriteRecord(int socket, int handle, Record record) throws DlpException;
	static public native int dlp_WriteAppPreference(int socket, Pref pref) throws DlpException;
	static public native int dlp_WriteResource(int socket, int handle, Resource resource) throws DlpException;
	static public native int dlp_WriteAppBlock(int socket, int handle, AppBlock appblock) throws DlpException;
	static public native int dlp_WriteSortBlock(int socket, int handle, SortBlock sortblock) throws DlpException;
	static public native CardInfo dlp_ReadStorageInfo(int socket, int card) throws DlpException;
	static public native int dlp_CreateDB(int socket, Char4 creator, Char4 type, int card, int flags, int version, String name) throws DlpException;
	static public native int dlp_ResetSystem(int socket) throws DlpException;
	static public native int dlp_OpenConduit(int socket) throws DlpException;
	static public native UserInfo dlp_ReadUserInfo(int socket) throws DlpException;
	static public native int dlp_WriteUserInfo(int socket, UserInfo info) throws DlpException;
	static public native SysInfo dlp_ReadSysInfo(int socket) throws DlpException;
	static public native NetInfo dlp_ReadNetSyncInfo(int socket) throws DlpException;
	static public native int dlp_WriteNetSyncInfo(int socket, NetInfo info) throws DlpException;
	static public native DBInfo dlp_ReadDBList(int socket, int card, int flags, int start) throws DlpException;
	static public native int dlp_CleanUpDatabase(int socket, int handle) throws DlpException;
	static public native int dlp_ResetSyncFlags(int socket, int handle) throws DlpException;
	static public native int dlp_MoveCategory(int socket, int handle, int from, int to) throws DlpException;
	static public native int dlp_DeleteRecord(int socket, int handle, boolean all, RecordID id) throws DlpException;
	static public native int dlp_DeleteResource(int socket, int handle, boolean all, Char4 type, int id) throws DlpException;
	static public native int dlp_ReadOpenDBInfo(int socket, int handle) throws DlpException;
	static public native int dlp_ReadFeature(int socket, Char4 creator, int id) throws DlpException;
	static public native RecordID[] dlp_ReadRecordIDList(int socket, int handle, boolean sort, int start, int max) throws DlpException;
	static public native byte[] dlp_CallApplication(int socket, Char4 creator, int type, int action, byte[] argument, int[] retcode) throws DlpException;
	static public native int dlp_ResetDBIndex(int socket, int handle) throws DlpException;
	
	static public byte[] getByteArray(int length) { return new byte[length]; }
	static public int getArrayLength(byte[] array) { return array.length; }
	static public RecordID[] makeRecordIDArray(int length) { return new RecordID[length]; }
	static public Object[] makeStringArray(int length) { return new String[length]; }
	static public int[] makeIntArray(int length) { return new int[length]; }
	static public boolean[] makeBooleanArray(int length) { return new boolean[length]; }
	static public Object[] makeDateArray(int length) { return new java.util.Date[length]; }
	static public int getObjectArrayLength(Object[] array) { return array.length; }
	
	static {
		System.loadLibrary("JavaPisock");
	}
	
	
}