blob: fba494b029dc98f27de050c35da1e893622669cc (
plain)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
//Auto-generated by kalyptus. DO NOT EDIT.
package org.trinitydesktop.koala;
import org.trinitydesktop.qt.TQt;
import org.trinitydesktop.qt.TQMetaObject;
import org.trinitydesktop.qt.QtSupport;
import org.trinitydesktop.qt.TQObject;
import org.trinitydesktop.qt.TQObject;
/**
This class provides a simple means for IPC between two applications
via a pipe.
It handles a queue of commands to be sent which makes it possible to
queue data before an actual connection has been established.
@short This class provides a simple means for IPC between two applications via a pipe.
*/
public class Connection extends TQObject {
protected Connection(Class dummy){super((Class) null);}
public native TQMetaObject metaObject();
public native String className();
/**
Creates a new connection.
@short Creates a new connection.
@see #init
*/
public Connection() {
super((Class) null);
newConnection();
}
private native void newConnection();
/**
Initialize this connection to use the given socket.
@param sock the socket to use
@short Initialize this connection to use the given socket.
@see #inited
*/
// void init(TDESocket* arg1); >>>> NOT CONVERTED
/**
Initialize the connection to use the given file
descriptors.
@param fd_in the input file descriptor to use
@param fd_out the output file descriptor to use
@short Initialize the connection to use the given file descriptors.
@see #inited
*/
public native void init(int fd_in, int fd_out);
public native void connect(TQObject receiver, String member);
public native void connect(TQObject receiver);
public native void connect();
public native void close();
/**
Returns the input file descriptor.
@return the input file descriptor
@short Returns the input file descriptor.
*/
public native int fd_from();
/**
Returns the output file descriptor.
@return the output file descriptor
@short Returns the output file descriptor.
*/
public native int fd_to();
/**
Checks whether the connection has been initialized.
@return true if the initialized
@short Checks whether the connection has been initialized.
@see #init
*/
public native boolean inited();
/**
Sends/queues the given command to be sent.
@param cmd the command to set
@param arr the bytes to send
@short Sends/queues the given command to be sent.
*/
public native void send(int cmd, byte[] arr);
public native void send(int cmd);
/**
Sends the given command immediately.
@param _cmd the command to set
@param data the bytes to send
@return true if successful, false otherwise
@short Sends the given command immediately.
*/
public native boolean sendnow(int _cmd, byte[] data);
/**
Receive data.
@param _cmd the received command will be written here
@param data the received data will be written here
@return >=0 indicates the received data size upon success
-1 indicates error
@short Receive data.
*/
public native int read(int[] _cmd, byte[] data);
/**
Don't handle incoming data until resumed.
@short Don't handle incoming data until resumed.
*/
public native void suspend();
/**
Resume handling of incoming data.
@short Resume handling of incoming data.
*/
public native void resume();
/**
Returns status of connection.
@return true if suspended, false otherwise
@short Returns status of connection.
*/
public native boolean suspended();
protected native void dequeue();
}
|