|
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: This class is the imstatuspaneindicator plugin implementation |
|
15 */ |
|
16 |
|
17 |
|
18 #ifndef __CIMSTATUSPANEINDICATORPLUGINIMPLEMENTATION_H |
|
19 #define __CIMSTATUSPANEINDICATORPLUGINIMPLEMENTATION_H |
|
20 |
|
21 // Until aknstylusactivatedpopupcontent.h is fixed |
|
22 class TAknWindowComponentLayout; |
|
23 |
|
24 // INCLUDES |
|
25 #include <AknIndicatorPlugin.h> |
|
26 #include "imstatuspaneindicatorpluginuids.h" |
|
27 |
|
28 |
|
29 //system includes |
|
30 #include <aknenv.h> |
|
31 #include <e32base.h> |
|
32 #include <barsc.h> |
|
33 #include <xSPViewServices.h> |
|
34 |
|
35 //Forward Declarations |
|
36 class CIMStatusPaneIndicator; |
|
37 class RxSPViewServices; |
|
38 |
|
39 _LIT( KResourceDir, "\\resource\\" ); |
|
40 _LIT( KIndicatorResourceFile, "imstatuspaneindicatorpluginrss.rsc" ); |
|
41 const TInt KMaxMessageNumberLength = 4; // 9999 = 4 numbers |
|
42 const TInt KMaxResourcePathLength = 512; |
|
43 #define KMECOIMPLEMENTATIONUID 0x20012423 |
|
44 /** |
|
45 * Instant msg indicator Plug-in implementation |
|
46 * |
|
47 * @lib ImIndicatorPlugin |
|
48 * @since 5.0 |
|
49 */ |
|
50 class CIMStatusPaneIndicatorPluginImplementation : public CAknIndicatorPlugin |
|
51 |
|
52 |
|
53 { |
|
54 |
|
55 public: // Constructors and destructor |
|
56 |
|
57 /** |
|
58 * Two-phased constructor. |
|
59 */ |
|
60 static CIMStatusPaneIndicatorPluginImplementation* NewL(); |
|
61 |
|
62 /** |
|
63 * Destructor. |
|
64 */ |
|
65 ~CIMStatusPaneIndicatorPluginImplementation(); |
|
66 |
|
67 public:// From CAknIndicatorPlugin |
|
68 |
|
69 /** |
|
70 * Returns the description used as link text, displayed with |
|
71 * the indicator icon in the indicator popup. |
|
72 * |
|
73 * @param aUid UID of the indicator. |
|
74 * @param[out] aTextType Type of the text, |
|
75 * @see TAknIndicatorPluginTextTypes. |
|
76 * |
|
77 * @return Indicator description or link text. |
|
78 * Ownership is transferred. |
|
79 */ |
|
80 HBufC* TextL( const TInt aUid, TInt& aTextType ); |
|
81 |
|
82 /** |
|
83 * @see CAknIndicatorPlugin |
|
84 */ |
|
85 void HandleIndicatorTapL( const TInt aUid ); |
|
86 |
|
87 private: |
|
88 |
|
89 /** |
|
90 * C++ default constructor. |
|
91 */ |
|
92 CIMStatusPaneIndicatorPluginImplementation(); |
|
93 |
|
94 /** |
|
95 * By default Symbian 2nd phase constructor is private. |
|
96 */ |
|
97 void ConstructL(); |
|
98 |
|
99 private: // new functions |
|
100 |
|
101 /** |
|
102 * Create singular or plural content message for the popup |
|
103 * @return constructed text |
|
104 * |
|
105 * NOTE! Ownership of the text is transferred to caller. |
|
106 */ |
|
107 HBufC* CreatePopupContentMessageL(); |
|
108 |
|
109 /** |
|
110 * Shows IM message(s) |
|
111 */ |
|
112 void ShowMessageL(); |
|
113 |
|
114 private: // data |
|
115 |
|
116 // environment |
|
117 CCoeEnv& iCoeEnv; |
|
118 |
|
119 // offset index for resource file |
|
120 TInt iResourceOffset; |
|
121 // Owns. Popup content singular (template) |
|
122 HBufC* iPopupTextOne; |
|
123 |
|
124 // Owns. Popup content plural (template) |
|
125 HBufC* iPopupTextMultiple; |
|
126 |
|
127 CIMStatusPaneIndicator* iIMStatusPaneIndicator; |
|
128 /* |
|
129 * Handle to xSPViewServices. |
|
130 */ |
|
131 RxSPViewServices iViewServices; |
|
132 }; |
|
133 |
|
134 #endif // __CIMSTATUSPANEINDICATORPLUGINIMPLEMENTATION_H |
|
135 |
|
136 // End of File |