equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
119 { |
119 { |
120 User::Leave( KErrArgument ); |
120 User::Leave( KErrArgument ); |
121 } |
121 } |
122 aMessage.ReadL( 0, iapPckg ); |
122 aMessage.ReadL( 0, iapPckg ); |
123 |
123 |
|
124 BrowserView()->SetIAP( iap ); |
|
125 |
124 CompleteMessage( aMessage, KErrNone ); |
126 CompleteMessage( aMessage, KErrNone ); |
125 } |
127 } |
126 |
128 |
127 // --------------------------------------------------------------------------- |
129 // --------------------------------------------------------------------------- |
128 // CWmDrmDlaAppServiceSession::PostL |
130 // CWmDrmDlaAppServiceSession::PostL |
155 SanitizeL( aMessage.GetDesLength( 3 ) ); |
157 SanitizeL( aMessage.GetDesLength( 3 ) ); |
156 postContentBoundary = HBufC8::NewLC( aMessage.GetDesLength( 3 ) ); |
158 postContentBoundary = HBufC8::NewLC( aMessage.GetDesLength( 3 ) ); |
157 ptr8.Set( postContentBoundary->Des() ); |
159 ptr8.Set( postContentBoundary->Des() ); |
158 aMessage.ReadL( 3, ptr8 ); |
160 aMessage.ReadL( 3, ptr8 ); |
159 |
161 |
|
162 BrowserView()->PostL( this, |
|
163 *postUrl, |
|
164 *postContentType, |
|
165 *postData, |
|
166 *postContentBoundary ); |
|
167 |
160 CleanupStack::PopAndDestroy( 4, postUrl ); //postContentBoundary, postData, |
168 CleanupStack::PopAndDestroy( 4, postUrl ); //postContentBoundary, postData, |
161 //postContentType, postUrl |
169 //postContentType, postUrl |
162 |
170 |
163 if ( !iWait ) |
171 if ( !iWait ) |
164 { |
172 { |
177 void CWmDrmDlaAppServiceSession::LicenseResponseSizeL( |
185 void CWmDrmDlaAppServiceSession::LicenseResponseSizeL( |
178 const RMessage2& aMessage ) |
186 const RMessage2& aMessage ) |
179 { |
187 { |
180 TInt err( KErrNone ); |
188 TInt err( KErrNone ); |
181 |
189 |
|
190 HBufC8* licenseResponse( BrowserView()->LicenseResponse() ); |
|
191 if ( licenseResponse ) |
|
192 { |
|
193 TInt licenseSize( licenseResponse->Size() ); |
|
194 aMessage.WriteL( 0, TPckg<TInt>( licenseSize ) ); |
|
195 } |
|
196 else |
|
197 { |
182 err = KErrArgument; |
198 err = KErrArgument; |
|
199 } |
183 |
200 |
184 CompleteMessage( aMessage, err ); |
201 CompleteMessage( aMessage, err ); |
185 } |
202 } |
186 |
203 |
187 // --------------------------------------------------------------------------- |
204 // --------------------------------------------------------------------------- |
190 // |
207 // |
191 void CWmDrmDlaAppServiceSession::LicenseResponseL( const RMessage2& aMessage ) |
208 void CWmDrmDlaAppServiceSession::LicenseResponseL( const RMessage2& aMessage ) |
192 { |
209 { |
193 TInt err( KErrNone ); |
210 TInt err( KErrNone ); |
194 |
211 |
|
212 HBufC8* licenseResponse( BrowserView()->LicenseResponse() ); |
|
213 if ( licenseResponse ) |
|
214 { |
|
215 aMessage.WriteL( 0, *licenseResponse ); |
|
216 } |
|
217 else |
|
218 { |
195 err = KErrArgument; |
219 err = KErrArgument; |
196 |
220 } |
|
221 |
197 CompleteMessage( aMessage, err ); |
222 CompleteMessage( aMessage, err ); |
198 } |
223 } |
199 |
224 |
200 // --------------------------------------------------------------------------- |
225 // --------------------------------------------------------------------------- |
201 // CWmDrmDlaAppServiceSession::CompleteMessage |
226 // CWmDrmDlaAppServiceSession::CompleteMessage |