1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // CLtsyCellBroadcastHandler |
|
15 |
|
16 #include <ctsy/ltsy/cctsydispatchercallback.h> |
|
17 #include <mmtsy_ipcdefs.h> |
|
18 |
|
19 #include "cltsycellbroadcasthandler.h" |
|
20 #include <ctsy/ltsy/ltsylogger.h> |
|
21 #include "ltsymacros.h" |
|
22 |
|
23 |
|
24 |
|
25 CLtsyCellBroadcastHandler::CLtsyCellBroadcastHandler( |
|
26 CCtsyDispatcherCallback& aCtsyDispatcherCallback) |
|
27 : iCtsyDispatcherCallback(aCtsyDispatcherCallback) |
|
28 { |
|
29 } |
|
30 |
|
31 |
|
32 CLtsyCellBroadcastHandler::~CLtsyCellBroadcastHandler() |
|
33 { |
|
34 } |
|
35 |
|
36 |
|
37 CLtsyCellBroadcastHandler* CLtsyCellBroadcastHandler::NewLC( |
|
38 CCtsyDispatcherCallback& aCtsyDispatcherCallback) |
|
39 { |
|
40 TSYLOGENTRYEXIT; |
|
41 CLtsyCellBroadcastHandler* self = new (ELeave) CLtsyCellBroadcastHandler(aCtsyDispatcherCallback); |
|
42 CleanupStack::PushL(self); |
|
43 self->ConstructL(); |
|
44 return self; |
|
45 } |
|
46 |
|
47 |
|
48 CLtsyCellBroadcastHandler* CLtsyCellBroadcastHandler::NewL(CCtsyDispatcherCallback& aCtsyDispatcherCallback) |
|
49 { |
|
50 TSYLOGENTRYEXIT; |
|
51 CLtsyCellBroadcastHandler* self= |
|
52 CLtsyCellBroadcastHandler::NewLC(aCtsyDispatcherCallback); |
|
53 CleanupStack::Pop(self); |
|
54 return self; |
|
55 } |
|
56 |
|
57 |
|
58 void CLtsyCellBroadcastHandler::ConstructL() |
|
59 /** |
|
60 * Second phase constructor. |
|
61 */ |
|
62 { |
|
63 TSYLOGENTRYEXIT; |
|
64 |
|
65 |
|
66 } // CLtsyCellBroadcastHandler::ConstructL |
|
67 |
|
68 TBool CLtsyCellBroadcastHandler::IsInterfaceSupported(TLtsyDispatchInterfaceApiId aDispatchApiId) |
|
69 /** |
|
70 * Returns whether a Dispatch Interface APi is supported or not. |
|
71 * |
|
72 * @param aDispatchApiId Id of Dispatch interface being queried |
|
73 * @return indication whether interface is supported or not |
|
74 */ |
|
75 { |
|
76 |
|
77 switch(aDispatchApiId) |
|
78 { |
|
79 // Insert ApiIds when support is provided in LTSY e.g. |
|
80 // case MLtsyDispatchPhoneBootNotifySimStatusReady::KLtsyDispatchPhoneBootNotifySimStatusReadyApiId: return ETrue; |
|
81 |
|
82 default: |
|
83 return EFalse; |
|
84 } |
|
85 } |
|
86 |
|
87 void CLtsyCellBroadcastHandler::IsCallbackIndicatorSupported(TLtsyDispatchIndIdGroup /*aIdGroup*/, TUint32& /*aIndIdBitMask*/) |
|
88 /** |
|
89 * Returns the set of callback indicators that are supported. |
|
90 * |
|
91 * @param aIdGroup ID of group that is being queried e.g. aIdGroup=EIndIdGroup1 |
|
92 * @param aIndIdBitMask [out] argument that should return a bitmask indicating which indicator callbacks are supported. |
|
93 */ |
|
94 { |
|
95 |
|
96 //Create bitmask with bitset for each indicator ID that is supported. E.g. |
|
97 /* |
|
98 if(aIdGroup == EIndIdGroup1) |
|
99 aIndIdBitMask = KLtsyDispatchPhoneNotifyNetworkModeChangeIndId | |
|
100 KLtsyDispatchPhoneNotifyEgprsInfoChangeIndId | |
|
101 KLtsyDispatchPhoneNotifySignalStrengthChangeIndId; |
|
102 else |
|
103 aIndIdBitMask = 0; //no indicators from other groups supported |
|
104 */ |
|
105 } |
|
106 |
|
107 |
|
108 TInt CLtsyCellBroadcastHandler::HandleSetBroadcastFilterSettingReqL(RMobileBroadcastMessaging::TMobilePhoneBroadcastFilter /*aFilterSetting*/) |
|
109 /** |
|
110 * This request is completed by invoking |
|
111 * CCtsyDispatcherCallback::CallbackCellBroadcastSetBroadcastFilterSettingComp |
|
112 * |
|
113 * @param aFilterSetting Broadcast filter setting |
|
114 * |
|
115 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
116 * or another error code to indicate the failure otherwise. |
|
117 */ |
|
118 { |
|
119 TSYLOGENTRYEXIT; |
|
120 |
|
121 TInt ret = KErrNotSupported; |
|
122 |
|
123 // TODO: Add implementation here....... |
|
124 |
|
125 |
|
126 return TSYLOGSETEXITERR(ret); |
|
127 } // CLtsyCellBroadcastHandler::HandleSetBroadcastFilterSettingReqL |
|
128 |
|
129 |
|
130 TInt CLtsyCellBroadcastHandler::HandleActivateBroadcastReceiveMessageReqL(RMobileBroadcastMessaging::TMobilePhoneBroadcastFilter /*aFilterSetting*/) |
|
131 /** |
|
132 * This request is completed by invoking |
|
133 * CCtsyDispatcherCallback::CallbackCellBroadcastActivateBroadcastReceiveMessageComp |
|
134 * |
|
135 * @param aFilterSetting Broadcast filter setting |
|
136 * |
|
137 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
138 * or another error code to indicate the failure otherwise. |
|
139 */ |
|
140 { |
|
141 TSYLOGENTRYEXIT; |
|
142 |
|
143 TInt ret = KErrNotSupported; |
|
144 |
|
145 // TODO: Add implementation here....... |
|
146 |
|
147 |
|
148 return TSYLOGSETEXITERR(ret); |
|
149 } // CLtsyCellBroadcastHandler::HandleActivateBroadcastReceiveMessageReqL |
|
150 |
|
151 |
|
152 TInt CLtsyCellBroadcastHandler::HandleReceiveMessageCancelReqL(RMobileBroadcastMessaging::TMobilePhoneBroadcastFilter /*aFilterSetting*/) |
|
153 /** |
|
154 * This request is completed by invoking |
|
155 * CCtsyDispatcherCallback::CallbackCellBroadcastReceiveMessageCancelComp |
|
156 * |
|
157 * @param aFilterSetting Broadcast filter setting |
|
158 * |
|
159 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
160 * or another error code to indicate the failure otherwise. |
|
161 */ |
|
162 { |
|
163 TSYLOGENTRYEXIT; |
|
164 |
|
165 TInt ret = KErrNotSupported; |
|
166 |
|
167 // TODO: Add implementation here....... |
|
168 |
|
169 |
|
170 return TSYLOGSETEXITERR(ret); |
|
171 } // CLtsyCellBroadcastHandler::HandleReceiveMessageCancelReqL |
|
172 |
|
173 TInt CLtsyCellBroadcastHandler::HandleStartSimCbTopicBrowsingReqL() |
|
174 /** |
|
175 * This request is completed by invoking |
|
176 * CCtsyDispatcherCallback::CallbackCellBroadcastStartSimCbTopicBrowsingComp |
|
177 * |
|
178 * |
|
179 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
180 * or another error code to indicate the failure otherwise. |
|
181 */ |
|
182 { |
|
183 TSYLOGENTRYEXIT; |
|
184 |
|
185 TInt ret = KErrNotSupported; |
|
186 |
|
187 |
|
188 return TSYLOGSETEXITERR(ret); |
|
189 } // CLtsyCellBroadcastHandler::HandleStartSimCbTopicBrowsingReqL |
|
190 |
|
191 TInt CLtsyCellBroadcastHandler::HandleDeleteSimCbTopicReqL(TUint /*aIndex*/, TBool /*aDeleteFlag*/) |
|
192 /** |
|
193 * This request is completed by invoking |
|
194 * CCtsyDispatcherCallback::CallbackCellBroadcastDeleteSimCbTopicComp |
|
195 * |
|
196 * @param aIndex SimCb topic number. |
|
197 * @param aDeleteFlag topic in sim memory delete flag. |
|
198 * |
|
199 * @return KErrNone on success, KErrNotSupported if this request is not supported, |
|
200 * or another error code to indicate the failure otherwise. |
|
201 */ |
|
202 { |
|
203 TSYLOGENTRYEXIT; |
|
204 |
|
205 TInt ret = KErrNotSupported; |
|
206 |
|
207 |
|
208 return TSYLOGSETEXITERR(ret); |
|
209 } // CLtsyCellBroadcastHandler::HandleDeleteSimCbTopicReqL |
|