Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

void tmQueue::FlushQueue ( PRUint32  aClientID  ) 

Removes all the transactions being held in the queue. A reply is created and sent to the client to indicate the completion of the operation.

Definition at line 153 of file tmQueue.cpp.

References tmVector::Clear(), tmTransaction::Init(), IsAttached(), tmTransactionManager::SendTransaction(), and tmVector::Size().

Referenced by tmTransactionManager::HandleTransaction().

                                      {

  if(!IsAttached(aClientID))
    return;

  PRUint32 size = mTransactions.Size();
  for (PRUint32 index = 0; index < size; index++)
    if (mTransactions[index])
      delete (tmTransaction*)mTransactions[index];

  mTransactions.Clear();

  tmTransaction trans;
  if (NS_SUCCEEDED(trans.Init(aClientID,
                               mID, 
                               TM_FLUSH_REPLY, 
                               NS_OK,
                               nsnull,
                               0))) {
    mTM->SendTransaction(aClientID, &trans);
  }
}


Generated by  Doxygen 1.6.0   Back to index