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 new message shortcut target. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CAISCUTTARGETNEWMSG_H |
|
20 #define CAISCUTTARGETNEWMSG_H |
|
21 |
|
22 #include <msvstd.h> |
|
23 |
|
24 #include "caiscuttarget.h" |
|
25 |
|
26 class CGulIcon; |
|
27 |
|
28 /** |
|
29 * Implements a new message or new email shortcut target |
|
30 * |
|
31 * Handles parsing and launching a new message shortcut target |
|
32 * |
|
33 * @since S60 v3.2 |
|
34 */ |
|
35 class CAiScutTargetNewMsg : public CAiScutTarget |
|
36 { |
|
37 |
|
38 public: |
|
39 |
|
40 /** |
|
41 * First phase constructor |
|
42 * |
|
43 * @since S60 v3.2 |
|
44 * @param aEngine Reference to the plug-in engine |
|
45 * @param aParser Shortcut definition parser |
|
46 */ |
|
47 static CAiScutTargetNewMsg* NewL( |
|
48 CAiScutEngine& aEngine, TShortcutType aType, const TAiScutParser& aParser); |
|
49 |
|
50 virtual ~CAiScutTargetNewMsg(); |
|
51 |
|
52 /** |
|
53 * Returns the shortcut definition string |
|
54 * |
|
55 * @since S60 v3.2 |
|
56 * @return Shortcut definition string |
|
57 */ |
|
58 TPtrC Definition() const; |
|
59 |
|
60 /** |
|
61 * See base class |
|
62 */ |
|
63 TInt GetCaption(TPtrC& aDes, TAiScutAppTitleType aTitleType) const; |
|
64 |
|
65 /** |
|
66 * See base class |
|
67 */ |
|
68 TInt GetIcon(CGulIcon*& aIcon) const; |
|
69 |
|
70 /** |
|
71 * See base class |
|
72 */ |
|
73 TBool IsAccessibleL(TInt aCheckType); |
|
74 |
|
75 /** |
|
76 * Launches the shortcut |
|
77 * |
|
78 * @since S60 v3.2 |
|
79 */ |
|
80 void LaunchL(); |
|
81 |
|
82 /** |
|
83 * Return application uid this target launches. |
|
84 * |
|
85 * @since S60 v3.2 |
|
86 */ |
|
87 TUid AppUid() const; |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 |
|
93 protected: |
|
94 |
|
95 private: |
|
96 |
|
97 CAiScutTargetNewMsg(CAiScutEngine& aEngine, TShortcutType aType); |
|
98 |
|
99 void ConstructL(const TAiScutParser& aParser); |
|
100 |
|
101 /** |
|
102 * |
|
103 */ |
|
104 void GetCaptionL(TAiScutAppTitleType aTitleType) const; |
|
105 |
|
106 /** |
|
107 * Leaving version of GetIcon. |
|
108 */ |
|
109 void GetIconL(CGulIcon*& aIcon) const; |
|
110 |
|
111 void ShowErrorNote(); |
|
112 |
|
113 private: // data |
|
114 |
|
115 /** |
|
116 * Application uid. |
|
117 */ |
|
118 TUid iAppUid; |
|
119 |
|
120 /** |
|
121 * Possible view uid. |
|
122 */ |
|
123 TUid iViewUid; |
|
124 |
|
125 /** |
|
126 * Shortcut caption. |
|
127 * Own. |
|
128 */ |
|
129 mutable HBufC* iCaption; |
|
130 |
|
131 /** |
|
132 * Shortcut short caption. |
|
133 * Own. |
|
134 */ |
|
135 mutable HBufC* iShortCaption; |
|
136 |
|
137 /** |
|
138 * Holds the shortcut definition string |
|
139 * Owned. |
|
140 */ |
|
141 HBufC* iDefinition; |
|
142 |
|
143 /** |
|
144 * Message type |
|
145 */ |
|
146 TUid iMtm; |
|
147 }; |
|
148 |
|
149 #endif // CAISCUTTARGETNEWMSG_H |
|
150 |
|
151 // End of File. |
|