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