codhandler/codeng/inc/CodProgress.inl
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the License "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *      Inline method definitions of class TCodProgress.   
       
    16 *      
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef COD_PROGRESS_INL
       
    22 #define COD_PROGRESS_INL
       
    23 
       
    24 // ================= MEMBER FUNCTIONS =======================
       
    25 
       
    26 // ---------------------------------------------------------
       
    27 // TCodProgress::TCodProgress()
       
    28 // ---------------------------------------------------------
       
    29 //
       
    30 TCodProgress::TCodProgress( MCodLoadObserver* aObserver )
       
    31 : iPhase( ELoad ), iObserver( aObserver )
       
    32     {
       
    33     iMax[ELoad] = 0;
       
    34     iMax[ENotify] = 0;
       
    35     iCur[ELoad] = 0;
       
    36     iCur[ENotify] = 0;
       
    37     }
       
    38 
       
    39 // ---------------------------------------------------------
       
    40 // TCodProgress::FinalValue()
       
    41 // ---------------------------------------------------------
       
    42 //
       
    43 TInt TCodProgress::FinalValue()
       
    44     {
       
    45     // +1 is for 'DoneL': progress is not completed until explicitly said so.
       
    46     return iMax[ELoad] + iMax[ENotify] + 1;
       
    47     }
       
    48 
       
    49 // ---------------------------------------------------------
       
    50 // TCodProgress::CurrentValue()
       
    51 // ---------------------------------------------------------
       
    52 //
       
    53 TInt TCodProgress::CurrentValue()
       
    54     {
       
    55     return iCur[ELoad] + iCur[ENotify];
       
    56     }
       
    57 
       
    58 #endif /* def DD_PARSER_INL */