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: Class for empty target. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "caiscuttargetempty.h" |
|
20 |
|
21 // ---------------------------------------------------------------------------- |
|
22 // CAiScutEmpty::CAiScutEmpty |
|
23 // ---------------------------------------------------------------------------- |
|
24 // |
|
25 CAiScutTargetEmpty::CAiScutTargetEmpty(CAiScutEngine& aEngine, TShortcutType aType) |
|
26 : CAiScutTarget(aEngine, aType) |
|
27 { |
|
28 } |
|
29 |
|
30 // ---------------------------------------------------------------------------- |
|
31 // CAiScutEmpty::ConstructL |
|
32 // ---------------------------------------------------------------------------- |
|
33 // |
|
34 void CAiScutTargetEmpty::ConstructL(const TDesC& aTarget) |
|
35 { |
|
36 iDefinition = aTarget.AllocL(); |
|
37 } |
|
38 |
|
39 // ---------------------------------------------------------------------------- |
|
40 // CAiScutEmpty::NewL |
|
41 // ---------------------------------------------------------------------------- |
|
42 // |
|
43 CAiScutTargetEmpty* CAiScutTargetEmpty::NewL( |
|
44 CAiScutEngine& aEngine, TShortcutType aType, const TDesC& aTarget) |
|
45 { |
|
46 CAiScutTargetEmpty* self = new (ELeave) CAiScutTargetEmpty(aEngine, aType); |
|
47 |
|
48 CleanupStack::PushL(self); |
|
49 self->ConstructL(aTarget); |
|
50 CleanupStack::Pop(self); |
|
51 |
|
52 return self; |
|
53 } |
|
54 |
|
55 // ---------------------------------------------------------------------------- |
|
56 // CAiScutEmpty::~CAiScutEmpty |
|
57 // ---------------------------------------------------------------------------- |
|
58 // |
|
59 CAiScutTargetEmpty::~CAiScutTargetEmpty() |
|
60 { |
|
61 delete iDefinition; |
|
62 } |
|
63 |
|
64 // --------------------------------------------------------------------------- |
|
65 // Returns the shortcut definition string |
|
66 // --------------------------------------------------------------------------- |
|
67 // |
|
68 TPtrC CAiScutTargetEmpty::Definition() const |
|
69 { |
|
70 return iDefinition ? TPtrC(*iDefinition) : TPtrC(); |
|
71 } |
|
72 |
|
73 // --------------------------------------------------------------------------- |
|
74 // Returns the shortcut target caption. |
|
75 // --------------------------------------------------------------------------- |
|
76 // |
|
77 TInt CAiScutTargetEmpty::GetCaption(TPtrC& aDes, TAiScutAppTitleType /*aTitleType*/) const |
|
78 { |
|
79 aDes.Set(KNullDesC()); |
|
80 return 0; |
|
81 } |
|
82 |
|
83 // --------------------------------------------------------------------------- |
|
84 // Returns the shortcut target icon. |
|
85 // --------------------------------------------------------------------------- |
|
86 // |
|
87 TInt CAiScutTargetEmpty::GetIcon(CGulIcon*& aIcon) const |
|
88 { |
|
89 aIcon = NULL; |
|
90 return 0; |
|
91 } |
|
92 |
|
93 // ----------------------------------------------------------------------------- |
|
94 // Checks if the target is accessible |
|
95 // ----------------------------------------------------------------------------- |
|
96 // |
|
97 TBool CAiScutTargetEmpty::IsAccessibleL(TInt /*aCheckType*/) |
|
98 { |
|
99 return (iType != EScutUnknown); |
|
100 } |
|
101 |
|
102 // ----------------------------------------------------------------------------- |
|
103 // |
|
104 // ----------------------------------------------------------------------------- |
|
105 // |
|
106 void CAiScutTargetEmpty::LaunchL() |
|
107 { |
|
108 } |
|
109 |
|
110 // --------------------------------------------------------------------------- |
|
111 // Return application uid this target launches. |
|
112 // --------------------------------------------------------------------------- |
|
113 // |
|
114 TUid CAiScutTargetEmpty::AppUid() const |
|
115 { |
|
116 return KNullUid; |
|
117 } |
|
118 |
|
119 // End of File. |
|