|
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 CCbsEtelMessaging class. |
|
15 * |
|
16 * CCbsEtelMessaging is a wrapper to RMobileBroadcastMessaging used |
|
17 * in network builds. |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 |
|
23 #ifndef CCBSETELMESSAGING_H |
|
24 #define CCBSETELMESSAGING_H |
|
25 |
|
26 // INCLUDES |
|
27 /***************************************************** |
|
28 * Series 60 Customer / ETel |
|
29 * Series 60 ETel API |
|
30 *****************************************************/ |
|
31 #include <etelmm.h> |
|
32 |
|
33 #include <e32base.h> |
|
34 #include "MCbsEtelMessaging.h" |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 /** |
|
39 * CCbsEtelMessaging acts as a wrapper to RMobileBroadcastMessaging instance. |
|
40 * |
|
41 */ |
|
42 class CCbsEtelMessaging : public CBase, public MCbsEtelMessaging |
|
43 { |
|
44 public: |
|
45 |
|
46 /** |
|
47 * Creates and returns a new instance of CCbsEtelMessaging. |
|
48 * |
|
49 * @return Instance of CCbsEtelMessaging. |
|
50 */ |
|
51 static CCbsEtelMessaging* NewL(); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 virtual ~CCbsEtelMessaging(); |
|
57 |
|
58 public: // MCbsEtelMessaging |
|
59 |
|
60 /** |
|
61 * Opens an emulated ETel messaging session. |
|
62 * |
|
63 * @param aPhone RMobilePhone-session |
|
64 */ |
|
65 TInt Open( RMobilePhone& aPhone ); |
|
66 |
|
67 /** |
|
68 * Closes ETel messaging session. |
|
69 */ |
|
70 void Close(); |
|
71 |
|
72 /** |
|
73 * Requests forwarding of the next received CB message. |
|
74 * |
|
75 * @param aReqStatus Client request status |
|
76 * @param aMsgData CBS message data descriptor |
|
77 * @param aMsgAttributes CBS message attributes |
|
78 */ |
|
79 void ReceiveMessage( TRequestStatus& aReqStatus, TDes8& aMsgData, |
|
80 TDes8& aMsgAttributes ); |
|
81 |
|
82 /** |
|
83 * Cancels an outstanding ReceiveMessage() request. |
|
84 */ |
|
85 void ReceiveMessageCancel(); |
|
86 |
|
87 /** |
|
88 * Sets CBS receive mode (filter setting). |
|
89 * |
|
90 * @param aReqStatus Returns: status of async operation |
|
91 * @param aSetting The new filter setting to be set to ETel |
|
92 */ |
|
93 void SetFilterSetting( TRequestStatus& aReqStatus, |
|
94 RMobileBroadcastMessaging::TMobilePhoneBroadcastFilter aSetting ) const; |
|
95 |
|
96 /** |
|
97 * Cancels an outstanding SetFilterSetting() request. |
|
98 * |
|
99 */ |
|
100 void SetFilterSettingCancel(); |
|
101 |
|
102 /** |
|
103 * Retrieves the current CBS receive mode (filter setting). |
|
104 * |
|
105 * @param aSetting The setting to beffiled by ETel |
|
106 * @return Result code |
|
107 */ |
|
108 TInt GetFilterSetting( |
|
109 RMobileBroadcastMessaging::TMobilePhoneBroadcastFilter& aSetting ); |
|
110 |
|
111 private: // Private methods |
|
112 |
|
113 /** |
|
114 * Constructor. |
|
115 */ |
|
116 CCbsEtelMessaging(); |
|
117 |
|
118 /** |
|
119 * Finalizes the construction. |
|
120 */ |
|
121 void ConstructL(); |
|
122 |
|
123 private: // Data |
|
124 |
|
125 // ETel messaging session to which calls to this class are forwarded. |
|
126 RMobileBroadcastMessaging iMessaging; |
|
127 }; |
|
128 |
|
129 #endif // CCBSETELMESSAGING_H |
|
130 |
|
131 // End of File |
|
132 |
|
133 |