|
1 /* |
|
2 * Copyright (c) 2008-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: Standard proxy of the ECOM plugin |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #include "glxdatasourcemdsutility.h" |
|
21 |
|
22 |
|
23 namespace NGlxDataSourceMdsUtility |
|
24 { |
|
25 |
|
26 // ---------------------------------------------------------------------------- |
|
27 // CopyMediaIdArrayL |
|
28 // ---------------------------------------------------------------------------- |
|
29 // |
|
30 void CopyMediaIdArrayL(RArray<TItemId>& aDestArray, |
|
31 const RArray<TGlxMediaId>& aSrcArray) |
|
32 { |
|
33 TInt count = aSrcArray.Count(); |
|
34 for (TInt i = 0; i < count; i++) |
|
35 { |
|
36 aDestArray.AppendL(aSrcArray[i].Value()); |
|
37 } |
|
38 } |
|
39 |
|
40 // ---------------------------------------------------------------------------- |
|
41 // CopyItemIdArrayL |
|
42 // ---------------------------------------------------------------------------- |
|
43 // |
|
44 void CopyItemIdArrayL(RArray<TGlxMediaId>& aDestArray, |
|
45 const RArray<TItemId>& aSrcArray) |
|
46 { |
|
47 TInt count = aSrcArray.Count(); |
|
48 for (TInt i = 0; i < count; i++) |
|
49 { |
|
50 aDestArray.AppendL(TGlxMediaId(aSrcArray[i])); |
|
51 } |
|
52 } |
|
53 |
|
54 // ---------------------------------------------------------------------------- |
|
55 // CopyItemIdArrayL |
|
56 // ---------------------------------------------------------------------------- |
|
57 // |
|
58 void AddObjectConditionL(CMdELogicCondition& aLogicCondition, |
|
59 const RArray<TGlxMediaId>& aMediaIds) |
|
60 { |
|
61 RArray<TItemId> itemIds; |
|
62 CleanupClosePushL(itemIds); |
|
63 CopyMediaIdArrayL(itemIds, aMediaIds); |
|
64 aLogicCondition.AddObjectConditionL(itemIds); |
|
65 CleanupStack::PopAndDestroy(&itemIds); |
|
66 } |
|
67 |
|
68 |
|
69 } // namespace |
|
70 |
|
71 |