Qt Cryptographic Architecture
|
Go to the documentation of this file.
34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
36 #ifndef QPIPE_NO_SECURE
49 typedef HANDLE Q_PIPE_ID;
50 #define INVALID_Q_PIPE_ID INVALID_HANDLE_VALUE
52 typedef int Q_PIPE_ID;
53 #define INVALID_Q_PIPE_ID -1
115 Q_PIPE_ID
id()
const;
171 int read(
char *data,
int maxsize);
183 int write(
const char *data,
int size);
205 friend class Private;
262 Q_PIPE_ID
id()
const;
362 QByteArray
read(
int bytes = -1);
460 friend class Private;
527 Q_DISABLE_COPY(
QPipe)
void setSecurityEnabled(bool secure)
Sets whether the pipe uses secure memory for read/write.
void close()
Close the pipe end.
bool setInheritable(bool enabled)
Set the pipe end to be inheritable.
Type
The type of device.
Definition: qpipe.h:83
void take(Q_PIPE_ID id, QPipeDevice::Type t)
Take over an existing pipe handle.
Q_PIPE_ID id() const
Pipe identification.
QPipeDevice::Type type() const
The type of pipe end (either read or write)
void reset()
Reset the pipe end to an inactive state.
int write(const char *data, int size)
Write to the pipe end.
void reset()
Reset the pipe.
void error(QCA::QPipeEnd::Error e)
Emitted when the pipe encounters an error trying to read or write, or if the other end of the pipe ha...
int writeResult(int *written) const
The result of a write operation.
bool isValid() const
Test whether this object corresponds to a valid pipe.
QCA - the Qt Cryptographic Architecture.
Definition: qca_basic.h:41
Q_PIPE_ID id() const
The low level identification for this pipe.
void enable()
Enable the pipe for reading or writing (depending on Type)
SecureArray takeBytesToWriteSecure()
Returns any unsent bytes queued for writing.
void release()
Let go of the active pipe handle, but don't close it.
SecureArray readSecure(int bytes=-1)
Read bytes from the pipe.
void release()
Release the pipe end, but do not close it.
@ ErrorEOF
End of file error.
Definition: qpipe.h:228
QPipeEnd & readEnd()
The read end of the pipe.
Definition: qpipe.h:519
void bytesWritten(int bytes)
Emitted when bytes have been written to the write end of the pipe.
void finalizeAndRelease()
Clear the contents of the pipe, and release the pipe.
void take(Q_PIPE_ID id, Type t)
Take over an existing pipe id, closing the old pipe if any.
int bytesToWrite() const
Returns the number of bytes pending to write.
int idAsInt() const
The low level identification for this pipe, returned as an integer.
QPipeDevice(QObject *parent=nullptr)
Standard constructor.
int idAsInt() const
Pipe identification.
void close()
Close the end of the pipe.
Definition: qca_tools.h:317
void enable()
Enable the endpoint for the pipe.
QByteArray read(int bytes=-1)
Read bytes from the pipe.
Type type() const
The Type of the pipe device (that is, read or write)
@ Read
The pipe end can be read from.
Definition: qpipe.h:84
int bytesAvailable() const
Determine how many bytes are available to be read.
void closed()
Emitted when this end of the pipe is closed as a result of calling close()
void notify()
Emitted when the pipe end can be read from or written to (depending on its Type).
QPipe(QObject *parent=nullptr)
Standard constructor.
void write(const QByteArray &a)
Write bytes to the pipe.
QPipeEnd & writeEnd()
The write end of the pipe.
Definition: qpipe.h:524
int read(char *data, int maxsize)
Read from the pipe end.
QPipeEnd(QObject *parent=nullptr)
Standard constructor.
void finalize()
Clear the contents of the pipe, and invalidate the pipe.
QByteArray takeBytesToWrite()
Returns any unsent bytes queued for writing.
Error
The type of error.
Definition: qpipe.h:227
void readyRead()
Emitted when there are bytes available to be read from the read end of the pipe.
int bytesAvailable() const
Obtain the number of bytes available to be read.
void writeSecure(const SecureArray &a)
Write bytes to the pipe.
bool isValid() const
Determine whether the pipe end is valid.
bool create(bool secure=false)
Create the pipe.
bool setInheritable(bool enabled)
Sets whether the pipe should be inheritable to child processes.