|
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 : CSatNotifyReceiveData.h |
|
16 * Part of : Common SIM ATK TSY / commonsimatktsy |
|
17 * Specific notifications class |
|
18 * Version : 1.0 |
|
19 * |
|
20 */ |
|
21 |
|
22 |
|
23 |
|
24 #ifndef CSATNOTIFYRECEIVEDATA_H |
|
25 #define CSATNOTIFYRECEIVEDATA_H |
|
26 |
|
27 |
|
28 // INCLUDES |
|
29 #include <etelsat.h> |
|
30 #include "MSatNotificationsBase.h" |
|
31 |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 class CSatDataPackage; |
|
35 class CSatNotificationsTsy; |
|
36 |
|
37 /** |
|
38 * DESCRIPTION |
|
39 * SAT Notify ReceiveData notification class. |
|
40 * Created when client requests to be notified when ReceiveData |
|
41 * command arrives from SIM. |
|
42 * |
|
43 * The purpose of this command is to enable the SAT |
|
44 * (which alerts other applications in the phone) to be notified |
|
45 * of the changes to the SIM configuration that have occurred as |
|
46 * the result of a SIM application activity. It is up to SAT to |
|
47 * ensure this is done correctly. |
|
48 * @lib Commonsimatktsy |
|
49 * @since 3.1 |
|
50 */ |
|
51 NONSHARABLE_CLASS ( CSatNotifyReceiveData ) : public CBase, |
|
52 public MSatNotificationsBase |
|
53 { |
|
54 public: // Constructors and destructor |
|
55 |
|
56 /** |
|
57 * Two-phased constructor. |
|
58 * @param aNotificationsTsy: Pointer to NotificationsTsy |
|
59 * return CSatNotifyReceiveData*: created object |
|
60 */ |
|
61 static CSatNotifyReceiveData* NewL( |
|
62 CSatNotificationsTsy* aNotificationsTsy ); |
|
63 |
|
64 /** |
|
65 * C++ Destructor. |
|
66 */ |
|
67 ~CSatNotifyReceiveData(); |
|
68 |
|
69 private: |
|
70 /** |
|
71 * By default C++ constructor is private. |
|
72 * @param aNotificationsTsy: Pointer to NotificationsTsy |
|
73 * @return None |
|
74 */ |
|
75 CSatNotifyReceiveData( CSatNotificationsTsy* aNotificationsTsy ); |
|
76 |
|
77 /** |
|
78 * Class attributes are created in ConstructL. |
|
79 * @param None |
|
80 * @return None |
|
81 */ |
|
82 void ConstructL(); |
|
83 |
|
84 public: // Functions from base classes |
|
85 |
|
86 /** |
|
87 * Notification request received from client |
|
88 * @param aTsyReqHandle: request handle from ETel |
|
89 * @param aPackage: Packed data |
|
90 * @return KErrNone |
|
91 */ |
|
92 TInt Notify( const TTsyReqHandle aTsyReqHandle, |
|
93 const TDataPackage& aPackage ); |
|
94 |
|
95 /** |
|
96 * Cancels notification request about receive data. |
|
97 * @param aReqHandle notify request handle |
|
98 * @return KErrNone |
|
99 */ |
|
100 TInt CancelNotification( const TTsyReqHandle aReqHandle ); |
|
101 |
|
102 /** |
|
103 * Completes the notification request received from client |
|
104 * @param aDataPackage: Packaged return data |
|
105 * @param aErrorCode: Possible error code |
|
106 * @return KErrNone/ KErrCorrupt |
|
107 */ |
|
108 TInt CompleteNotifyL( CSatDataPackage* aDataPackage, TInt aErrorCode ); |
|
109 |
|
110 /** |
|
111 * Handles the Receive data terminal response |
|
112 * @param aRsp: Response structure |
|
113 * @return KErrNone/ KErrCorrupt |
|
114 */ |
|
115 TInt TerminalResponseL( TDes8* aRsp ); |
|
116 |
|
117 public: // New methods |
|
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 aChannelDataLength: channel data length |
|
125 * @return Success/Failure value |
|
126 */ |
|
127 TInt CreateTerminalRespL( TUint8 aPCmdNumber, TUint8 aGeneralResult, |
|
128 const TDesC16& aAdditionalInfo, |
|
129 TUint8 aChannelDataLength ); |
|
130 |
|
131 private: // Data |
|
132 |
|
133 // Notify ReceiveData struct. Package received from ETel. |
|
134 RSat::TReceiveDataV2Pckg* iReceiveDataRspV2Pckg; |
|
135 // Pointer to the notifications tsy class |
|
136 CSatNotificationsTsy* iNotificationsTsy; |
|
137 |
|
138 }; |
|
139 |
|
140 #endif // CSATNOTIFYRECEIVEDATA_H |