#include <QtCrypto>
Unbuffered direct pipe.
This class is not usually required except for very low level operations. You should use QPipe and QPipeEnd for most applications.
The type of device.
Enumerator |
---|
Read |
The pipe end can be read from.
|
Write |
The pipe end can be written to.
|
QCA::QPipeDevice::QPipeDevice |
( |
QObject * |
parent = 0 | ) |
|
Standard constructor.
- Parameters
-
parent | the parent object to this object |
Type QCA::QPipeDevice::type |
( |
| ) |
const |
The Type of the pipe device (that is, read or write)
bool QCA::QPipeDevice::isValid |
( |
| ) |
const |
Test whether this object corresponds to a valid pipe.
Q_PIPE_ID QCA::QPipeDevice::id |
( |
| ) |
const |
The low level identification for this pipe.
On Windows, this is a HANDLE. On Unix, this is a file descriptor (i.e. integer).
Code using this method should be carefully tested for portability.
- See also
- idAsInt
int QCA::QPipeDevice::idAsInt |
( |
| ) |
const |
The low level identification for this pipe, returned as an integer.
Code using this method should be carefully tested for portability.
- See also
- id().
void QCA::QPipeDevice::take |
( |
Q_PIPE_ID |
id, |
|
|
Type |
t |
|
) |
| |
Take over an existing pipe id, closing the old pipe if any.
- Parameters
-
id | the identification of the pipe end to take over. |
t | the type of pipe end (read or write). |
void QCA::QPipeDevice::enable |
( |
| ) |
|
Enable the pipe for reading or writing (depending on Type)
void QCA::QPipeDevice::close |
( |
| ) |
|
void QCA::QPipeDevice::release |
( |
| ) |
|
Release the pipe end, but do not close it.
bool QCA::QPipeDevice::setInheritable |
( |
bool |
enabled | ) |
|
Set the pipe end to be inheritable.
- Note
- On Windows, this operation changes the pipe end id value.
- Parameters
-
enabled | whether the pipe is inheritable (true) or not (false) |
int QCA::QPipeDevice::bytesAvailable |
( |
| ) |
const |
Obtain the number of bytes available to be read.
int QCA::QPipeDevice::read |
( |
char * |
data, |
|
|
int |
maxsize |
|
) |
| |
Read from the pipe end.
- Parameters
-
data | where to put the data that has been read |
maxsize | the maximum number of bytes to be read. |
- Returns
- the actual number of bytes read, 0 on end-of-file, or -1 on error.
int QCA::QPipeDevice::write |
( |
const char * |
data, |
|
|
int |
size |
|
) |
| |
Write to the pipe end.
- Parameters
-
data | the source of the data to be written |
size | the number of bytes in the data to be written |
- Note
- the data source must remain valid
- Returns
- the number of bytes written, or -1 on error.
int QCA::QPipeDevice::writeResult |
( |
int * |
written | ) |
const |
The result of a write operation.
- Parameters
-
written | if not null, this will be set to the number of bytes written in the last operation. |
- Returns
- 0 on success (all data written), or -1 on error
void QCA::QPipeDevice::notify |
( |
| ) |
|
|
signal |
Emitted when the pipe end can be read from or written to (depending on its Type).
The documentation for this class was generated from the following file: