1 /* |
|
2 * Copyright (c) 2002-2004 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: Sends USSD message to the network. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CPHSRVUSSDSENDHANDLER_H |
|
19 #define CPHSRVUSSDSENDHANDLER_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <etelmm.h> |
|
23 |
|
24 // FORWARD DECLARATIONS |
|
25 class MPhSrvUssdNetworkObserver; |
|
26 class MPhSrvPhoneInterface; |
|
27 class CPhSrvUssdSessionCancelWaiter; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Sends message to the network. |
|
33 * |
|
34 * @since Series60_1.0 |
|
35 */ |
|
36 class CPhSrvUssdSendHandler : public CActive |
|
37 { |
|
38 |
|
39 public: // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * C++ constructor. |
|
43 * |
|
44 * @param aObserver Observer for send events. |
|
45 * @param aUssdMessaging The actual sender instance. |
|
46 * @param aPhoneInterface Phone interfaces. |
|
47 */ |
|
48 /***************************************************** |
|
49 * Series 60 Customer / ETel |
|
50 * Series 60 ETel API |
|
51 *****************************************************/ |
|
52 CPhSrvUssdSendHandler( |
|
53 MPhSrvUssdNetworkObserver& aObserver, |
|
54 RMobileUssdMessaging& aUssdMessaging, |
|
55 MPhSrvPhoneInterface& aPhoneInterface ); |
|
56 |
|
57 /** |
|
58 * Destructor |
|
59 */ |
|
60 ~CPhSrvUssdSendHandler(); |
|
61 |
|
62 |
|
63 public: // New functions |
|
64 |
|
65 /** |
|
66 * Send USSD message. |
|
67 * |
|
68 * @param aMsgData USSD message to be sent. |
|
69 * @param aMsgAttribute USSD message attributes. |
|
70 */ |
|
71 void SendUssdL( |
|
72 const TDesC8& aMsgData, |
|
73 const TDesC8& aMsgAttribute ); |
|
74 |
|
75 /** |
|
76 * Cancel send USSD message. |
|
77 */ |
|
78 void SendUssdCancel(); |
|
79 |
|
80 /** |
|
81 * Terminates USSD Session. |
|
82 */ |
|
83 void SendReleaseSession(); |
|
84 |
|
85 private: // Functions from base classes |
|
86 |
|
87 /** |
|
88 * From CActive. |
|
89 * Called when sending is cancelled. |
|
90 */ |
|
91 void DoCancel(); |
|
92 |
|
93 /** |
|
94 * From CActive. |
|
95 * Called when send request is completed. |
|
96 */ |
|
97 void RunL(); |
|
98 |
|
99 private: // Data |
|
100 |
|
101 // Observer for send events. |
|
102 MPhSrvUssdNetworkObserver& iObserver; |
|
103 |
|
104 // The actual sending instance. |
|
105 /***************************************************** |
|
106 * Series 60 Customer / ETel |
|
107 * Series 60 ETel API |
|
108 *****************************************************/ |
|
109 RMobileUssdMessaging& iUssdMessaging; |
|
110 |
|
111 // References to phone interfaces. |
|
112 MPhSrvPhoneInterface& iPhoneInterface; |
|
113 |
|
114 // Message data storage. |
|
115 HBufC8* iMsgData; |
|
116 |
|
117 // Message data attributes. |
|
118 HBufC8* iMsgAttribute; |
|
119 |
|
120 // For cancelling the USSD session. |
|
121 CPhSrvUssdSessionCancelWaiter* iSessionCancelWaiter; |
|
122 }; |
|
123 |
|
124 #endif // CPHSRVUSSDSENDHANDLER_H |
|
125 |
|
126 |
|
127 // End of File |
|