|
1 /* |
|
2 * Copyright (c) 2006-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: The handler for the SAT Plug-in |
|
15 * Set Up Idle Mode Text proactive command. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CAISATNOTIFIER_H |
|
21 #define CAISATNOTIFIER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "mpluginapi.h" // Needed in cpp and header |
|
25 |
|
26 class RSatSession; |
|
27 class RSatService; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * This is the handler for the Set Up Idle Mode Text proactive command. |
|
33 * This active objects is registered with ETel SAT Api to receive notifications |
|
34 * about the incoming Display Text commands. |
|
35 * |
|
36 * @since S60 v3.2 |
|
37 * |
|
38 */ |
|
39 class CAiSatNotifier : public CActive |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 |
|
43 /** |
|
44 * Part of the two phased constuction |
|
45 * |
|
46 * @param MPluginAPI& aPlugin a ref to a object implementing MPluginAPI |
|
47 * (the object ordering a notification of the content status change) |
|
48 * @param RSatService& aSatService a ref to RSatService |
|
49 * @return Pointer to the created CAiSatNotifier object |
|
50 */ |
|
51 static CAiSatNotifier* NewL( MPluginAPI& aPlugin, |
|
52 RSatService& aSatService ); |
|
53 |
|
54 /** |
|
55 * Destructor |
|
56 */ |
|
57 virtual ~CAiSatNotifier(); |
|
58 |
|
59 /** |
|
60 * Starts listening for the Sat command. |
|
61 * @return Error code. |
|
62 */ |
|
63 TInt Start(); |
|
64 |
|
65 /** |
|
66 * Whether the P&S has content or not. |
|
67 * @return whether has content or not. |
|
68 */ |
|
69 TBool HasContent(); |
|
70 |
|
71 /** |
|
72 * Get Idle mode data to member: string, icon qualifier, icon id. |
|
73 * |
|
74 * @param aDupIcon Whether the icon is the same with previous one |
|
75 * @param aDupText Whether the icon is the same with previous one |
|
76 */ |
|
77 void GetIdleModeDataL( TBool& aDupIcon, TBool& aDupText ); |
|
78 |
|
79 /** |
|
80 * Get idle text string |
|
81 * |
|
82 * @param aString Idle text string. |
|
83 */ |
|
84 void GetIdleTextString( TPtrC& aString ); |
|
85 |
|
86 /** |
|
87 * Idle icon record id |
|
88 * |
|
89 * @return Icon record id |
|
90 */ |
|
91 TUint8 IdleIconId(); |
|
92 |
|
93 /** |
|
94 * Idle icon qualifier |
|
95 * |
|
96 * @return Icon qualifier |
|
97 */ |
|
98 RSatService::TSatIconQualifier IdleIconQualifier(); |
|
99 |
|
100 protected: // From base class CActive |
|
101 |
|
102 /** |
|
103 * From CActive |
|
104 * Handles the request completion. |
|
105 */ |
|
106 void RunL(); |
|
107 |
|
108 /** |
|
109 * From CActive |
|
110 * Implements the cancel protocol. |
|
111 */ |
|
112 void DoCancel(); |
|
113 |
|
114 private: // Constructors |
|
115 |
|
116 /** |
|
117 * Constructor to use in the object creation. |
|
118 * Initializes the necessary data. |
|
119 * |
|
120 * @param aPlugin Ref to a object implementing MPluginAPI |
|
121 * (the object ordering a notification of the content status change) |
|
122 * @param aSatService Ref to a RSatService |
|
123 */ |
|
124 CAiSatNotifier( MPluginAPI& aPlugin, |
|
125 RSatService& aSatService ); |
|
126 |
|
127 /** |
|
128 * To continue listening to the Sat command. |
|
129 */ |
|
130 void Activate(); |
|
131 |
|
132 private: // Data |
|
133 |
|
134 /** |
|
135 * Idle mode text. |
|
136 * Own |
|
137 */ |
|
138 HBufC* iString; |
|
139 |
|
140 /** |
|
141 * Idle mode icon id. |
|
142 */ |
|
143 TUint8 iRecordId; |
|
144 |
|
145 /** |
|
146 * Idle mode icon qualifier. |
|
147 */ |
|
148 RSatService::TSatIconQualifier iIconQualifier; |
|
149 |
|
150 /** |
|
151 * CAiSatPlugin reference. |
|
152 */ |
|
153 MPluginAPI& iPlugin; |
|
154 |
|
155 /** |
|
156 * RSatService reference from CAiSatEngine. |
|
157 */ |
|
158 RSatService& iSatService; |
|
159 |
|
160 /** |
|
161 * Identify the first start up. |
|
162 */ |
|
163 TBool iFirstStartup; |
|
164 |
|
165 }; |
|
166 |
|
167 #endif // CAISATNOTIFIER_H |
|
168 |