diff options
Diffstat (limited to 'src/modules/objects/class_socket.cpp')
-rw-r--r-- | src/modules/objects/class_socket.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/modules/objects/class_socket.cpp b/src/modules/objects/class_socket.cpp index 5b52ad4c..5b9103b3 100644 --- a/src/modules/objects/class_socket.cpp +++ b/src/modules/objects/class_socket.cpp @@ -57,7 +57,7 @@ KviScriptSocketObject::KviScriptSocketObject(KviScriptObjectClass * cla,KviScrip { m_uConnectionId = 0; m_sock = KVI_INVALID_SOCKET; - m_iStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED; + m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED; m_uRemotePort = 0; m_uSecondaryPort = 0; m_pSn = 0; @@ -128,7 +128,7 @@ void KviScriptSocketObject::reset() m_pOutBuffer = new KviDataBuffer(); m_uInBufferLen = 0; m_uInDataLen = 0; - m_iStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED; + m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED; m_uRemotePort = 0; m_szRemoteIp.clear(); m_uLocalPort = 0; @@ -366,7 +366,7 @@ void KviScriptSocketObject::reset() KVSO_BEGIN_REGISTERCLASS(KviKvsObject_socket,"socket","object") - KVSO_REGISTER_HANDLER(KviKvsObject_socket,"status",functionStatus) + KVSO_REGISTER_HANDLER(KviKvsObject_socket,"status",functiontqStatus) KVSO_REGISTER_HANDLER(KviKvsObject_socket,"remotePort",functionRemotePort) KVSO_REGISTER_HANDLER(KviKvsObject_socket,"remoteIp",functionRemoteIp) KVSO_REGISTER_HANDLER(KviKvsObject_socket,"localIp",functionLocalIp) @@ -398,7 +398,7 @@ KVSO_BEGIN_CONSTRUCTOR(KviKvsObject_socket,KviKvsObject) m_bUdp = false; m_uConnectionId = 0; m_sock = KVI_INVALID_SOCKET; - m_iStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED; + m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED; m_uRemotePort = 0; m_uSecondaryPort = 0; m_pSn = 0; @@ -430,15 +430,15 @@ KVSO_END_DESTRUCTOR(KviKvsObject_socket) //---------------------- -bool KviKvsObject_socket::functionStatus(KviKvsObjectFunctionCall *c) +bool KviKvsObject_socket::functiontqStatus(KviKvsObjectFunctionCall *c) { - c->returnValue()->setInteger(m_iStatus); + c->returnValue()->setInteger(m_itqStatus); return true; } bool KviKvsObject_socket::functionClose(KviKvsObjectFunctionCall *c) { - if((m_pOutBuffer->size() != 0) && (m_iStatus == KVI_SCRIPT_SOCKET_STATUS_CONNECTED)) + if((m_pOutBuffer->size() != 0) && (m_itqStatus == KVI_SCRIPT_SOCKET_STATUS_CONNECTED)) tryFlush(); reset(); @@ -591,7 +591,7 @@ bool KviKvsObject_socket::functionConnect(KviKvsObjectFunctionCall *c) c->warning(__tr2qs("Value %d for port is out of range (values allowed are from 0 to 65535"),m_uRemotePort); return true; } - if((m_sock != KVI_INVALID_SOCKET) || (m_iStatus != KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED)) + if((m_sock != KVI_INVALID_SOCKET) || (m_itqStatus != KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED)) { c->warning(__tr2qs("Another connection in progress")); c->returnValue()->setBoolean(true); @@ -608,11 +608,11 @@ bool KviKvsObject_socket::functionConnect(KviKvsObjectFunctionCall *c) debug ("ok connecting"); debug ("connectinhg on ip %s ",m_szRemoteIp.latin1()); debug ("non so ip"); - m_iStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTING; + m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTING; delayedConnect(); } else { debug ("connectinhg on ip %s port %d",m_szRemoteIp.latin1(),m_uRemotePort); - m_iStatus = KVI_SCRIPT_SOCKET_STATUS_DNS; + m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_DNS; delayedLookupRemoteIp(); } c->returnValue()->setBoolean(true); @@ -626,7 +626,7 @@ bool KviKvsObject_socket::functionConnect(KviKvsObjectFunctionCall *c) bool KviKvsObject_socket::functionListen(KviKvsObjectFunctionCall *c) { - if((m_sock != KVI_INVALID_SOCKET) || (m_iStatus != KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED)) + if((m_sock != KVI_INVALID_SOCKET) || (m_itqStatus != KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED)) { c->warning(__tr2qs("Another connection in progress")); c->returnValue()->setBoolean(false); @@ -770,7 +770,7 @@ bool KviKvsObject_socket::functionListen(KviKvsObjectFunctionCall *c) TQObject::connect(m_pSn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(incomingConnection(int))); m_pSn->setEnabled(true); - m_iStatus = KVI_SCRIPT_SOCKET_STATUS_LISTENING; + m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_LISTENING; c->returnValue()->setBoolean(true); return true; @@ -846,7 +846,7 @@ void KviKvsObject_socket::acceptConnection(kvi_socket_t s,kvi_u32_t uPort,const sareal.getStringAddress(m_szLocalIp); } - m_iStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTED; + m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTED; m_pSn = new TQSocketNotifier((int)m_sock,TQSocketNotifier::Read); TQObject::connect(m_pSn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(readNotifierFired(int))); @@ -1070,7 +1070,7 @@ void KviKvsObject_socket::writeNotifierFired(int) KviKvsVariantList *params=0; callFunction(this,"connectEvent",params); if(m_uConnectionId == uOldConnectionId) - m_iStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTED; + m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTED; // else the connection has been already changed! } } @@ -1256,7 +1256,7 @@ void KviKvsObject_socket::reset() m_pOutBuffer = new KviDataBuffer(); m_uInBufferLen = 0; m_uInDataLen = 0; - m_iStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED; + m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED; m_uRemotePort = 0; m_szRemoteIp=""; m_uLocalPort = 0; |