1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 // All rights reserved. |
2 // All rights reserved. |
3 // This component and the accompanying materials are made available |
3 // This component and the accompanying materials are made available |
4 // under the terms of "Eclipse Public License v1.0" |
4 // under the terms of "Eclipse Public License v1.0" |
5 // which accompanies this distribution, and is available |
5 // which accompanies this distribution, and is available |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
3186 TSurfaceId surfaceId; |
3190 TSurfaceId surfaceId; |
3187 TEST(KErrNone == iSurfaceManager.CreateSurface(buf, surfaceId)); |
3191 TEST(KErrNone == iSurfaceManager.CreateSurface(buf, surfaceId)); |
3188 |
3192 |
3189 //Add HintPair1 |
3193 //Add HintPair1 |
3190 RSurfaceManager::THintPair hintPair1; |
3194 RSurfaceManager::THintPair hintPair1; |
3191 hintPair1.iKey.iUid = 0x123257; |
3195 hintPair1.Set(TUid::Uid(KSurfaceContent), EStillImage, ETrue); |
3192 hintPair1.iValue = 300; |
|
3193 hintPair1.iMutable = ETrue; |
|
3194 TEST(KErrNone == iSurfaceManager.AddSurfaceHint(surfaceId, hintPair1)); |
3196 TEST(KErrNone == iSurfaceManager.AddSurfaceHint(surfaceId, hintPair1)); |
3195 |
3197 |
3196 RSurfaceManager::THintPair hintPairCheck1; |
3198 RSurfaceManager::THintPair hintPairCheck1; |
3197 hintPairCheck1.iKey.iUid = 0x123257; |
3199 hintPairCheck1.iKey.iUid = KSurfaceContent; |
3198 CheckHintPair(surfaceId, hintPairCheck1, hintPair1); |
3200 CheckHintPair(surfaceId, hintPairCheck1, hintPair1); |
3199 |
3201 |
3200 //Add HintPair2 |
3202 //Add HintPair2 |
3201 RSurfaceManager::THintPair hintPair2; |
3203 RSurfaceManager::THintPair hintPair2; |
3202 hintPair2.iKey.iUid = 0x123267; |
3204 hintPair2.iKey.iUid = KSurfaceProtection; |
3203 hintPair2.iValue = 100; |
3205 hintPair2.iValue = EAllowAnalog | EAllowDigital; |
3204 hintPair2.iMutable = EFalse; |
3206 hintPair2.iMutable = EFalse; |
3205 TEST(KErrNone == iSurfaceManager.AddSurfaceHint(surfaceId, hintPair2)); |
3207 TEST(KErrNone == iSurfaceManager.AddSurfaceHint(surfaceId, hintPair2)); |
3206 |
3208 |
3207 RSurfaceManager::THintPair hintPairCheck2; |
3209 RSurfaceManager::THintPair hintPairCheck2; |
3208 hintPairCheck2.iKey.iUid = 0x123267; |
3210 hintPairCheck2.iKey.iUid = KSurfaceProtection; |
3209 CheckHintPair(surfaceId, hintPairCheck2, hintPair2); |
3211 CheckHintPair(surfaceId, hintPairCheck2, hintPair2); |
3210 CheckHintPair(surfaceId, hintPairCheck1, hintPair1); |
3212 CheckHintPair(surfaceId, hintPairCheck1, hintPair1); |
3211 |
3213 |
3212 //Add HintPair3 |
3214 //Add HintPair3 |
3213 RSurfaceManager::THintPair hintPair3; |
3215 RSurfaceManager::THintPair hintPair3; |
3214 hintPair3.iKey.iUid = 0x123324; |
3216 hintPair3.Set(TUid::Uid(KSurfaceCharacteristics), ENotPersistable, EFalse); |
3215 hintPair3.iValue = 500; |
|
3216 hintPair3.iMutable = ETrue; |
|
3217 TEST(KErrNone == iSurfaceManager.AddSurfaceHint(surfaceId, hintPair3)); |
3217 TEST(KErrNone == iSurfaceManager.AddSurfaceHint(surfaceId, hintPair3)); |
3218 |
3218 |
3219 RSurfaceManager::THintPair hintPairCheck3; |
3219 RSurfaceManager::THintPair hintPairCheck3; |
3220 hintPairCheck3.iKey.iUid = 0x123324; |
3220 hintPairCheck3.iKey.iUid = KSurfaceCharacteristics; |
3221 CheckHintPair(surfaceId, hintPairCheck3, hintPair3); |
3221 CheckHintPair(surfaceId, hintPairCheck3, hintPair3); |
3222 CheckHintPair(surfaceId, hintPairCheck2, hintPair2); |
3222 CheckHintPair(surfaceId, hintPairCheck2, hintPair2); |
3223 CheckHintPair(surfaceId, hintPairCheck1, hintPair1); |
3223 CheckHintPair(surfaceId, hintPairCheck1, hintPair1); |
3224 |
3224 |
3225 //Add HintPair4 |
3225 //Add HintPair4 |