org.kde.koala

Class Connection

public class Connection extends QObject

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.

UNKNOWN: This class provides a simple means for IPC between two applications via a pipe.

Constructor Summary
protected Connection(Class dummy)
Connection()
Creates a new connection.
Method Summary
StringclassName()
voidclose()
voidconnect(QObject receiver, String member)
voidconnect(QObject receiver)
voidconnect()
protected voiddequeue()
intfd_from()
Returns the input file descriptor.
intfd_to()
Returns the output file descriptor.
voidinit(int fd_in, int fd_out)
Initialize the connection to use the given file descriptors.
booleaninited()
Checks whether the connection has been initialized.
QMetaObjectmetaObject()
intread(int[] _cmd, byte[] data)
Receive data.
voidresume()
Resume handling of incoming data.
voidsend(int cmd, byte[] arr)
Sends/queues the given command to be sent.
voidsend(int cmd)
booleansendnow(int _cmd, byte[] data)
Sends the given command immediately.
voidsuspend()
Don't handle incoming data until resumed.
booleansuspended()
Returns status of connection.

Constructor Detail

Connection

protected Connection(Class dummy)

Connection

public Connection()
Creates a new connection.

See Also: Connection

UNKNOWN: Creates a new connection.

Method Detail

className

public String className()

close

public void close()

connect

public void connect(QObject receiver, String member)

connect

public void connect(QObject receiver)

connect

public void connect()

dequeue

protected void dequeue()

fd_from

public int fd_from()
Returns the input file descriptor.

Returns: the input file descriptor

UNKNOWN: Returns the input file descriptor.

fd_to

public int fd_to()
Returns the output file descriptor.

Returns: the output file descriptor

UNKNOWN: Returns the output file descriptor.

init

public void init(int fd_in, int fd_out)
Initialize the connection to use the given file descriptors.

Parameters: fd_in the input file descriptor to use fd_out the output file descriptor to use

See Also: Connection

UNKNOWN: Initialize the connection to use the given file descriptors.

inited

public boolean inited()
Checks whether the connection has been initialized.

Returns: true if the initialized

See Also: Connection

UNKNOWN: Checks whether the connection has been initialized.

metaObject

public QMetaObject metaObject()

read

public int read(int[] _cmd, byte[] data)
Receive data.

Parameters: _cmd the received command will be written here data the received data will be written here

Returns: >=0 indicates the received data size upon success -1 indicates error

UNKNOWN: Receive data.

resume

public void resume()
Resume handling of incoming data.

UNKNOWN: Resume handling of incoming data.

send

public void send(int cmd, byte[] arr)
Sends/queues the given command to be sent.

Parameters: cmd the command to set arr the bytes to send

UNKNOWN: Sends/queues the given command to be sent.

send

public void send(int cmd)

sendnow

public boolean sendnow(int _cmd, byte[] data)
Sends the given command immediately.

Parameters: _cmd the command to set data the bytes to send

Returns: true if successful, false otherwise

UNKNOWN: Sends the given command immediately.

suspend

public void suspend()
Don't handle incoming data until resumed.

UNKNOWN: Don't handle incoming data until resumed.

suspended

public boolean suspended()
Returns status of connection.

Returns: true if suspended, false otherwise

UNKNOWN: Returns status of connection.