|
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 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalAll |
|
19 */ |
|
20 |
|
21 #ifndef __CCELLBROADCASTDISPATCHER_H_ |
|
22 #define __CCELLBROADCASTDISPATCHER_H_ |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32std.h> |
|
26 #include <e32base.h> |
|
27 #include <e32def.h> |
|
28 #include <etelmm.h> |
|
29 |
|
30 #include <ctsy/ltsy/mltsydispatchfactory.h> |
|
31 #include <ctsy/rmmcustomapi.h> |
|
32 #include <ctsy/serviceapi/cmmsmsutility.h> |
|
33 |
|
34 #include <ctsy/ltsy/mltsydispatchcellbroadcastinterface.h> |
|
35 |
|
36 #include "requestqueueoneshot.h" |
|
37 #include <ctsy/ltsy/ltsylogger.h> |
|
38 #include "mdispatchercallback.h" |
|
39 |
|
40 // FORWARD DECLARATIONS |
|
41 class CMmDataPackage; |
|
42 class MmMessageManagerCallback; |
|
43 class TDispatcherHolder; |
|
44 |
|
45 class MLtsyDispatchCellBroadcastSetBroadcastFilterSetting; |
|
46 class MLtsyDispatchCellBroadcastActivateBroadcastReceiveMessage; |
|
47 class MLtsyDispatchCellBroadcastReceiveMessageCancel; |
|
48 class MLtsyDispatchCellBroadcastStartSimCbTopicBrowsing; |
|
49 class MLtsyDispatchCellBroadcastDeleteSimCbTopic; |
|
50 |
|
51 |
|
52 // CLASS DECLARATION |
|
53 |
|
54 /** |
|
55 * This class is responsible for packing and unpacking data belonging |
|
56 * to CellBroadcast related requests to the Licensee LTSY. |
|
57 */ |
|
58 class CCellBroadcastDispatcher : public CBase, public MDispatcherCallback |
|
59 { |
|
60 public: |
|
61 |
|
62 virtual ~CCellBroadcastDispatcher(); |
|
63 |
|
64 static CCellBroadcastDispatcher* NewL( |
|
65 MLtsyDispatchFactoryV1& aLtsyFactory, |
|
66 MmMessageManagerCallback& aMessageManagerCallback, |
|
67 CRequestQueueOneShot& aRequestAsyncOneShot); |
|
68 |
|
69 static CCellBroadcastDispatcher* NewLC( |
|
70 MLtsyDispatchFactoryV1& aLtsyFactory, |
|
71 MmMessageManagerCallback& aMessageManagerCallback, |
|
72 CRequestQueueOneShot& aRequestAsyncOneShot); |
|
73 |
|
74 // Dispatcher functions for dispatching requests DOWN to the Licensee LTSY |
|
75 |
|
76 TInt DispatchSetBroadcastFilterSettingL(const CMmDataPackage* aDataPackage); |
|
77 TInt DispatchActivateBroadcastReceiveMessageL(const CMmDataPackage* aDataPackage); |
|
78 TInt DispatchReceiveMessageCancelL(const CMmDataPackage* aDataPackage); |
|
79 TInt DispatchStartSimCbTopicBrowsingL(); |
|
80 TInt DispatchDeleteSimCbTopicL(const CMmDataPackage* aDataPackage); |
|
81 |
|
82 // Complete functions for receiving completions UP from the Licensee LTSY |
|
83 // via the CCtsyDispatcherCallback object. |
|
84 |
|
85 void CallbackGsmBroadcastNotifyMessageReceived(TInt aError, const TDesC8& aCbsMsg); |
|
86 void CallbackWcdmaBroadcastMessageReceived(TInt aError, const TDesC8& aWcdmaCbsData, const DispatcherCellBroadcast::TWcdmaCbsMsgBase& aWcdmaCbsMsgBase, TBool aMoreToCome); |
|
87 void CallbackSetBroadcastFilterSetting(TInt aError); |
|
88 void CallbackActivateBroadcastReceiveMessage(TInt aError); |
|
89 void CallbackReceiveMessageCancel(TInt aError); |
|
90 void CallbackStartSimCbTopicBrowsing(TInt aError, const CArrayFixFlat<RMmCustomAPI::TSimCbTopic>& aSimTopicArray); |
|
91 void CallbackDeleteSimCbTopic(TInt aError); |
|
92 |
|
93 // From MDispatcherCallback |
|
94 void CallbackSync(CRequestQueueOneShot::TIpcDataPackage& aIpcDataPackage); |
|
95 |
|
96 // Other public functions |
|
97 void SetDispatcherHolder(TDispatcherHolder& aDispatcherHolder); |
|
98 |
|
99 private: |
|
100 |
|
101 CCellBroadcastDispatcher(MLtsyDispatchFactoryV1& aLtsyFactory, |
|
102 MmMessageManagerCallback& aMessageManagerCallback, |
|
103 CRequestQueueOneShot& aRequestAsyncOneShot); |
|
104 |
|
105 void ConstructL(); |
|
106 |
|
107 private: // Not owned |
|
108 |
|
109 MLtsyDispatchFactoryV1& iLtsyFactoryV1; |
|
110 MmMessageManagerCallback& iMessageManagerCallback; |
|
111 CRequestQueueOneShot& iRequestAsyncOneShot; |
|
112 TDispatcherHolder* iDispatcherHolder; |
|
113 |
|
114 // Interfaces in the Licensee LTSY, not owned by this object |
|
115 |
|
116 MLtsyDispatchCellBroadcastSetBroadcastFilterSetting* iLtsyDispatchCellBroadcastSetBroadcastFilterSetting; |
|
117 MLtsyDispatchCellBroadcastActivateBroadcastReceiveMessage* iLtsyDispatchCellBroadcastActivateBroadcastReceiveMessage; |
|
118 MLtsyDispatchCellBroadcastReceiveMessageCancel* iLtsyDispatchCellBroadcastReceiveMessageCancel; |
|
119 MLtsyDispatchCellBroadcastStartSimCbTopicBrowsing* iLtsyDispatchCellBroadcastStartSimCbTopicBrowsing; |
|
120 MLtsyDispatchCellBroadcastDeleteSimCbTopic* iLtsyDispatchCellBroadcastDeleteSimCbTopic; |
|
121 |
|
122 // Received WCDMA CBS message. Not own. |
|
123 CArrayPtrFlat< TWcdmaCbsMsg >* iCbsMsg; |
|
124 |
|
125 }; // class CCellBroadcastDispatcher |
|
126 |
|
127 #endif // __CCELLBROADCASTDISPATCHER_H_ |
|
128 |