email/pop3andsmtpmtm/smtpservermtm/inc/SMTS.INL
changeset 0 72b543305e3a
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // TImSmtpProgress() inline functions
       
    15 // 
       
    16 //
       
    17 
       
    18 
       
    19 
       
    20 inline TMsgImOutboxSendState TImSmtpProgress::Status() const
       
    21 	{
       
    22 	return iStatus;	
       
    23 	}
       
    24 
       
    25 inline void TImSmtpProgress::SetStatus(TMsgImOutboxSendState aStatus)
       
    26 	{
       
    27 	iStatus = aStatus;
       
    28 	}
       
    29 
       
    30 
       
    31 inline void TImSmtpProgress::SetError(TInt anError)
       
    32 	{
       
    33 	iError=anError;
       
    34 	}
       
    35 
       
    36 inline TInt TImSmtpProgress::Error() const
       
    37 	{
       
    38 	return iError;
       
    39 	}
       
    40 
       
    41 
       
    42 inline TInt TImSmtpProgress::MsgNo() const
       
    43 	{
       
    44 	return iMsgNo;
       
    45 	}
       
    46 
       
    47 inline void TImSmtpProgress::SetMsgNo(TInt aMsgNo)
       
    48 	{
       
    49 	iMsgNo = aMsgNo;
       
    50 	}
       
    51 
       
    52 
       
    53 inline TInt TImSmtpProgress::Sent() const
       
    54 	{
       
    55 	return iSent;	
       
    56 	}
       
    57 
       
    58 
       
    59 inline TInt TImSmtpProgress::NotSent() const
       
    60 	{
       
    61 	return iNotSent;	
       
    62 	}
       
    63 
       
    64 
       
    65 inline TInt TImSmtpProgress::FailedToSend() const
       
    66 	{
       
    67 	return iFailedToSend;	
       
    68 	}
       
    69 
       
    70 
       
    71 inline TInt TImSmtpProgress::SendTotal() const
       
    72 	{
       
    73 	return iSendTotal;	
       
    74 	}
       
    75 
       
    76 
       
    77 inline void TImSmtpProgress::InitialiseTotal(const TInt& aTotal)
       
    78 	{
       
    79 	iNotSent=aTotal;
       
    80 	iSendTotal=aTotal;
       
    81 	iSent=0;
       
    82 	iFailedToSend=0;
       
    83 	iError=0;
       
    84 	iMsgNo=0;
       
    85 	iSendFileProgress.iBytesSent=0;
       
    86 	iSendFileProgress.iBytesToSend=0;
       
    87 	iSendFileProgress.iSessionState=EConnectingToSmtp;
       
    88 	iStatus=EMsgOutboxProgressWaiting;
       
    89 	}
       
    90 
       
    91 
       
    92 inline void TImSmtpProgress::UpdateSent()
       
    93 	{
       
    94 	iNotSent--;
       
    95 	iSent++;
       
    96 	}
       
    97 
       
    98 
       
    99 inline void TImSmtpProgress::UpdateFailedToSend()
       
   100 	{
       
   101 	iNotSent--;
       
   102 	iFailedToSend++;	// only changed if message was couldn't be sent
       
   103 	}
       
   104 
       
   105 inline void TImSmtpProgress::DecrementSendTotal()
       
   106 	{
       
   107 	// used to lower send total when I discover one message in collection 
       
   108 	// which has been deleted before I had a chance to send it.
       
   109 	iSendTotal--;
       
   110 	iNotSent--;
       
   111 	}
       
   112