idlefw/src/framework/aifwstartupscheduler.cpp
branchRCL_3
changeset 9 d0529222e3f0
parent 4 1a2a00e78665
child 10 5ef93ea513cb
child 18 bd874ee5e5e2
equal deleted inserted replaced
4:1a2a00e78665 9:d0529222e3f0
     1 /*
       
     2 * Copyright (c) 2005-2006 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 "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:  AvtiveIdle2 startup scheduler
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "aifwstartupscheduler.h"
       
    20 
       
    21 CAiFwStartupScheduler::CAiFwStartupScheduler()
       
    22     : iResult(KErrNone)
       
    23     {
       
    24     }
       
    25 
       
    26 CAiFwStartupScheduler* CAiFwStartupScheduler::NewLC()
       
    27     {
       
    28     CAiFwStartupScheduler* self = new(ELeave) CAiFwStartupScheduler;
       
    29     CleanupStack::PushL(self);
       
    30     return self;
       
    31     }
       
    32 
       
    33 CAiFwStartupScheduler::~CAiFwStartupScheduler()
       
    34     {
       
    35     }
       
    36 
       
    37 TInt CAiFwStartupScheduler::Result()
       
    38     {
       
    39     return iResult;
       
    40     }
       
    41 
       
    42 // All RunL leaves from active objects which execute during Active Idle
       
    43 // Framework startup end up here
       
    44 void CAiFwStartupScheduler::Error(TInt aError) const
       
    45     {
       
    46     // Store any error code
       
    47     if (aError != KErrNone && iResult == KErrNone)
       
    48         {
       
    49         iResult = aError;
       
    50         }
       
    51         
       
    52     // Stop the scheduler as all errors during Active Idle Framework startup
       
    53     // are fatal
       
    54     Stop();
       
    55     }
       
    56