24
|
1 |
// Copyright (c) 2008-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 |
// cltsydispatchcellbroadcasthandler.cpp
|
|
15 |
//
|
|
16 |
|
|
17 |
#include <ctsy/ltsy/cctsydispatchercallback.h>
|
|
18 |
#include <ctsy/serviceapi/mmtsy_ipcdefs.h>
|
|
19 |
|
|
20 |
#include "cltsycellbroadcasthandler.h"
|
|
21 |
#include <ctsy/ltsy/ltsylogger.h>
|
|
22 |
#include "ltsymacros.h"
|
|
23 |
|
|
24 |
// Can be removed in real LTSY implementation
|
|
25 |
#include MTEST_INCLUDE_MOCKLTSYENGINE_HEADER
|
|
26 |
|
|
27 |
CLtsyCellBroadcastHandler::CLtsyCellBroadcastHandler(
|
|
28 |
CCtsyDispatcherCallback& aCtsyDispatcherCallback)
|
|
29 |
: iCtsyDispatcherCallback(aCtsyDispatcherCallback)
|
|
30 |
{
|
|
31 |
}
|
|
32 |
|
|
33 |
|
|
34 |
CLtsyCellBroadcastHandler::~CLtsyCellBroadcastHandler()
|
|
35 |
{
|
|
36 |
}
|
|
37 |
|
|
38 |
|
|
39 |
CLtsyCellBroadcastHandler* CLtsyCellBroadcastHandler::NewLC(
|
|
40 |
CCtsyDispatcherCallback& aCtsyDispatcherCallback)
|
|
41 |
{
|
|
42 |
TSYLOGENTRYEXIT;
|
|
43 |
CLtsyCellBroadcastHandler* self = new (ELeave) CLtsyCellBroadcastHandler(aCtsyDispatcherCallback);
|
|
44 |
CleanupStack::PushL(self);
|
|
45 |
self->ConstructL();
|
|
46 |
return self;
|
|
47 |
}
|
|
48 |
|
|
49 |
|
|
50 |
CLtsyCellBroadcastHandler* CLtsyCellBroadcastHandler::NewL(CCtsyDispatcherCallback& aCtsyDispatcherCallback)
|
|
51 |
{
|
|
52 |
TSYLOGENTRYEXIT;
|
|
53 |
CLtsyCellBroadcastHandler* self=
|
|
54 |
CLtsyCellBroadcastHandler::NewLC(aCtsyDispatcherCallback);
|
|
55 |
CleanupStack::Pop(self);
|
|
56 |
return self;
|
|
57 |
}
|
|
58 |
|
|
59 |
|
|
60 |
void CLtsyCellBroadcastHandler::ConstructL()
|
|
61 |
/**
|
|
62 |
* Second phase constructor.
|
|
63 |
*/
|
|
64 |
{
|
|
65 |
TSYLOGENTRYEXIT;
|
|
66 |
|
|
67 |
|
|
68 |
} // CLtsyCellBroadcastHandler::ConstructL
|
|
69 |
|
|
70 |
TBool CLtsyCellBroadcastHandler::IsInterfaceSupported(TLtsyDispatchInterfaceApiId aDispatchApiId)
|
|
71 |
/**
|
|
72 |
* Returns whether a Dispatch Interface APi is supported or not.
|
|
73 |
*
|
|
74 |
* @param aDispatchApiId Id of Dispatch interface being queried
|
|
75 |
* @return indication whether interface is supported or not
|
|
76 |
*/
|
|
77 |
{
|
|
78 |
// REMOVE this line when implementing for real LTSY
|
|
79 |
MTEST_QUERY_SUPPORT_MOCKLTSYENGINE(KDispatchCellBroadcastFuncUnitId, aDispatchApiId);
|
|
80 |
|
|
81 |
/* uncomment when implementing for real LTSY
|
|
82 |
switch(aDispatchApiId)
|
|
83 |
{
|
|
84 |
// Insert ApiIds when support is provided in LTSY e.g.
|
|
85 |
// case MLtsyDispatchPhoneBootNotifySimStatusReady::KLtsyDispatchPhoneBootNotifySimStatusReadyApiId: return ETrue;
|
|
86 |
|
|
87 |
default:
|
|
88 |
return EFalse;
|
|
89 |
}
|
|
90 |
*/
|
|
91 |
}
|
|
92 |
|
|
93 |
void CLtsyCellBroadcastHandler::IsCallbackIndicatorSupported(TLtsyDispatchIndIdGroup aIdGroup, TUint32& aIndIdBitMask)
|
|
94 |
/**
|
|
95 |
* Returns the set of callback indicators that are supported.
|
|
96 |
*
|
|
97 |
* @param aIdGroup ID of group that is being queried e.g. aIdGroup=EIndIdGroup1
|
|
98 |
* @param aIndIdBitMask [out] argument that should return a bitmask indicating which indicator callbacks are supported.
|
|
99 |
*/
|
|
100 |
{
|
|
101 |
// REMOVE this line when implementing for real LTSY
|
|
102 |
MTEST_QUERY_IND_SUPPORT_MOCKLTSYENGINE(KDispatchCellBroadcastFuncUnitId, aIdGroup, aIndIdBitMask);
|
|
103 |
|
|
104 |
//Create bitmask with bitset for each indicator ID that is supported. E.g.
|
|
105 |
/*
|
|
106 |
if(aIdGroup == EIndIdGroup1)
|
|
107 |
aIndIdBitMask = KLtsyDispatchPhoneNotifyNetworkModeChangeIndId |
|
|
108 |
KLtsyDispatchPhoneNotifyEgprsInfoChangeIndId |
|
|
109 |
KLtsyDispatchPhoneNotifySignalStrengthChangeIndId;
|
|
110 |
else
|
|
111 |
aIndIdBitMask = 0; //no indicators from other groups supported
|
|
112 |
*/
|
|
113 |
}
|
|
114 |
|
|
115 |
|
|
116 |
TInt CLtsyCellBroadcastHandler::HandleSetBroadcastFilterSettingReqL(RMobileBroadcastMessaging::TMobilePhoneBroadcastFilter aFilterSetting)
|
|
117 |
/**
|
|
118 |
* This request is completed by invoking
|
|
119 |
* CCtsyDispatcherCallback::CallbackCellBroadcastSetBroadcastFilterSettingComp
|
|
120 |
*
|
|
121 |
* @param aFilterSetting Broadcast filter setting
|
|
122 |
*
|
|
123 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
124 |
* or another error code to indicate the failure otherwise.
|
|
125 |
*/
|
|
126 |
{
|
|
127 |
TSYLOGENTRYEXIT;
|
|
128 |
|
|
129 |
TInt ret = KErrNotSupported;
|
|
130 |
|
|
131 |
// Add implementation here.......
|
|
132 |
|
|
133 |
// REMOVE this line when implementing for real LTSY
|
|
134 |
MTEST_ISSUE_MOCKLTSYENGINE_REQ(ret,
|
|
135 |
KDispatchCellBroadcastFuncUnitId,
|
|
136 |
MLtsyDispatchCellBroadcastSetBroadcastFilterSetting::KLtsyDispatchCellBroadcastSetBroadcastFilterSettingApiId,
|
|
137 |
aFilterSetting);
|
|
138 |
|
|
139 |
return TSYLOGSETEXITERR(ret);
|
|
140 |
} // CLtsyCellBroadcastHandler::HandleSetBroadcastFilterSettingReqL
|
|
141 |
|
|
142 |
|
|
143 |
TInt CLtsyCellBroadcastHandler::HandleActivateBroadcastReceiveMessageReqL(RMobileBroadcastMessaging::TMobilePhoneBroadcastFilter aFilterSetting)
|
|
144 |
/**
|
|
145 |
* This request is completed by invoking
|
|
146 |
* CCtsyDispatcherCallback::CallbackCellBroadcastActivateBroadcastReceiveMessageComp
|
|
147 |
*
|
|
148 |
* @param aFilterSetting Broadcast filter setting
|
|
149 |
*
|
|
150 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
151 |
* or another error code to indicate the failure otherwise.
|
|
152 |
*/
|
|
153 |
{
|
|
154 |
TSYLOGENTRYEXIT;
|
|
155 |
|
|
156 |
TInt ret = KErrNotSupported;
|
|
157 |
|
|
158 |
// Add implementation here.......
|
|
159 |
|
|
160 |
// REMOVE this line when implementing for real LTSY
|
|
161 |
MTEST_ISSUE_MOCKLTSYENGINE_REQ(ret,
|
|
162 |
KDispatchCellBroadcastFuncUnitId,
|
|
163 |
MLtsyDispatchCellBroadcastActivateBroadcastReceiveMessage::KLtsyDispatchCellBroadcastActivateBroadcastReceiveMessageApiId,
|
|
164 |
aFilterSetting);
|
|
165 |
|
|
166 |
return TSYLOGSETEXITERR(ret);
|
|
167 |
} // CLtsyCellBroadcastHandler::HandleActivateBroadcastReceiveMessageReqL
|
|
168 |
|
|
169 |
|
|
170 |
TInt CLtsyCellBroadcastHandler::HandleReceiveMessageCancelReqL(RMobileBroadcastMessaging::TMobilePhoneBroadcastFilter aFilterSetting)
|
|
171 |
/**
|
|
172 |
* This request is completed by invoking
|
|
173 |
* CCtsyDispatcherCallback::CallbackCellBroadcastReceiveMessageCancelComp
|
|
174 |
*
|
|
175 |
* @param aFilterSetting Broadcast filter setting
|
|
176 |
*
|
|
177 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
178 |
* or another error code to indicate the failure otherwise.
|
|
179 |
*/
|
|
180 |
{
|
|
181 |
TSYLOGENTRYEXIT;
|
|
182 |
|
|
183 |
TInt ret = KErrNotSupported;
|
|
184 |
|
|
185 |
// Add implementation here.......
|
|
186 |
|
|
187 |
// REMOVE this line when implementing for real LTSY
|
|
188 |
MTEST_ISSUE_MOCKLTSYENGINE_REQ(ret,
|
|
189 |
KDispatchCellBroadcastFuncUnitId,
|
|
190 |
MLtsyDispatchCellBroadcastReceiveMessageCancel::KLtsyDispatchCellBroadcastReceiveMessageCancelApiId,
|
|
191 |
aFilterSetting);
|
|
192 |
|
|
193 |
return TSYLOGSETEXITERR(ret);
|
|
194 |
} // CLtsyCellBroadcastHandler::HandleReceiveMessageCancelReqL
|
|
195 |
|
|
196 |
TInt CLtsyCellBroadcastHandler::HandleStartSimCbTopicBrowsingReqL()
|
|
197 |
/**
|
|
198 |
* This request is completed by invoking
|
|
199 |
* CCtsyDispatcherCallback::CallbackCellBroadcastStartSimCbTopicBrowsingComp
|
|
200 |
*
|
|
201 |
*
|
|
202 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
203 |
* or another error code to indicate the failure otherwise.
|
|
204 |
*/
|
|
205 |
{
|
|
206 |
TSYLOGENTRYEXIT;
|
|
207 |
|
|
208 |
TInt ret = KErrNotSupported;
|
|
209 |
|
|
210 |
// REMOVE this line when implementing for real LTSY
|
|
211 |
MTEST_ISSUE_MOCKLTSYENGINE_REQ3(ret,
|
|
212 |
KDispatchCellBroadcastFuncUnitId,
|
|
213 |
MLtsyDispatchCellBroadcastStartSimCbTopicBrowsing::KLtsyDispatchCellBroadcastStartSimCbTopicBrowsingApiId
|
|
214 |
);
|
|
215 |
|
|
216 |
return TSYLOGSETEXITERR(ret);
|
|
217 |
} // CLtsyCellBroadcastHandler::HandleStartSimCbTopicBrowsingReqL
|
|
218 |
|
|
219 |
TInt CLtsyCellBroadcastHandler::HandleDeleteSimCbTopicReqL(TUint aIndex, TBool aDeleteFlag)
|
|
220 |
/**
|
|
221 |
* This request is completed by invoking
|
|
222 |
* CCtsyDispatcherCallback::CallbackCellBroadcastDeleteSimCbTopicComp
|
|
223 |
*
|
|
224 |
* @param aIndex SimCb topic number.
|
|
225 |
* @param aDeleteFlag topic in sim memory delete flag.
|
|
226 |
*
|
|
227 |
* @return KErrNone on success, KErrNotSupported if this request is not supported,
|
|
228 |
* or another error code to indicate the failure otherwise.
|
|
229 |
*/
|
|
230 |
{
|
|
231 |
TSYLOGENTRYEXIT;
|
|
232 |
|
|
233 |
TInt ret = KErrNotSupported;
|
|
234 |
|
|
235 |
// REMOVE this line when implementing for real LTSY
|
|
236 |
MTEST_ISSUE_MOCKLTSYENGINE_REQ(ret,
|
|
237 |
KDispatchCellBroadcastFuncUnitId,
|
|
238 |
MLtsyDispatchCellBroadcastDeleteSimCbTopic::KLtsyDispatchCellBroadcastDeleteSimCbTopicApiId,
|
|
239 |
aIndex,
|
|
240 |
aDeleteFlag);
|
|
241 |
|
|
242 |
return TSYLOGSETEXITERR(ret);
|
|
243 |
} // CLtsyCellBroadcastHandler::HandleDeleteSimCbTopicReqL
|