42 #ifndef QUNIXSOCKET_P_H 43 #define QUNIXSOCKET_P_H 56 #include <QtNetwork/qabstractsocket.h> 57 #include <QtCore/qiodevice.h> 58 #include <QtCore/qlist.h> 59 #include <QtCore/qshareddata.h> 62 #include <sys/types.h> 106 bool rightsWereTruncated()
const;
110 pid_t processId()
const;
111 uid_t userId()
const;
112 gid_t groupId()
const;
114 void setProcessId(pid_t);
115 void setUserId(uid_t);
116 void setGroupId(gid_t);
118 bool isValid()
const;
145 ReadFailure, WriteFailure };
148 bool setSocketDescriptor(
int socketDescriptor);
149 int socketDescriptor()
const;
163 qint64 readBufferSize()
const;
164 void setReadBufferSize(
qint64 size);
165 qint64 rightsBufferSize()
const;
166 void setRightsBufferSize(
qint64 size);
202 #endif // QUNIXSOCKET_P_H qint64 write(const QByteArray &byteArray)
qint64 write(const char *data, qint64 maxSize)
#define QT_END_NAMESPACE
This macro expands to.
The QUnixSocket class provides a Unix domain socket.
virtual bool waitForReadyRead(int msecs)
Blocks until new data is available for reading and the readyRead() signal has been emitted...
qint64 read(char *data, qint64 maxSize)
virtual void close()
First emits aboutToClose(), then closes the device and sets its OpenMode to NotOpen.
QSharedDataPointer< QUnixSocketRightsPrivate > d
virtual qint64 writeData(const char *data, qint64 len)=0
Writes up to maxSize bytes from data to the device.
The QByteArray class provides an array of bytes.
SocketState
The SocketState enumeration represents the connection state of a QUnixSocket instance.
QByteArray read(qint64 maxSize)
The QObject class is the base class of all Qt objects.
The QUnixSocketRights class encapsulates QUnixSocket rights data.
qint64 read(char *data, qint64 maxlen)
Reads at most maxSize bytes from the device into data, and returns the number of bytes read...
virtual qint64 bytesToWrite() const
For buffered devices, this function returns the number of bytes waiting to be written.
#define QT_BEGIN_NAMESPACE
This macro expands to.
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
static const char * data(const QByteArray &arr)
SocketError
The SocketError enumeration represents the various errors that can occur on a Unix domain socket...
virtual bool isSequential() const
Returns true if this device is sequential; otherwise returns false.
virtual qint64 readData(char *data, qint64 maxlen)=0
Reads up to maxSize bytes from the device into data, and returns the number of bytes read or -1 if an...
QSharedDataPointer< QUnixSocketMessagePrivate > d
virtual qint64 bytesAvailable() const
Returns the number of bytes that are available for reading.
virtual bool waitForBytesWritten(int msecs)
For buffered devices, this function waits until a payload of buffered written data has been written t...
Q_CORE_EXPORT QTextStream & flush(QTextStream &s)
virtual bool canReadLine() const
Returns true if a complete line of data can be read from the device; otherwise returns false...
qint64 write(const char *data, qint64 len)
Writes at most maxSize bytes of data from data to the device.
The QIODevice class is the base interface class of all I/O devices in Qt.
The QUnixSocketMessage class encapsulates a message sent or received through the QUnixSocket class...