Logo Search packages:      
Sourcecode: kmess version File versions

void P2PApplicationBase::setWaitingState ( P2PWaitingState  waitingState,
int  timeout 
) [protected, inherited]

Indicate which packet is expected next.

Parameters:
waitingState The new waiting state.
timeout Number of milliseconds before a timer fires and showTimeoutMessage() is called. The contact's client will be informed automatically that it forgot to send some data. If this value is 0, it means the class temporary changes the state for debugging.

Definition at line 2058 of file p2papplicationbase.cpp.

Referenced by P2PApplicationBase::endApplicationLater(), P2PApplication::gotAck(), P2PApplication::gotAck_dataPreparation(), P2PApplication::gotAck_dataReceived(), P2PApplication::gotAck_slpError(), P2PApplication::gotAck_slpSessionInvitation(), P2PApplication::gotAck_slpSessionOk(), P2PApplication::gotAck_slpTransferDecline(), P2PApplication::gotAck_slpTransferInvitation(), P2PApplication::gotAck_slpTransferOk(), P2PApplication::gotDataComplete(), P2PApplicationBase::gotDataFragment(), P2PApplication::gotDataPreparation(), P2PApplication::gotDirectConnectionHandshake(), P2PApplicationBase::gotErrorAck(), P2PApplication::gotSlpInvite(), P2PApplication::gotSlpOk(), P2PApplication::gotSlpSessionInvitation(), P2PApplication::gotSlpStatus(), P2PApplication::gotSlpTransferInvitation(), P2PApplication::gotSlpTransferResponse(), P2PApplication::initiateTransfer(), P2PApplicationBase::sendDataPreparation(), P2PApplicationBase::sendNextDataParts(), P2PApplication::sendSlpBye(), P2PApplication::sendSlpError(), P2PApplication::sendSlpInvitation(), P2PApplication::sendSlpOkMessage(), P2PApplication::sendSlpTransferInvitation(), P2PApplication::slotConnectionAuthorized(), and P2PApplication::slotConnectionEstablished().

{
#ifdef KMESSDEBUG_P2PAPPLICATION_GENERAL
  unsigned long sessionID = getSessionID();

  if( timeout == 0 )
  {
#ifdef KMESSTEST
    KMESS_ASSERT( ! waitingTimer_->isActive() );
#endif

    if( waitingState_ != waitingState )
    {
      kDebug() << "temporary switching waitingState of session" << sessionID << "from" << waitingState_ << "to" << waitingState;
    }
  }
  else
  {
    if( waitingState_ != waitingState )
    {
      kDebug() << "switching waitingState of session" << sessionID << "from" << waitingState_ << "to" << waitingState;
    }
    else
    {
      kDebug() << "resuming waitingState of session" << sessionID << "for" << waitingState_;
    }
  }
#endif

  // Update the state
  waitingState_ = waitingState;

  // Restart the timer
  if( timeout != 0 )
  {
    waitingTimer_->start( timeout );
  }
}


Generated by  Doxygen 1.6.0   Back to index