|
1 /* |
|
2 * Copyright (c) 2007-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 the License "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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef _CMMBROADMESSHANDLER_H_ |
|
21 #define _CMMBROADMESSHANDLER_H_ |
|
22 |
|
23 // INCLUDES |
|
24 #include "mmmmesshandlerbase.h" |
|
25 #include "cmmphonetreceiver.h" |
|
26 #include "cmmsmsgsmutility.h" |
|
27 |
|
28 // CONSTANTS |
|
29 //none |
|
30 |
|
31 // MACROS |
|
32 //none |
|
33 |
|
34 // DATA TYPES |
|
35 //none |
|
36 |
|
37 |
|
38 // EXTERNAL DATA STRUCTURES |
|
39 //none |
|
40 |
|
41 |
|
42 // FUNCTION PROTOTYPES |
|
43 //none |
|
44 |
|
45 |
|
46 // FORWARD DECLARATIONS |
|
47 class CMmPhoNetSender; |
|
48 class CMmPhoNetReceiver; |
|
49 class CMmMessageRouter; |
|
50 class TIsiReceiveC; |
|
51 |
|
52 // CLASS DECLARATION |
|
53 |
|
54 /** |
|
55 * CMmBroadMessHandler is used to create and send mode-independent SMS |
|
56 * ISI-messages to PhoNet via PhoNetSender. It also receives SMS ISI-messages |
|
57 * from PhoNet via PhoNetReceiver. If the message is mode-independent, |
|
58 * it will be handled here. Otherwise, the message will be sent to message |
|
59 * handler of active mode. |
|
60 * @lib nokiatsy.lib |
|
61 * @since Series60_2.6 |
|
62 */ |
|
63 class CMmBroadMessHandler : public CBase, public MMmMessHandlerBase, public MMmMessageReceiver |
|
64 { |
|
65 public: // Constructors and destructor |
|
66 |
|
67 /** |
|
68 * Two-phased constructor. |
|
69 * Creates a new Broadcast MessageHandler object instance. |
|
70 * @param aPhoNetSender Pointer to the PhonetSender |
|
71 * @param aPhoNetReceiver Pointer to the PhonetReceiver |
|
72 * @param aMessageRouter Pointer to the message router object |
|
73 * @return Pointer to CMmBroadMessHandler |
|
74 */ |
|
75 static CMmBroadMessHandler* NewL( |
|
76 CMmPhoNetSender* aPhoNetSender, |
|
77 CMmPhoNetReceiver* aPhoNetReceiver, |
|
78 CMmMessageRouter* aMessageRouter ); |
|
79 |
|
80 /** |
|
81 * Destructor |
|
82 * @return: None |
|
83 */ |
|
84 ~CMmBroadMessHandler(); |
|
85 |
|
86 public: // New functions |
|
87 //none |
|
88 |
|
89 public: // Functions from base classes |
|
90 |
|
91 /** |
|
92 * Isimsg received by PhonetReceiver |
|
93 * @param aIsiMsg The received Isi message |
|
94 */ |
|
95 void ReceiveMessageL( const TIsiReceiveC& aIsiMessage ); |
|
96 |
|
97 |
|
98 /** |
|
99 * From CMessHandlerBase. This method is the single entry point for |
|
100 * requests coming from the Symbian OS layer to this message handler |
|
101 * @param aIpc IPC number of the request |
|
102 * @param aDataPackage Pointer to data package |
|
103 * @return KErrNone or error code |
|
104 */ |
|
105 TInt ExtFuncL( TInt aIpc, const CMmDataPackage* aDataPackage ); |
|
106 |
|
107 private: |
|
108 |
|
109 /** |
|
110 * Constructor |
|
111 * @return: None |
|
112 */ |
|
113 CMmBroadMessHandler(); |
|
114 |
|
115 /** |
|
116 * By default Symbian 2nd phase constructor is private. |
|
117 * @return None |
|
118 */ |
|
119 void ConstructL(); |
|
120 |
|
121 /** |
|
122 * Create CB routing request |
|
123 * @param aTransId Transaction ID for ISI message |
|
124 * @param aDataPackage Packed data |
|
125 * @return KErrNone or error code |
|
126 */ |
|
127 TInt SmsCbRoutingRequest( TUint8 aTransId, |
|
128 const CMmDataPackage* aDataPackage ); |
|
129 |
|
130 /** |
|
131 * Handle response to CB routing request |
|
132 * @param aSmsCbRoutingResp SMS_CB_ROUTING_RESP ISI message |
|
133 * @return void |
|
134 */ |
|
135 void SmsCbRoutingResp( const TIsiReceiveC& aSmsCbRoutingResp ); |
|
136 |
|
137 /** |
|
138 * Handle incoming CB message |
|
139 * @param aSmsCbRoutingInd SMS_CB_ROUTING_IND ISI message |
|
140 * @return void |
|
141 */ |
|
142 void SmsCbRoutingIndL( const TIsiReceiveC& aSmsCbRoutingInd ); |
|
143 |
|
144 public: // Data |
|
145 // none |
|
146 |
|
147 protected: // Data |
|
148 |
|
149 //Pointer to the PhonetSender |
|
150 CMmPhoNetSender* iPhoNetSender; |
|
151 |
|
152 //Array to store the different WCDMA CBS messages |
|
153 CArrayPtrFlat< TWcdmaCbsMsg >* iCbsMsg; |
|
154 |
|
155 private: // Data |
|
156 |
|
157 //Pointer to the message router object |
|
158 CMmMessageRouter* iMessageRouter; |
|
159 |
|
160 private: // types |
|
161 |
|
162 // The broadcast request types are grouped into |
|
163 // the following types. Used as ISA transaction IDs. |
|
164 enum TBroadcastRequestType |
|
165 { |
|
166 EBroadcastMessagingUnknown = 0, |
|
167 EBroadcastMessagingReceiveMessage, |
|
168 EBroadcastMessagingReceiveMessageCancel, |
|
169 EBroadcastMessagingSetFilterSetting, |
|
170 }; |
|
171 |
|
172 }; |
|
173 |
|
174 #endif // _CMMBROADMESSHANDLER_H_ |
|
175 |
|
176 //End of file |