|
1 /* |
|
2 * Copyright (c) 2002 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: Get network message. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPHSRVUSSDRECEIVEHANDLER_H |
|
20 #define CPHSRVUSSDRECEIVEHANDLER_H |
|
21 |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <etelmm.h> // ETel |
|
26 |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class MPhSrvUssdNetworkObserver; |
|
30 |
|
31 |
|
32 // CLASS DECLARATION |
|
33 |
|
34 /** |
|
35 * Get network message. |
|
36 * |
|
37 * @since 1.0 |
|
38 */ |
|
39 class CPhSrvUssdReceiveHandler : public CActive |
|
40 { |
|
41 public: |
|
42 |
|
43 /** |
|
44 * C++ constructor. |
|
45 * |
|
46 * @param aObserver Observer for receive actions. |
|
47 * @param aUssdMessaging The actual sending class. |
|
48 */ |
|
49 /***************************************************** |
|
50 * Series 60 Customer / ETel |
|
51 * Series 60 ETel API |
|
52 *****************************************************/ |
|
53 CPhSrvUssdReceiveHandler( |
|
54 MPhSrvUssdNetworkObserver& aObserver, |
|
55 RMobileUssdMessaging& aUssdMessaging ); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 ~CPhSrvUssdReceiveHandler(); |
|
61 |
|
62 /** |
|
63 * Symbian OS second phase constructor. |
|
64 */ |
|
65 void ConstructL(); |
|
66 |
|
67 |
|
68 public: // New functions |
|
69 |
|
70 /** |
|
71 * Request that this object attempts to receive a message. |
|
72 * |
|
73 * @return Error code |
|
74 */ |
|
75 TInt StartReceiving(); |
|
76 |
|
77 |
|
78 private: // Functions from base classes |
|
79 |
|
80 /** |
|
81 * From CActive. |
|
82 * Called when Ussd message is received. |
|
83 */ |
|
84 void RunL(); |
|
85 |
|
86 /** |
|
87 * From CActive. |
|
88 * Called when receive is cancelled. |
|
89 */ |
|
90 void DoCancel(); |
|
91 |
|
92 /** |
|
93 * From CActive. |
|
94 * Called when RunL leaves. |
|
95 */ |
|
96 TInt RunError( TInt aError ); |
|
97 |
|
98 |
|
99 private: // Data |
|
100 |
|
101 // If this is true, receiving starts automatically. |
|
102 TBool iAutoReceive; |
|
103 |
|
104 // The observer for actions. |
|
105 MPhSrvUssdNetworkObserver& iObserver; |
|
106 |
|
107 // The actual sending class. |
|
108 /***************************************************** |
|
109 * Series 60 Customer / ETel |
|
110 * Series 60 ETel API |
|
111 *****************************************************/ |
|
112 RMobileUssdMessaging& iUssdMessaging; |
|
113 |
|
114 // The USSD message data. |
|
115 RMobileUssdMessaging::TGsmUssdMessageData iMsgData; |
|
116 |
|
117 // USSD message attributes. |
|
118 RMobileUssdMessaging::TMobileUssdAttributesV1 iMsgAttributes; |
|
119 |
|
120 // USSD message attributes as package. |
|
121 RMobileUssdMessaging::TMobileUssdAttributesV1Pckg iMsgAttributesPckg; |
|
122 |
|
123 private: |
|
124 friend class CPhSrvUssdTester; // For test purposes only. |
|
125 }; |
|
126 |
|
127 #endif // CPHSRVUSSDRECEIVEHANDLER_H |
|
128 |
|
129 |
|
130 // End of File |