|
1 /* |
|
2 * Copyright (c) 2005-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: |
|
15 * Name : CSatNotifyGetInput.h |
|
16 * Part of : Common SIM ATK TSY / commonsimatktsy |
|
17 * Specific notifications class |
|
18 * Version : 1.0 |
|
19 * |
|
20 */ |
|
21 |
|
22 |
|
23 |
|
24 #ifndef CSATNOTIFYGETINPUT_H |
|
25 #define CSATNOTIFYGETINPUT_H |
|
26 |
|
27 |
|
28 // INCLUDES |
|
29 #include "MSatNotificationsBase.h" |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class CSatDataPackage; |
|
33 class CSatNotificationsTsy; |
|
34 |
|
35 /** |
|
36 * DESCRIPTION |
|
37 * SAT Get Input notification class. |
|
38 * Created when client requests to be notified when Get Input |
|
39 * command arrives from SIM. |
|
40 * |
|
41 * This command instructs the SAT to display text and that any |
|
42 * response string entered by the user shall be passed |
|
43 * by the SAT to the SIM. If the SIM provides a default text, |
|
44 * the SAT shall display this default text, which user may accept, |
|
45 * reject or edit as the response string. |
|
46 * @lib Commonsimatktsy |
|
47 * @since 3.1 |
|
48 */ |
|
49 NONSHARABLE_CLASS ( CSatNotifyGetInput ) : public CBase, |
|
50 public MSatNotificationsBase |
|
51 { |
|
52 public: // Constructors and destructor |
|
53 |
|
54 /** |
|
55 * Two-phased constructor. |
|
56 * @param aNotificationsTsy: Pointer to NotificationsTsy |
|
57 * return CSatNotifyGetInput*: created object |
|
58 */ |
|
59 static CSatNotifyGetInput* NewL( |
|
60 CSatNotificationsTsy* aNotificationsTsy ); |
|
61 |
|
62 /** |
|
63 * C++ Destructor. |
|
64 */ |
|
65 ~CSatNotifyGetInput(); |
|
66 |
|
67 private: |
|
68 |
|
69 /** |
|
70 * By default C++ constructor is private. |
|
71 * @param aNotificationsTsy: Pointer to NotificationsTsy |
|
72 * @return None |
|
73 */ |
|
74 CSatNotifyGetInput( CSatNotificationsTsy* aNotificationsTsy ); |
|
75 |
|
76 /** |
|
77 * Class attributes are created in ConstructL. |
|
78 * @param None |
|
79 * @return None |
|
80 */ |
|
81 void ConstructL(); |
|
82 |
|
83 public: // Functions from base classes |
|
84 |
|
85 /** |
|
86 * GetInput Notification request received from client |
|
87 * @param aTsyReqHandle: request handle from ETel |
|
88 * @param aPackage: Packed data |
|
89 * @return KErrNone |
|
90 */ |
|
91 TInt Notify( const TTsyReqHandle aTsyReqHandle, |
|
92 const TDataPackage& aPackage ); |
|
93 |
|
94 /** |
|
95 * Cancels notification request for GetInput. |
|
96 * @param aReqHandle notify request handle |
|
97 * @return KErrNone |
|
98 */ |
|
99 TInt CancelNotification( const TTsyReqHandle aReqHandle ); |
|
100 |
|
101 /** |
|
102 * Completes GetInput message to client |
|
103 * @param aDataPackage: Packaged return data |
|
104 * @param aErrorCode: Possible error code |
|
105 * @return KErrNone/ KErrCorrupt |
|
106 */ |
|
107 TInt CompleteNotifyL( CSatDataPackage* aDataPackage, TInt aErrorCode ); |
|
108 |
|
109 /** |
|
110 * From CSatNotificationsBase handles GetInput terminal response |
|
111 * coming from client. |
|
112 * @param aRsp: Response structure |
|
113 * @return KErrNone/ KErrCorrupt |
|
114 */ |
|
115 TInt TerminalResponseL( TDes8* aRsp ); |
|
116 |
|
117 public: // New functions |
|
118 |
|
119 /** |
|
120 * Create notification specific terminal response data |
|
121 * @param aPCmdNumber: Proactive command number |
|
122 * @param aGeneralResult: Result of the proactive command |
|
123 * @param aAdditionalInfo: Additional info for terminal response |
|
124 * @param aTextString: Data string |
|
125 * @param aDcs: Data Coding Scheme |
|
126 * @return Success/Failure value |
|
127 */ |
|
128 TInt CreateTerminalRespL( TUint8 aPCmdNumber, TUint8 aGeneralResult, |
|
129 TDesC16& aAdditionalInfo, |
|
130 TDesC16& aTextString, TUint8 aDcs ); |
|
131 |
|
132 private: // Data |
|
133 |
|
134 // Get input package store. Package allocated |
|
135 // in this class and received from ETel |
|
136 RSat::TGetInputV1Pckg* iGetInputV1Pckg; |
|
137 // Pointer to the notifications tsy class |
|
138 CSatNotificationsTsy* iNotificationsTsy; |
|
139 }; |
|
140 |
|
141 #endif // CSATNOTIFYGETINPUT_H |