tstaskmonitor/utils/src/tsentrykeygenerator.cpp
changeset 83 156f692b1687
equal deleted inserted replaced
80:397d00875918 83:156f692b1687
       
     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:  Task list entry
       
    15  *
       
    16 */
       
    17 #include "tsentrykeygenerator.h"
       
    18 
       
    19 // -----------------------------------------------------------------------------
       
    20 //
       
    21 // -----------------------------------------------------------------------------
       
    22 //
       
    23 TTsEntryKey TsEntryKeyGeneraror::GenerateL(TInt windowGroupId, 
       
    24                                            const TArray<RWsSession::TWindowGroupChainInfo>& groupChain) 
       
    25 {
       
    26     for (TInt iter(0); iter < groupChain.Count(); ++iter) {
       
    27         if (groupChain[iter].iId == windowGroupId) {
       
    28             return 0 >= groupChain[iter].iParentId ?
       
    29                    TTsEntryKey(windowGroupId) :
       
    30                    TsEntryKeyGeneraror::GenerateL(groupChain[iter].iParentId, groupChain);
       
    31         }
       
    32     }
       
    33     User::Leave(KErrNotFound);
       
    34     // for avoid compile error
       
    35     return TTsEntryKey(); 
       
    36 }
       
    37