|
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: Photos AIW Media Contains AIW (InParam) information |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #include <AiwGenericParam.h> |
|
22 #include "glxaiwmedia.h" |
|
23 #include <glxassert.h> // for GLX_ASSERT_DEBUG |
|
24 |
|
25 // ----------------------------------------------------------------------------- |
|
26 // Constructor |
|
27 // ----------------------------------------------------------------------------- |
|
28 // |
|
29 CGlxAiwMedia::CGlxAiwMedia(const TGlxMediaId& aId) |
|
30 : iId(aId) |
|
31 { |
|
32 |
|
33 } |
|
34 |
|
35 // ----------------------------------------------------------------------------- |
|
36 // Destructor |
|
37 // ----------------------------------------------------------------------------- |
|
38 // |
|
39 CGlxAiwMedia::~CGlxAiwMedia() |
|
40 { |
|
41 iParamArray.Close(); |
|
42 } |
|
43 |
|
44 |
|
45 // ----------------------------------------------------------------------------- |
|
46 // AddParamL |
|
47 // ----------------------------------------------------------------------------- |
|
48 // |
|
49 TBool CGlxAiwMedia::AddParamL(const TAiwGenericParam& aParam) |
|
50 { |
|
51 if (KErrNotFound == iParamArray.Find(aParam)) |
|
52 { |
|
53 /* |
|
54 #ifdef __WINSCW__ |
|
55 // Big hack! replace "video/MP4V-ES" with "video/mp4" |
|
56 // Hack to be removed when TSW error: VKAN-77D92E is released |
|
57 TAiwGenericParam MimeType1( EGenericParamMIMEType, TAiwVariant( _L("video/MP4V-ES") )); |
|
58 TAiwGenericParam MimeType2( EGenericParamMIMEType, TAiwVariant( _L("video/mp4") )); |
|
59 |
|
60 if (aParam == MimeType1) |
|
61 { |
|
62 iParamArray.AppendL(MimeType2); |
|
63 } |
|
64 else |
|
65 { |
|
66 iParamArray.AppendL(aParam); |
|
67 } |
|
68 #else |
|
69 iParamArray.AppendL(aParam); |
|
70 #endif |
|
71 */ |
|
72 iParamArray.AppendL(aParam); |
|
73 return ETrue; |
|
74 } |
|
75 return EFalse; |
|
76 } |
|
77 |
|
78 // ----------------------------------------------------------------------------- |
|
79 // AppendToInParamsL |
|
80 // ----------------------------------------------------------------------------- |
|
81 // |
|
82 void CGlxAiwMedia::AppendToInParamsL(CAiwGenericParamList& aInParams) |
|
83 { |
|
84 for (TInt index = 0; index < iParamArray.Count() ; index++ ) |
|
85 { |
|
86 TAiwGenericParam& param = iParamArray[index]; |
|
87 aInParams.AppendL(param); |
|
88 } |
|
89 iParamArray.Reset(); |
|
90 } |
|
91 |
|
92 // ----------------------------------------------------------------------------- |
|
93 // Id |
|
94 // ----------------------------------------------------------------------------- |
|
95 // |
|
96 const TGlxMediaId& CGlxAiwMedia::Id() const |
|
97 { |
|
98 return iId; |
|
99 } |