|
1 /* |
|
2 * Copyright (c) 2003 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: This file contains the header file of the CCbsRecEtelMonitor class |
|
15 * |
|
16 * This class receives CBS message pages from the EPOC Telephony server and |
|
17 * sends them to a CCbsRecEtel instance. |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 #ifndef CCBSRECETELMONITOR_H |
|
24 #define CCBSRECETELMONITOR_H |
|
25 |
|
26 // INCLUDES |
|
27 /***************************************************** |
|
28 * Series 60 Customer / ETel |
|
29 * Series 60 ETel API |
|
30 *****************************************************/ |
|
31 #include <etelmm.h> |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 class TGsmBroadcastMessageData; |
|
35 class CCbsRecEtel; |
|
36 class MCbsEtelMessaging; |
|
37 class CCbsMessageFactory; |
|
38 class CCbsLivecastHandler; |
|
39 |
|
40 // CLASS DECLARATION |
|
41 |
|
42 /** |
|
43 * CCbsRecEtelMonitor is an active object handling the reception of |
|
44 * CB message pages from the EPOC Telephony server. |
|
45 * |
|
46 * CCbsRecMessages are constructed from the received CBS message pages and |
|
47 * forwarded to an instance of CCbsRecEtel for decoding. |
|
48 * Constructing a whole message, in case of multipage messages, is also left |
|
49 * to CCbsRecEtel and CCbsRecCollector. |
|
50 */ |
|
51 class CCbsRecEtelMonitor : public CActive |
|
52 { |
|
53 public: // New functions |
|
54 |
|
55 /** |
|
56 * Creates an instance of the class. |
|
57 * |
|
58 * @param aEtel A reference to the receiver |
|
59 * @param aSmsMessaging A reference to the messaging object |
|
60 * @param aFactory A reference to the message factory |
|
61 * @param aLivecastHandler A reference to the Livecast handler |
|
62 * @return A new instance of CCbsRecEtelMonitor |
|
63 */ |
|
64 static CCbsRecEtelMonitor* NewL( CCbsRecEtel& aEtel, |
|
65 MCbsEtelMessaging& aSmsMessaging, |
|
66 CCbsMessageFactory& aFactory, |
|
67 CCbsLivecastHandler& aLivecastHandler ); |
|
68 |
|
69 /** |
|
70 * Destructor. |
|
71 */ |
|
72 ~CCbsRecEtelMonitor(); |
|
73 |
|
74 /** |
|
75 * Requests EPOC Telephony server to forward next received CB message to |
|
76 * this object. |
|
77 */ |
|
78 void IssueRequest(); |
|
79 |
|
80 private: // From CActive |
|
81 |
|
82 /** |
|
83 * Becomes active when EPOC Telephony server has copied a CB message to |
|
84 * iCbsMessagePage. The page is then given to CCbsRecEtel for |
|
85 * processing. |
|
86 * |
|
87 * Finally this function reissues the ReceiveMessage request. |
|
88 */ |
|
89 void RunL(); |
|
90 |
|
91 /** |
|
92 * Cancels an outstanding ReceiveMessage request. |
|
93 */ |
|
94 void DoCancel(); |
|
95 |
|
96 private: |
|
97 |
|
98 /** |
|
99 * The constructor. |
|
100 * |
|
101 * @param aEtel CCbsRecEtel object. |
|
102 * @param aMessaging ETel messaging object |
|
103 * @param aFactory A reference to the message factory |
|
104 * @param aLivecastHandler A reference to the Livecast handler |
|
105 */ |
|
106 CCbsRecEtelMonitor( CCbsRecEtel& aEtel, MCbsEtelMessaging& aMessaging, |
|
107 CCbsMessageFactory& aFactory, CCbsLivecastHandler& aLivecastHandler ); |
|
108 |
|
109 /** |
|
110 * Finalizes the construction. |
|
111 */ |
|
112 void ConstructL(); |
|
113 |
|
114 private: // Data |
|
115 |
|
116 // CCbsRecEtel instance to which CB messages are passed. |
|
117 CCbsRecEtel& iEtel; |
|
118 |
|
119 // Messaging subsession. |
|
120 MCbsEtelMessaging& iSmsMessaging; |
|
121 |
|
122 /** |
|
123 * Message page is stored here when the monitor becomes active |
|
124 * due the arrival of a CBS message. |
|
125 */ |
|
126 // Message data |
|
127 RMobileBroadcastMessaging::TBroadcastPageData iMsgData; |
|
128 |
|
129 // Attributedata of an incoming broadcast message |
|
130 RMobileBroadcastMessaging::TMobileBroadcastAttributesV2 iAttributes; |
|
131 |
|
132 // Attributepackage of an incoming broadcast message |
|
133 RMobileBroadcastMessaging::TMobileBroadcastAttributesV2Pckg iMsgAttributesPckg; |
|
134 |
|
135 // Message factory |
|
136 CCbsMessageFactory& iFactory; |
|
137 |
|
138 // LC message handler |
|
139 CCbsLivecastHandler& iLivecastHandler; |
|
140 |
|
141 // Is Newsticker feature supported |
|
142 TBool iNewstickerSupported; |
|
143 |
|
144 }; |
|
145 |
|
146 #endif // CCBSRECETELMONITOR_H |
|
147 |
|
148 // End of File |
|
149 |
|
150 |