|
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 : CSatNotifySelectItem.h |
|
16 * Part of : Common SIM ATK TSY / commonsimatktsy |
|
17 * Specific notifications class |
|
18 * Version : 1.0 |
|
19 * |
|
20 */ |
|
21 |
|
22 |
|
23 |
|
24 #ifndef CSATNOTIFYSELECTITEM_H |
|
25 #define CSATNOTIFYSELECTITEM_H |
|
26 |
|
27 // INCLUDES |
|
28 #include <etelsat.h> |
|
29 #include "MSatNotificationsBase.h" |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class CSatDataPackage; |
|
33 class CSatNotificationsTsy; |
|
34 class CBerTlv; |
|
35 /** |
|
36 * DESCRIPTION |
|
37 * SAT Select Item notification class. |
|
38 * Created when client requests to be notified when Select Item |
|
39 * command arrives from SIM. |
|
40 * |
|
41 * The SIM shall supply a set of items from which the user may |
|
42 * choose one. Each item comprises a short identifier |
|
43 * (used to indicate the selection) and a text string. |
|
44 * Optionally the SIM may include an alpha identifier. This is intended |
|
45 * to act as a title for the list of items. |
|
46 * @lib Commonsimatktsy |
|
47 * @since 3.1 |
|
48 */ |
|
49 NONSHARABLE_CLASS ( CSatNotifySelectItem ) : 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 CSatNotifySelectItem*: created object |
|
58 */ |
|
59 static CSatNotifySelectItem* NewL( |
|
60 CSatNotificationsTsy* aNotificationsTsy ); |
|
61 |
|
62 /** |
|
63 * C++ Destructor. |
|
64 */ |
|
65 ~CSatNotifySelectItem(); |
|
66 |
|
67 private: |
|
68 |
|
69 /** |
|
70 * By default C++ constructor is private. |
|
71 * @param aNotificationsTsy: Pointer to NotificationsTsy |
|
72 * @return None |
|
73 */ |
|
74 CSatNotifySelectItem( 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 * Select Item 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 Select Item. |
|
96 * @param aReqHandle notify request handle |
|
97 * @return KErrNone |
|
98 */ |
|
99 TInt CancelNotification( const TTsyReqHandle aReqHandle ); |
|
100 |
|
101 /** |
|
102 * Completes Select Item 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 Select Item 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 * @return Success/Failure value |
|
125 */ |
|
126 TInt CreateTerminalRespL( |
|
127 TUint8 aPCmdNumber, TUint8 aGeneralResult, |
|
128 TDesC16& aAdditionalInfo ); |
|
129 |
|
130 private: |
|
131 |
|
132 /** |
|
133 * Handles menu items |
|
134 * @param aPCmdNumber: command number |
|
135 * @param aBerTlv: bertlv data instance |
|
136 * @param aRet: return value |
|
137 * @param aIconIdList: pointer to icon id list |
|
138 * @param aSelectItemV2: item structure |
|
139 * @return success/failure value |
|
140 */ |
|
141 TInt HandleItemsL( TUint8 aPCmdNumber, CBerTlv* aBerTlv, TInt aRet, |
|
142 TPtrC8 aIconIdList, RSat::TSelectItemV2* aSelectItemV2 ); |
|
143 |
|
144 private: // Data |
|
145 |
|
146 // Package received from ETel |
|
147 RSat::TSelectItemV2Pckg* iSelectItemV2Pckg; |
|
148 // Pointer to the notifications tsy class |
|
149 CSatNotificationsTsy* iNotificationsTsy; |
|
150 // Flag for items next indicator |
|
151 TBool iItemNextIndicatorRemoved; |
|
152 TBool iItemsIconIdListRemoved; |
|
153 |
|
154 }; |
|
155 |
|
156 |
|
157 #endif // CSATNOTIFYSELECTITEM_H |