equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2008-2010 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 |
|
126 CompleteMessage( aMessage, KErrNone ); |
124 CompleteMessage( aMessage, KErrNone ); |
127 } |
125 } |
128 |
126 |
129 // --------------------------------------------------------------------------- |
127 // --------------------------------------------------------------------------- |
130 // CWmDrmDlaAppServiceSession::PostL |
128 // CWmDrmDlaAppServiceSession::PostL |
157 SanitizeL( aMessage.GetDesLength( 3 ) ); |
155 SanitizeL( aMessage.GetDesLength( 3 ) ); |
158 postContentBoundary = HBufC8::NewLC( aMessage.GetDesLength( 3 ) ); |
156 postContentBoundary = HBufC8::NewLC( aMessage.GetDesLength( 3 ) ); |
159 ptr8.Set( postContentBoundary->Des() ); |
157 ptr8.Set( postContentBoundary->Des() ); |
160 aMessage.ReadL( 3, ptr8 ); |
158 aMessage.ReadL( 3, ptr8 ); |
161 |
159 |
162 BrowserView()->PostL( this, |
|
163 *postUrl, |
|
164 *postContentType, |
|
165 *postData, |
|
166 *postContentBoundary ); |
|
167 |
|
168 CleanupStack::PopAndDestroy( 4, postUrl ); //postContentBoundary, postData, |
160 CleanupStack::PopAndDestroy( 4, postUrl ); //postContentBoundary, postData, |
169 //postContentType, postUrl |
161 //postContentType, postUrl |
170 |
162 |
171 if ( !iWait ) |
163 if ( !iWait ) |
172 { |
164 { |
185 void CWmDrmDlaAppServiceSession::LicenseResponseSizeL( |
177 void CWmDrmDlaAppServiceSession::LicenseResponseSizeL( |
186 const RMessage2& aMessage ) |
178 const RMessage2& aMessage ) |
187 { |
179 { |
188 TInt err( KErrNone ); |
180 TInt err( KErrNone ); |
189 |
181 |
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 { |
|
198 err = KErrArgument; |
182 err = KErrArgument; |
199 } |
|
200 |
183 |
201 CompleteMessage( aMessage, err ); |
184 CompleteMessage( aMessage, err ); |
202 } |
185 } |
203 |
186 |
204 // --------------------------------------------------------------------------- |
187 // --------------------------------------------------------------------------- |
207 // |
190 // |
208 void CWmDrmDlaAppServiceSession::LicenseResponseL( const RMessage2& aMessage ) |
191 void CWmDrmDlaAppServiceSession::LicenseResponseL( const RMessage2& aMessage ) |
209 { |
192 { |
210 TInt err( KErrNone ); |
193 TInt err( KErrNone ); |
211 |
194 |
212 HBufC8* licenseResponse( BrowserView()->LicenseResponse() ); |
|
213 if ( licenseResponse ) |
|
214 { |
|
215 aMessage.WriteL( 0, *licenseResponse ); |
|
216 } |
|
217 else |
|
218 { |
|
219 err = KErrArgument; |
195 err = KErrArgument; |
220 } |
196 |
221 |
|
222 CompleteMessage( aMessage, err ); |
197 CompleteMessage( aMessage, err ); |
223 } |
198 } |
224 |
199 |
225 // --------------------------------------------------------------------------- |
200 // --------------------------------------------------------------------------- |
226 // CWmDrmDlaAppServiceSession::CompleteMessage |
201 // CWmDrmDlaAppServiceSession::CompleteMessage |