contextframework/cfw/src/cfserver/cfphaseloadingrules.cpp
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 /*
       
     2 * Copyright (c) 2008 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:  CFPhaseLoadingRules class implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "cfphaseloadingrules.h"
       
    20 #include "CFContextObjectImpl.h"
       
    21 #include "cfcontextinterface.h"
       
    22 #include "cfwcontextdef.h"
       
    23 #include "cftrace.h"
       
    24 
       
    25 // ======== MEMBER FUNCTIONS ========
       
    26 
       
    27 // ---------------------------------------------------------------------------
       
    28 // CCFPhaseLoadingRules::NewL
       
    29 // ---------------------------------------------------------------------------
       
    30 //
       
    31 CCFPhaseLoadingRules* CCFPhaseLoadingRules::NewL(
       
    32     MCFContextInterface& aCF )
       
    33     {
       
    34     FUNC_LOG;
       
    35     
       
    36     CCFPhaseLoadingRules* self = CCFPhaseLoadingRules::NewLC( aCF );
       
    37     CleanupStack::Pop( self );
       
    38     
       
    39     return self;
       
    40     }
       
    41 
       
    42 // ---------------------------------------------------------------------------
       
    43 // CCFPhaseLoadingRules::NewLC
       
    44 // ---------------------------------------------------------------------------
       
    45 //
       
    46 CCFPhaseLoadingRules* CCFPhaseLoadingRules::NewLC(
       
    47     MCFContextInterface& aCF )
       
    48     {
       
    49     FUNC_LOG;
       
    50     
       
    51     CCFPhaseLoadingRules* self = new( ELeave ) CCFPhaseLoadingRules( aCF );
       
    52     CleanupStack::PushL( self );
       
    53     self->ConstructL();
       
    54     
       
    55     return self;
       
    56     }
       
    57 
       
    58 // ---------------------------------------------------------------------------
       
    59 // CCFPhaseLoadingRules::~CCFPhaseLoadingRules
       
    60 // ---------------------------------------------------------------------------
       
    61 //
       
    62 CCFPhaseLoadingRules::~CCFPhaseLoadingRules()
       
    63     {
       
    64     FUNC_LOG;
       
    65     }
       
    66 
       
    67 // ---------------------------------------------------------------------------
       
    68 // CCFPhaseLoadingRules::ConstructL
       
    69 // ---------------------------------------------------------------------------
       
    70 //
       
    71 void CCFPhaseLoadingRules::ConstructL()
       
    72     {
       
    73     FUNC_LOG;
       
    74     }
       
    75 
       
    76 // ---------------------------------------------------------------------------
       
    77 // CCFPhaseLoadingRules::CCFPhaseLoadingRules
       
    78 // ---------------------------------------------------------------------------
       
    79 //
       
    80 CCFPhaseLoadingRules::CCFPhaseLoadingRules(
       
    81     MCFContextInterface& aCF ):
       
    82     CCFPhaseBase( CCFPhaseBase::ECFLoadingPlugins, aCF )
       
    83     {
       
    84     FUNC_LOG;
       
    85     }
       
    86 
       
    87 //-----------------------------------------------------------------------------
       
    88 // CCFPhaseLoadingRules::ExecuteL
       
    89 //-----------------------------------------------------------------------------
       
    90 //
       
    91 void CCFPhaseLoadingRules::ExecuteL( TRequestStatus* aStatus )
       
    92     {
       
    93     FUNC_LOG;
       
    94 
       
    95     // Store request
       
    96     iStarterRequest = aStatus;    
       
    97     }
       
    98 
       
    99 //-----------------------------------------------------------------------------
       
   100 // CCFPhaseLoadingRules::NextPhase
       
   101 //-----------------------------------------------------------------------------
       
   102 //
       
   103 CCFPhaseBase::TCFPhaseId CCFPhaseLoadingRules::NextPhase() const
       
   104     {
       
   105     FUNC_LOG;
       
   106     
       
   107     return CCFPhaseBase::ECFCfwReady;
       
   108     }
       
   109     
       
   110 //-----------------------------------------------------------------------------
       
   111 // CCFPhaseLoadingRules::HandleEvent
       
   112 //-----------------------------------------------------------------------------
       
   113 //
       
   114 void CCFPhaseLoadingRules::HandleEvent( MCFStarterEventHandler::TCFStarterEvents aEvent )
       
   115     {
       
   116     FUNC_LOG;
       
   117        
       
   118     if( aEvent == MCFStarterEventHandler::EContextSourcePluginsLoaded )
       
   119         {
       
   120     	  iContextSourcePluginsLoaded = ETrue;
       
   121         }
       
   122     else if(aEvent == MCFStarterEventHandler::EActionPluginsLoaded)
       
   123         {
       
   124     	  iActionPluginsLoaded = ETrue;
       
   125         }
       
   126 
       
   127     // Complete when context source and action plugins are loaded
       
   128     if( iContextSourcePluginsLoaded && iActionPluginsLoaded )
       
   129         {
       
   130         Complete( KErrNone );
       
   131         }    
       
   132     }