|
1 /* |
|
2 * Copyright (c) 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: |
|
15 * |
|
16 */ |
|
17 #include <QMetaType> |
|
18 #include <QImage> |
|
19 |
|
20 #include "cxesettings.h" |
|
21 #include "CxeFakeFilenameGenerator.h" |
|
22 #include "cxutils.h" |
|
23 #include "cxesettingsmappersymbian.h" |
|
24 |
|
25 using namespace Cxe; |
|
26 |
|
27 namespace |
|
28 { |
|
29 static const char *VIDEO_FILENAME = "C:\\Images\\Camera\\dummy.mp4"; |
|
30 static const char *IMAGE_FILENAME = "C:\\Images\\Camera\\dummy.jpg"; |
|
31 } |
|
32 |
|
33 CxeFakeFilenameGenerator::CxeFakeFilenameGenerator() |
|
34 { |
|
35 CX_DEBUG_IN_FUNCTION(); |
|
36 } |
|
37 |
|
38 |
|
39 /* |
|
40 * CxeFakeFilenameGenerator::~CxeFakeFilenameGenerator |
|
41 */ |
|
42 CxeFakeFilenameGenerator::~CxeFakeFilenameGenerator() |
|
43 { |
|
44 CX_DEBUG_IN_FUNCTION(); |
|
45 } |
|
46 |
|
47 /** |
|
48 * Initialize the file name generator for the given mode. |
|
49 * @param mode: current camera mode (image/video) |
|
50 * @return error id, Id::None if no error |
|
51 */ |
|
52 CxeError::Id CxeFakeFilenameGenerator::init(Cxe::CameraMode mode) |
|
53 { |
|
54 mCurrentMode = mode; |
|
55 return CxeError::None; |
|
56 } |
|
57 |
|
58 /** |
|
59 * This must be called for every burst capture. |
|
60 */ |
|
61 void CxeFakeFilenameGenerator::startNewImageFilenameSequence() |
|
62 { |
|
63 CX_DEBUG_IN_FUNCTION(); |
|
64 } |
|
65 |
|
66 /** |
|
67 * Generates the next file name in the sequence. |
|
68 * @param filename: A QString reference to hold the filename |
|
69 * @return error id, Id::None if no error |
|
70 */ |
|
71 CxeError::Id CxeFakeFilenameGenerator::nextImageFilenameInSequence(QString& /*filename*/, const QString &/*fileExt*/) |
|
72 { |
|
73 CX_DEBUG_IN_FUNCTION(); |
|
74 return CxeError::None; |
|
75 } |
|
76 |
|
77 /** |
|
78 * Generates image/video file name depending on the current active mode. |
|
79 * @param filename: A QString reference to hold the filename |
|
80 * @return error id, CxeError::None if no error. |
|
81 */ |
|
82 CxeError::Id CxeFakeFilenameGenerator::generateFilename(QString &qfName, const QString &/*fileExt*/) |
|
83 { |
|
84 CX_DEBUG_ENTER_FUNCTION(); |
|
85 if (mCurrentMode == VideoMode) { |
|
86 qfName = VIDEO_FILENAME; |
|
87 } else { |
|
88 qfName = IMAGE_FILENAME; |
|
89 } |
|
90 |
|
91 CX_DEBUG_EXIT_FUNCTION(); |
|
92 return CxeError::None; |
|
93 } |
|
94 |
|
95 /** |
|
96 * Raises file number counter value by one |
|
97 */ |
|
98 void CxeFakeFilenameGenerator::raiseCounterValue() |
|
99 { |
|
100 CX_DEBUG_IN_FUNCTION(); |
|
101 } |
|
102 |
|
103 // end of file |