|
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 : CSatNotifyLaunchBrowser.h |
|
16 * Part of : Common SIM ATK TSY / commonsimatktsy |
|
17 * Specific notifications class |
|
18 * Version : 1.0 |
|
19 * |
|
20 */ |
|
21 |
|
22 |
|
23 |
|
24 #ifndef CSATNOTIFYLAUNCHBROWSER_H |
|
25 #define CSATNOTIFYLAUNCHBROWSER_H |
|
26 |
|
27 |
|
28 // INCLUDES |
|
29 #include <etelsat.h> |
|
30 #include "MSatNotificationsBase.h" |
|
31 #include "CSatNotificationsTsy.h" |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 class CSatDataPackage; |
|
35 class CBerTlv; |
|
36 |
|
37 /** |
|
38 * DESCRIPTION |
|
39 * SAT Notify launch browser notification class. |
|
40 * Created when client requests to be notified if a request (of any other |
|
41 * existing client) has been modified. |
|
42 * @lib Commonsimatktsy |
|
43 * @since 3.1 |
|
44 */ |
|
45 NONSHARABLE_CLASS ( CSatNotifyLaunchBrowser ) : public CBase, |
|
46 public MSatNotificationsBase |
|
47 { |
|
48 public: // Constructors and destructor |
|
49 |
|
50 /** |
|
51 * Two-phased constructor. |
|
52 * @param aNotificationsTsy: Pointer to NotificationsTsy |
|
53 * return CSatNotifyLaunchBrowser*: created object |
|
54 */ |
|
55 static CSatNotifyLaunchBrowser* NewL( |
|
56 CSatNotificationsTsy* aNotificationsTsy ); |
|
57 |
|
58 /** |
|
59 * C++ Destructor. |
|
60 */ |
|
61 ~CSatNotifyLaunchBrowser(); |
|
62 |
|
63 private: |
|
64 /** |
|
65 * By default C++ constructor is private. |
|
66 * @param aNotificationsTsy: Pointer to NotificationsTsy |
|
67 * @return None |
|
68 */ |
|
69 CSatNotifyLaunchBrowser( CSatNotificationsTsy* aNotificationsTsy ); |
|
70 |
|
71 /** |
|
72 * Class attributes are created in ConstructL. |
|
73 * @param None |
|
74 * @return None |
|
75 */ |
|
76 void ConstructL(); |
|
77 |
|
78 public: // Functions from base classes |
|
79 |
|
80 /** |
|
81 * Launch Browser Notification request received from client |
|
82 * @param aTsyReqHandle: request handle from ETel |
|
83 * @param aPackage: Packed data |
|
84 * @return KErrNone |
|
85 */ |
|
86 TInt Notify( const TTsyReqHandle aTsyReqHandle, |
|
87 const TDataPackage& aPackage ); |
|
88 |
|
89 /** |
|
90 * Cancels notification request for Launch Browser. |
|
91 * @param aReqHandle notify request handle |
|
92 * @return KErrNone |
|
93 */ |
|
94 TInt CancelNotification( const TTsyReqHandle aReqHandle ); |
|
95 |
|
96 /** |
|
97 * Completes Launch Browser message to client |
|
98 * @param aDataPackage: Packaged return data |
|
99 * @param aErrorCode: Possible error code |
|
100 * @return KErrNone/ KErrCorrupt |
|
101 */ |
|
102 TInt CompleteNotifyL( CSatDataPackage* aDataPackage, TInt aErrorCode ); |
|
103 |
|
104 /** |
|
105 * From CSatNotificationsBase handles Launch Browser terminal response |
|
106 * coming from client. |
|
107 * @param aRsp: Response structure |
|
108 * @return KErrNone/ KErrCorrupt |
|
109 */ |
|
110 TInt TerminalResponseL( TDes8* aRsp ); |
|
111 |
|
112 /** |
|
113 * Stores Ss status information. |
|
114 * @param aDataPackage: contains status information |
|
115 * @return none |
|
116 */ |
|
117 void SetSsStatus( CSatDataPackage* aDataPackage ); |
|
118 |
|
119 private: // New functions |
|
120 |
|
121 /** |
|
122 * Help method for CompleteNotify, parsing Browse ID data |
|
123 * @param aPCmdNumber: Proactive Command number |
|
124 * @param aBerTlv: Source data |
|
125 * @param aLaunchBrowserV2: Target data |
|
126 * @return Success/Failure value |
|
127 */ |
|
128 TInt ParseBrowserIdL( TUint8 aPCmdNumber, CBerTlv& aBerTlv, |
|
129 RSat::TLaunchBrowserV2& aLaunchBrowserV2 ); |
|
130 |
|
131 /** |
|
132 * Help method for CompleteNotify, parsing URL data |
|
133 * @param aPCmdNumber: Proactive Command number |
|
134 * @param aBerTlv: Source data |
|
135 * @param aLaunchBrowserV2: Target data |
|
136 * @return Success/Failure value |
|
137 */ |
|
138 TInt ParseUrlL( TUint8 aPCmdNumber, CBerTlv& aBerTlv, |
|
139 RSat::TLaunchBrowserV2& aLaunchBrowserV2 ); |
|
140 |
|
141 /** |
|
142 * Help method for CompleteNotify, parsing Provisioning file list data |
|
143 * @param aPCmdNumber: Proactive Command number |
|
144 * @param aBerTlv: Source data |
|
145 * @param aLaunchBrowserV2: Target data |
|
146 * @return Success/Failure value |
|
147 */ |
|
148 TInt ParseProvisioningFileListL( TUint8 aPCmdNumber, CBerTlv& aBerTlv, |
|
149 RSat::TLaunchBrowserV2& aLaunchBrowserV2 ); |
|
150 |
|
151 /** |
|
152 * Help method for CompleteNotify, parsing Bearer List data |
|
153 * @param aPCmdNumber: Proactive Command number |
|
154 * @param aBerTlv: Source data |
|
155 * @param aLaunchBrowserV2: Target data |
|
156 * @return Success/Failure value |
|
157 */ |
|
158 TInt ParseBearerListL( TUint8 aPCmdNumber, CBerTlv& aBerTlv, |
|
159 RSat::TLaunchBrowserV2& aLaunchBrowserV2 ); |
|
160 |
|
161 /** |
|
162 * Create notification specific terminal response data |
|
163 * @param aPCmdNumber: Proactive command number |
|
164 * @param aGeneralResult: Result of the proactive command |
|
165 * @param aAdditionalInfo: Additional info for terminal response |
|
166 * @return Success/Failure value |
|
167 */ |
|
168 TInt CreateTerminalRespL( TUint8 aPCmdNumber, TUint8 aGeneralResult, |
|
169 TUint8 aAdditionalInfo ); |
|
170 |
|
171 private: // Data |
|
172 |
|
173 // Notify Launch Browser struct |
|
174 RSat::TLaunchBrowserV2Pckg* iLaunchBrowserV2Pckg; |
|
175 // Pointer to the notifications tsy class |
|
176 CSatNotificationsTsy* iNotificationsTsy; |
|
177 |
|
178 // Ss Status |
|
179 CSatNotificationsTsy::TSsStatus iSsStatus; |
|
180 }; |
|
181 |
|
182 #endif // CSATNOTIFYGETINKEY_H |