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

void MsnObjectTransferP2P::contactStarted1_gotDisplayPictureRequest (  )  [private]

Step one continued, the request is for the display picture.

Definition at line 179 of file msnobjecttransferp2p.cpp.

References Application::CANCEL_FAILED, contactStarted2_UserAccepts(), Application::getContactHandle(), Account::getMsnObjectString(), Account::getPicturePath(), MsnObject::hasChanged(), MsnObject::objectString(), and P2PApplication::sendCancelMessage().

Referenced by contactStarted1_ContactInvitesUser().

{
  // Send our display picture: check if the MSNObject the contact wants is the picture we've got.
  if( msnObject_.hasChanged( CurrentAccount::instance()->getMsnObjectString() ) )
  {
    kWarning() << "Contact " << getContactHandle() << " wants a display picture we don't have!\n"
                  "Requested object: " << msnObject_.objectString() << "\n"
                  "Current object:   " << CurrentAccount::instance()->getMsnObjectString() << "\n"
                  "Aborting invite.";
    sendCancelMessage( CANCEL_FAILED );
    return;
  }

  // The file to send is our picture
  fileName_ = CurrentAccount::instance()->getPicturePath();

  // Reject because there is no file to send
  if( fileName_.isEmpty() )
  {
    kWarning() << "Got an invitation, but we don't have a picture to send.";
    sendCancelMessage( CANCEL_FAILED );
    return;
  }

  // Everything seems OK, accept this message
  contactStarted2_UserAccepts();
}


Generated by  Doxygen 1.6.0   Back to index