|
|
#ifndef PYTHONQTWRAPPER_QLOCALSOCKET_H
|
|
|
#define PYTHONQTWRAPPER_QLOCALSOCKET_H
|
|
|
|
|
|
#include <qlocalsocket.h>
|
|
|
#include <QObject>
|
|
|
|
|
|
#include <QVariant>
|
|
|
#include <qbytearray.h>
|
|
|
#include <qcoreevent.h>
|
|
|
#include <qlist.h>
|
|
|
#include <qlocalsocket.h>
|
|
|
#include <qobject.h>
|
|
|
|
|
|
class PythonQtWrapper_QLocalSocket : public QObject
|
|
|
{ Q_OBJECT
|
|
|
public:
|
|
|
Q_ENUMS(LocalSocketState LocalSocketError )
|
|
|
enum LocalSocketState{
|
|
|
UnconnectedState = QLocalSocket::UnconnectedState, ConnectingState = QLocalSocket::ConnectingState, ConnectedState = QLocalSocket::ConnectedState, ClosingState = QLocalSocket::ClosingState};
|
|
|
enum LocalSocketError{
|
|
|
ConnectionRefusedError = QLocalSocket::ConnectionRefusedError, PeerClosedError = QLocalSocket::PeerClosedError, ServerNotFoundError = QLocalSocket::ServerNotFoundError, SocketAccessError = QLocalSocket::SocketAccessError, SocketResourceError = QLocalSocket::SocketResourceError, SocketTimeoutError = QLocalSocket::SocketTimeoutError, DatagramTooLargeError = QLocalSocket::DatagramTooLargeError, ConnectionError = QLocalSocket::ConnectionError, UnsupportedSocketOperationError = QLocalSocket::UnsupportedSocketOperationError, UnknownSocketError = QLocalSocket::UnknownSocketError};
|
|
|
public slots:
|
|
|
QLocalSocket* new_QLocalSocket(QObject* parent = 0);
|
|
|
void delete_QLocalSocket(QLocalSocket* obj) { delete obj; }
|
|
|
void abort(QLocalSocket* theWrappedObject);
|
|
|
qint64 bytesAvailable(QLocalSocket* theWrappedObject) const;
|
|
|
qint64 bytesToWrite(QLocalSocket* theWrappedObject) const;
|
|
|
bool canReadLine(QLocalSocket* theWrappedObject) const;
|
|
|
void close(QLocalSocket* theWrappedObject);
|
|
|
void connectToServer(QLocalSocket* theWrappedObject, const QString& name, QIODevice::OpenMode openMode = QIODevice::ReadWrite);
|
|
|
void disconnectFromServer(QLocalSocket* theWrappedObject);
|
|
|
QLocalSocket::LocalSocketError error(QLocalSocket* theWrappedObject) const;
|
|
|
bool flush(QLocalSocket* theWrappedObject);
|
|
|
QString fullServerName(QLocalSocket* theWrappedObject) const;
|
|
|
bool isSequential(QLocalSocket* theWrappedObject) const;
|
|
|
bool isValid(QLocalSocket* theWrappedObject) const;
|
|
|
qint64 readBufferSize(QLocalSocket* theWrappedObject) const;
|
|
|
QString serverName(QLocalSocket* theWrappedObject) const;
|
|
|
void setReadBufferSize(QLocalSocket* theWrappedObject, qint64 size);
|
|
|
bool setSocketDescriptor(QLocalSocket* theWrappedObject, quintptr socketDescriptor, QLocalSocket::LocalSocketState socketState = QLocalSocket::ConnectedState, QIODevice::OpenMode openMode = QIODevice::ReadWrite);
|
|
|
quintptr socketDescriptor(QLocalSocket* theWrappedObject) const;
|
|
|
QLocalSocket::LocalSocketState state(QLocalSocket* theWrappedObject) const;
|
|
|
bool waitForBytesWritten(QLocalSocket* theWrappedObject, int msecs = 30000);
|
|
|
bool waitForConnected(QLocalSocket* theWrappedObject, int msecs = 30000);
|
|
|
bool waitForDisconnected(QLocalSocket* theWrappedObject, int msecs = 30000);
|
|
|
bool waitForReadyRead(QLocalSocket* theWrappedObject, int msecs = 30000);
|
|
|
};
|
|
|
|
|
|
#endif // PYTHONQTWRAPPER_QLOCALSOCKET_H
|
|
|
|