Logo Search packages:      
Sourcecode: kmess version File versions  Download package

void MsnObjectTransferP2P::userStarted3_UserPrepares (  )  [private, virtual]

Step three of a user-started chat: the user prepares for the session.

Reimplemented from Application.

Definition at line 684 of file msnobjecttransferp2p.cpp.

References P2PApplication::sendDataPreparationAck().

{
#ifdef KMESSDEBUG_MSNOBJECTTRANSFER_P2P
  kDebug();
#endif

#ifdef KMESSTEST
  KMESS_ASSERT(   file_ == 0          );
  KMESS_ASSERT( ! fileName_.isEmpty() );
#endif

  if( file_ != 0 )
  {
    // TODO: Quick fix for WML8, this method is called twice because WLM8
    // initializes a Direct connection while it sent the data preparation
#ifdef KMESSDEBUG_MSNOBJECTTRANSFER_P2P
    kWarning() << "this method was already called before.";
#endif
    return;
  }


  file_ = new QFile(fileName_);
  bool success = file_->open(QIODevice::WriteOnly);

  if( ! success )
  {
    // Notify the user, even if debug mode is not enabled.
    kWarning() << "Unable to open file: " << fileName_ << "!";

    // Close the file (also causes gotData() to fail)
    delete file_;
    file_ = 0;
    return;
  }

  // Acknowledge the data-preparation message
  // Final step is the gotData() handling..
  sendDataPreparationAck();
}


Generated by  Doxygen 1.6.0   Back to index