|
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 "VeiSimpleCutVideoDocument.h" |
|
22 #include "VeiSimpleCutVideoAppUi.h" |
|
23 |
|
24 // ================= MEMBER FUNCTIONS ======================= |
|
25 |
|
26 // constructor |
|
27 CVeiSimpleCutVideoDocument::CVeiSimpleCutVideoDocument(CEikApplication& aApp) |
|
28 : CAknDocument(aApp) |
|
29 { |
|
30 } |
|
31 |
|
32 // destructor |
|
33 CVeiSimpleCutVideoDocument::~CVeiSimpleCutVideoDocument() |
|
34 { |
|
35 LOG(KVideoEditorLogFile, "CVeiSimpleCutVideoDocument::~CVeiSimpleCutVideoDocument(): In"); |
|
36 LOG(KVideoEditorLogFile, "CVeiSimpleCutVideoDocument::~CVeiSimpleCutVideoDocument(): Out"); |
|
37 } |
|
38 |
|
39 // Default constructor can leave. |
|
40 void CVeiSimpleCutVideoDocument::ConstructL() |
|
41 { |
|
42 } |
|
43 |
|
44 // Two-phased constructor. |
|
45 CVeiSimpleCutVideoDocument* CVeiSimpleCutVideoDocument::NewL( |
|
46 CEikApplication& aApp) // CVeiApp reference |
|
47 { |
|
48 LOG(KVideoEditorLogFile, "CVeiSimpleCutVideoDocument::NewL: In "); |
|
49 |
|
50 CVeiSimpleCutVideoDocument* self = new (ELeave) CVeiSimpleCutVideoDocument( aApp ); |
|
51 CleanupStack::PushL( self ); |
|
52 self->ConstructL(); |
|
53 CleanupStack::Pop( self ); |
|
54 |
|
55 LOG(KVideoEditorLogFile, "CVeiSimpleCutVideoDocument::NewL: Out"); |
|
56 return self; |
|
57 } |
|
58 |
|
59 void CVeiSimpleCutVideoDocument::OpenFileL(CFileStore*& /*aFileStore*/, RFile& aFile) |
|
60 { |
|
61 LOG(KVideoEditorLogFile, "CVeiSimpleCutVideoDocument::OpenFileL: In"); |
|
62 |
|
63 CleanupClosePushL( aFile ); |
|
64 |
|
65 // File handle must be closed. Open File Service won't do it. |
|
66 // Using cleanup stack, because iAppUi->OpenFileL() may leave. |
|
67 #ifdef DEBUG_ON |
|
68 TFileName file; |
|
69 User::LeaveIfError( aFile.FullName(file) ); |
|
70 LOGFMT(KVideoEditorLogFile, "CVeiSimpleCutVideoDocument::OpenFileL: %S", &file); |
|
71 #endif |
|
72 |
|
73 static_cast<CVeiSimpleCutVideoAppUi*>(CCoeEnv::Static()->AppUi())->CutVideoL(ETrue, aFile); |
|
74 |
|
75 CleanupStack::PopAndDestroy( &aFile ); |
|
76 |
|
77 LOG(KVideoEditorLogFile, "CVeiSimpleCutVideoDocument::OpenFileL: Out"); |
|
78 } |
|
79 |
|
80 // ---------------------------------------------------- |
|
81 // CVeiSimpleCutVideoDocument::CreateAppUiL() |
|
82 // constructs CVeiSimpleCutVideoAppUi |
|
83 // ---------------------------------------------------- |
|
84 // |
|
85 CEikAppUi* CVeiSimpleCutVideoDocument::CreateAppUiL() |
|
86 { |
|
87 return new (ELeave) CVeiSimpleCutVideoAppUi; |
|
88 } |
|
89 |
|
90 // End of File |