equal
deleted
inserted
replaced
|
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 TInt TsEntryKeyGeneraror::Generate(TTsEntryKey& returnKey, 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 returnKey = TTsEntryKey(windowGroupId); |
|
29 if (groupChain[iter].iId == groupChain[iter].iParentId) { |
|
30 return KErrBadHandle; |
|
31 } |
|
32 else if (0 >= groupChain[iter].iParentId) { |
|
33 return KErrNone; |
|
34 } |
|
35 else { |
|
36 return TsEntryKeyGeneraror::Generate(returnKey, groupChain[iter].iParentId, groupChain); |
|
37 } |
|
38 } |
|
39 } |
|
40 return KErrNotFound; |
|
41 } |
|
42 |