|
1 /* |
|
2 * Copyright (c) 2002-2009 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: Handles Ussd communications to the Phone Server. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef USSDCOMMS_H |
|
20 #define USSDCOMMS_H |
|
21 |
|
22 |
|
23 // INCLUDES |
|
24 #include <coemain.h> |
|
25 #include <CPhCltUssdInt.h> |
|
26 #include <PhCltTypes.h> |
|
27 |
|
28 |
|
29 // CONSTANTS |
|
30 const TInt KUssdEditorMaxLenght = 182; |
|
31 |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 class CPhCltUssd; |
|
35 |
|
36 |
|
37 // CLASS DECLARATION |
|
38 |
|
39 /** |
|
40 * CUssdComms |
|
41 * Handles Ussd communications to the Phone Server. |
|
42 * |
|
43 * @since 1.0 |
|
44 */ |
|
45 class CUssdComms : public CBase |
|
46 { |
|
47 public: // Constructors and destructor |
|
48 |
|
49 /** |
|
50 * Two-phased constructor |
|
51 */ |
|
52 static CUssdComms* NewL(); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 ~CUssdComms(); |
|
58 |
|
59 |
|
60 public: // Member functions |
|
61 |
|
62 /** |
|
63 * Send created string |
|
64 * |
|
65 * @param aString String to be sent. |
|
66 * @return Error code |
|
67 */ |
|
68 TInt SendString( const TDesC& aString ); |
|
69 |
|
70 /** |
|
71 * Application to foreground |
|
72 * |
|
73 * @return ETrue if editor needs clearing. |
|
74 */ |
|
75 TBool InformAppForeground(); |
|
76 |
|
77 /** |
|
78 * Application to background |
|
79 */ |
|
80 void InformAppBackground(); |
|
81 |
|
82 /** |
|
83 * Tell the reason why app was terminated. |
|
84 */ |
|
85 void InformExitReason( TPhCltUssdAppExitReason aExitReason ); |
|
86 |
|
87 |
|
88 protected: // Constructor |
|
89 |
|
90 // Default constructor |
|
91 CUssdComms(); |
|
92 |
|
93 // 2nd phase constructor |
|
94 void ConstructL(); |
|
95 |
|
96 |
|
97 private: // Data |
|
98 |
|
99 // Sending Ussd, Inform ussd |
|
100 CPhCltUssdInt* iUssdClientInt; |
|
101 |
|
102 // Ussd application exit reason. |
|
103 TPhCltUssdAppExitReason iExitReason; |
|
104 }; |
|
105 |
|
106 #endif // USSDCOMMS_H |
|
107 |
|
108 |
|
109 // End of File |