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

void PPOP3Server::OnLIST ( PINDEX  msg  )  [protected, virtual]

Get the size of a message in mailbox. If msg is 0 then get sizes of all messages in mailbox.

Parameters:
msg  Number of message.

Definition at line 1233 of file inetmail.cxx.

References PInternetProtocol::WriteLine(), and PInternetProtocol::WriteResponse().

Referenced by ProcessCommand().

{
  if (msg == 0) {
    WriteResponse(okResponse, psprintf("%u messages.", messageSizes.GetSize()));
    for (PINDEX i = 0; i < messageSizes.GetSize(); i++)
      if (!messageDeletions[i])
        WriteLine(psprintf("%u %u", i+1, messageSizes[i]));
    WriteLine(".");
  }
  else if (msg < 1 || msg > messageSizes.GetSize())
    WriteResponse(errResponse, "No such message.");
  else
    WriteResponse(okResponse, psprintf("%u %u", msg, messageSizes[msg-1]));
}


Generated by  Doxygen 1.6.0   Back to index