| 1 | /**************************************************************************** |
| 2 | ** |
| 3 | ** Copyright (C) 2006-2008 fullmetalcoder <[email protected]> |
| 4 | ** |
| 5 | ** This file is part of the Edyuk project <http://edyuk.org> |
| 6 | ** |
| 7 | ** This file may be used under the terms of the GNU General Public License |
| 8 | ** version 2 as published by the Free Software Foundation and appearing in the |
| 9 | ** file GPL.txt included in the packaging of this file. |
| 10 | ** |
| 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
| 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
| 13 | ** |
| 14 | ****************************************************************************/ |
| 15 | |
| 16 | #include "qmanagedsocket.h"cxx . . $ `<file>/gui/src/qcumber/qmanagedsocket.h`/ |
| 17 | |
| 18 | /*! |
| 19 | \file qmanagedsocket.cpp |
| 20 | |
| 21 | \brief Implementation of the QManagedSocket class. |
| 22 | */ |
| 23 | |
| 24 | #include <QTcpSocket> |
| 25 | |
| 26 | QManagedSocketcxx . . $ QManagedSocket#::QManagedSocketcxx . . $ QManagedSocket#QManagedSocket(7c2eb71eb177cfd8).(QTcpSocketcxx . . $ QTcpSocket# *s, QObjectcxx . . $ QObject# *p) |
| 27 | : QObjectcxx . . $ QObject#QObject(749de1b6ae65bddd).(p), pSocketcxx . . $ QManagedSocket#pSocket.(s) { |
| 28 | if (!s) qFatalcxx . . $ `<external>/10450329605257866924/qlogging.h:168:9`!("QManagedSocket fed with invalid socket descriptor..."); |
| 29 | |
| 30 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(s, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(readyRead()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(readyRead())); |
| 31 | |
| 32 | connectcxx . . $ QObject#connect(158df1d9a01a3410).(s, SIGNALcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:271:10`!(disconnected()), this, SLOTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:270:10`!(deleteLater())); |
| 33 | } |
| 34 | |
| 35 | QManagedSocketcxx . . $ QManagedSocket#::~cxx . . $ QManagedSocket#`~QManagedSocket`(49f6e7a06ebc5aa8).QManagedSocketcxx . . $ QManagedSocket#() {} |
| 36 | |
| 37 | void QManagedSocketcxx . . $ QManagedSocket#::sendcxx . . $ QManagedSocket#send(45672f3c6961a244).(const QByteArraycxx . . $ QByteArray# &msg) { pSocketcxx . . $ QManagedSocket#pSocket.->writecxx . . $ QIODevice#write(4ee2750a0be83987).(msg); } |
| 38 | |
| 39 | void QManagedSocketcxx . . $ QManagedSocket#::readyReadcxx . . $ QManagedSocket#readyRead(49f6e7a06ebc5aa8).() { |
| 40 | if (pSocketcxx . . $ QManagedSocket#pSocket.) { |
| 41 | QStringcxx . . $ QString# msg = QStringcxx . . $ QString#QString(e1217c004a86c950).::fromUtf8cxx . . $ QString#fromUtf8(4e15edac36d215be).(pSocketcxx . . $ QManagedSocket#pSocket.->readAllcxx . . $ QIODevice#readAll(b3c286cec66e09f4).()); |
| 42 | |
| 43 | emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! messagecxx . . $ QManagedSocket#message(3520e46b33348bf6).(msg); |
| 44 | emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! messagecxx . . $ QManagedSocket#message(c179580cee373a57).(msg, this); |
| 45 | } |
| 46 | } |