1 /* |
|
2 * Copyright (c) 2010 Ixonos Plc. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "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 * Ixonos Plc |
|
14 * |
|
15 * Description: |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "VeiDocument.h" |
|
22 #include "VeiAppUi.h" |
|
23 #include "videoeditorcommon.h" |
|
24 #include <aiwgenericparam.h> |
|
25 |
|
26 // ================= MEMBER FUNCTIONS ======================= |
|
27 |
|
28 // constructor |
|
29 CVeiDocument::CVeiDocument(CEikApplication& aApp) |
|
30 : CAiwGenericParamConsumer(aApp) |
|
31 { |
|
32 } |
|
33 |
|
34 // destructor |
|
35 CVeiDocument::~CVeiDocument() |
|
36 { |
|
37 } |
|
38 |
|
39 // Default constructor can leave. |
|
40 void CVeiDocument::ConstructL() |
|
41 { |
|
42 } |
|
43 |
|
44 // Two-phased constructor. |
|
45 CVeiDocument* CVeiDocument::NewL( |
|
46 CEikApplication& aApp) // CVeiApp reference |
|
47 { |
|
48 CVeiDocument* self = new (ELeave) CVeiDocument( aApp ); |
|
49 CleanupStack::PushL( self ); |
|
50 self->ConstructL(); |
|
51 CleanupStack::Pop( self ); |
|
52 |
|
53 return self; |
|
54 } |
|
55 |
|
56 // ---------------------------------------------------- |
|
57 // CVeiDocument::OpenFileL |
|
58 // |
|
59 // ---------------------------------------------------- |
|
60 // |
|
61 void CVeiDocument::OpenFileL(CFileStore*& /*aFileStore*/, RFile& aFile) |
|
62 { |
|
63 LOG(KVideoEditorLogFile, "CVeiDocument::OpenFileL: In"); |
|
64 |
|
65 // File handle is not used, but close it because Open File Service |
|
66 // duplicates the handle and may not close it. |
|
67 aFile.Close(); |
|
68 |
|
69 // Get the input files |
|
70 CCoeEnv* coeEnv = CCoeEnv::Static(); |
|
71 const CAiwGenericParamList* inParamList = NULL; |
|
72 inParamList = GetInputParameters(); |
|
73 const TAiwGenericParam* param = NULL; |
|
74 TInt index(0); |
|
75 if (inParamList && inParamList->Count() > 0) |
|
76 { |
|
77 LOGFMT(KVideoEditorLogFile, "\tAIW parameter count: %d", inParamList->Count()); |
|
78 |
|
79 param = inParamList->FindFirst( index,EGenericParamFile ); |
|
80 |
|
81 while( index != KErrNotFound ) |
|
82 { |
|
83 TFileName filename = param->Value().AsDes(); |
|
84 LOGFMT(KVideoEditorLogFile, "\tInserting video clip to movie: %S", &filename); |
|
85 STATIC_CAST( CVeiAppUi*, coeEnv->AppUi() )->InsertVideoClipToMovieL( |
|
86 EFalse, filename ); |
|
87 |
|
88 param = inParamList->FindNext( index, EGenericParamFile ); |
|
89 } |
|
90 } |
|
91 |
|
92 TFileName filee; |
|
93 filee.Append( _L("eeee")); |
|
94 STATIC_CAST( CVeiAppUi*, coeEnv->AppUi() )->InsertVideoClipToMovieL( |
|
95 ETrue, filee); |
|
96 |
|
97 LOG(KVideoEditorLogFile, "CVeiDocument::OpenFileL: Out"); |
|
98 } |
|
99 |
|
100 // ---------------------------------------------------- |
|
101 // CVeiDocument::CreateAppUiL() |
|
102 // constructs CVeiAppUi |
|
103 // ---------------------------------------------------- |
|
104 // |
|
105 CEikAppUi* CVeiDocument::CreateAppUiL() |
|
106 { |
|
107 return new (ELeave) CVeiAppUi; |
|
108 } |
|
109 |
|
110 // End of File |
|