PythonQtWrapper_QUdpSocket.h
36 lines
| 1.6 KiB
| text/x-c
|
CLexer
florianlink
|
r13 | #ifndef PYTHONQTWRAPPER_QUDPSOCKET_H | ||
#define PYTHONQTWRAPPER_QUDPSOCKET_H | ||||
#include <qudpsocket.h> | ||||
#include <QObject> | ||||
#include <QVariant> | ||||
#include <qauthenticator.h> | ||||
#include <qbytearray.h> | ||||
#include <qcoreevent.h> | ||||
#include <qhostaddress.h> | ||||
#include <qlist.h> | ||||
#include <qnetworkproxy.h> | ||||
#include <qobject.h> | ||||
#include <qudpsocket.h> | ||||
class PythonQtWrapper_QUdpSocket : public QObject | ||||
{ Q_OBJECT | ||||
public: | ||||
Q_ENUMS(BindFlag ) | ||||
enum BindFlag{ | ||||
DefaultForPlatform = QUdpSocket::DefaultForPlatform, ShareAddress = QUdpSocket::ShareAddress, DontShareAddress = QUdpSocket::DontShareAddress, ReuseAddressHint = QUdpSocket::ReuseAddressHint}; | ||||
public slots: | ||||
QUdpSocket* new_QUdpSocket(QObject* parent = 0); | ||||
void delete_QUdpSocket(QUdpSocket* obj) { delete obj; } | ||||
bool bind(QUdpSocket* theWrappedObject, const QHostAddress& address, unsigned short port); | ||||
bool bind(QUdpSocket* theWrappedObject, const QHostAddress& address, unsigned short port, QUdpSocket::BindMode mode); | ||||
bool bind(QUdpSocket* theWrappedObject, unsigned short port = 0); | ||||
bool bind(QUdpSocket* theWrappedObject, unsigned short port, QUdpSocket::BindMode mode); | ||||
bool hasPendingDatagrams(QUdpSocket* theWrappedObject) const; | ||||
qint64 pendingDatagramSize(QUdpSocket* theWrappedObject) const; | ||||
qint64 readDatagram(QUdpSocket* theWrappedObject, char* data, qint64 maxlen, QHostAddress* host = 0, unsigned short* port = 0); | ||||
qint64 writeDatagram(QUdpSocket* theWrappedObject, const QByteArray& datagram, const QHostAddress& host, unsigned short port); | ||||
}; | ||||
#endif // PYTHONQTWRAPPER_QUDPSOCKET_H | ||||