|
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: Encapsulates an active object used in notify services. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPHCLTUSSDREQUESTHANDLER_H |
|
20 #define CPHCLTUSSDREQUESTHANDLER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include "rphcltussd.h" |
|
25 #include "RPhCltServer.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class MPhCltUssdRequestHandler; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * Encapsulates an active object used in notify services. |
|
34 * |
|
35 * @lib phoneclient.lib |
|
36 * @since 1.0 |
|
37 */ |
|
38 NONSHARABLE_CLASS( CPhCltUssdRequestHandler ) : public CActive |
|
39 { |
|
40 public: // Constructors and destructor |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 * |
|
45 * @param aHandler Handler for the USSD messages. |
|
46 * @param aPriority Priority to be used. |
|
47 * @return Pointer to created CPhCltUssdRequestHandler instance. |
|
48 */ |
|
49 static CPhCltUssdRequestHandler* NewL( |
|
50 MPhCltUssdRequestHandler& aHandler, |
|
51 TInt aPriority ); |
|
52 |
|
53 /** |
|
54 * Destructor. |
|
55 */ |
|
56 ~CPhCltUssdRequestHandler(); |
|
57 |
|
58 |
|
59 public: |
|
60 |
|
61 /** |
|
62 * Send string. |
|
63 * |
|
64 * @param aMsgData 7-bit data. |
|
65 * @param aMsgAttribute Definitions. |
|
66 */ |
|
67 void SendUssd( |
|
68 const TDesC8& aMsgData, |
|
69 const TDesC8& aMsgAttribute ); |
|
70 |
|
71 /** |
|
72 * Cancel send. |
|
73 */ |
|
74 void SendUssdCancel(); |
|
75 |
|
76 /** |
|
77 * USSD Client |
|
78 * |
|
79 * @return Reference to RPhCltUssd instance. |
|
80 */ |
|
81 RPhCltUssd& UssdClient(); |
|
82 |
|
83 |
|
84 private: // From base classes |
|
85 |
|
86 /* |
|
87 * From CActive. Called when send is done. |
|
88 */ |
|
89 void RunL(); |
|
90 |
|
91 /** |
|
92 * From CActive. Called when send is cancelled. |
|
93 */ |
|
94 void DoCancel(); |
|
95 |
|
96 |
|
97 private: |
|
98 |
|
99 /** |
|
100 * C++ constructor. |
|
101 */ |
|
102 CPhCltUssdRequestHandler( |
|
103 MPhCltUssdRequestHandler& aHandler, |
|
104 TInt aPriority ); |
|
105 |
|
106 /** |
|
107 * By default Symbian 2nd phase constructor is private. |
|
108 */ |
|
109 void ConstructL(); |
|
110 |
|
111 |
|
112 private: // Data |
|
113 |
|
114 // The handler for requests. |
|
115 MPhCltUssdRequestHandler& iHandler; |
|
116 |
|
117 // Server connection to be used to perform functionality. |
|
118 RPhCltServer iPhClient; |
|
119 |
|
120 // USSD subsession to server side. |
|
121 RPhCltUssd iUssdClient; |
|
122 }; |
|
123 |
|
124 #endif // CPHCLTUSSDREQUESTHANDLER_H |
|
125 |
|
126 // End of File |