1 /* |
|
2 * Copyright (c) 2009 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 : |
|
15 * |
|
16 */ |
|
17 |
|
18 #include <apgwgnam.h> |
|
19 #include "tsrunningapp.h" |
|
20 |
|
21 //------------------------------------------------------------------------------ |
|
22 CTsRunningApp* CTsRunningApp::NewLC( |
|
23 MTsResourceManager& aResources, |
|
24 const RWsSession::TWindowGroupChainInfo& aInfo ) |
|
25 { |
|
26 CTsRunningApp* self = new(ELeave) CTsRunningApp(aResources, aInfo); |
|
27 CleanupStack::PushL( self ); |
|
28 return self; |
|
29 } |
|
30 |
|
31 //------------------------------------------------------------------------------ |
|
32 CTsRunningApp::~CTsRunningApp() |
|
33 { |
|
34 delete iWindowGroupName; |
|
35 } |
|
36 |
|
37 //------------------------------------------------------------------------------ |
|
38 CTsRunningApp::CTsRunningApp( MTsResourceManager& aResources, |
|
39 const RWsSession::TWindowGroupChainInfo& aInfo ) |
|
40 : |
|
41 iResources(aResources), |
|
42 iWindowGroupInfo(aInfo) |
|
43 { |
|
44 //No implementation required |
|
45 } |
|
46 |
|
47 //------------------------------------------------------------------------------ |
|
48 const CApaWindowGroupName& CTsRunningApp::WindowGroupNameL() const |
|
49 { |
|
50 if( 0 == iWindowGroupName ) |
|
51 { |
|
52 iWindowGroupName = CApaWindowGroupName::NewL( iResources.WsSession(), |
|
53 WindowGroupId() ); |
|
54 } |
|
55 return *iWindowGroupName; |
|
56 } |
|
57 |
|
58 //------------------------------------------------------------------------------ |
|
59 TUid CTsRunningApp::UidL()const |
|
60 { |
|
61 return WindowGroupNameL().AppUid(); |
|
62 } |
|
63 |
|
64 //------------------------------------------------------------------------------ |
|
65 const TDesC& CTsRunningApp::CaptionL() const |
|
66 { |
|
67 iCaption.Set(WindowGroupNameL().Caption()); |
|
68 return iCaption; |
|
69 |
|
70 } |
|
71 |
|
72 //------------------------------------------------------------------------------ |
|
73 TInt CTsRunningApp::WindowGroupId() const |
|
74 { |
|
75 return iWindowGroupInfo.iId; |
|
76 } |
|
77 |
|
78 //------------------------------------------------------------------------------ |
|
79 TInt CTsRunningApp::ParentWindowGroupId() const |
|
80 { |
|
81 return iWindowGroupInfo.iParentId; |
|
82 } |
|
83 |
|
84 //------------------------------------------------------------------------------ |
|
85 TBool CTsRunningApp::IsEmbeded() const |
|
86 { |
|
87 return 0 < iWindowGroupInfo.iParentId; |
|
88 } |
|
89 |
|
90 //------------------------------------------------------------------------------ |
|
91 TBool CTsRunningApp::IsHiddenL() const |
|
92 { |
|
93 return WindowGroupNameL().Hidden(); |
|
94 } |
|
95 |
|
96 //------------------------------------------------------------------------------ |
|
97 TBool CTsRunningApp::IsSystemL() const |
|
98 { |
|
99 return WindowGroupNameL().IsSystem(); |
|
100 } |
|