camerauis/cameraxui/cxengine/inc/cxefilenamegenerator.h
changeset 19 d9aefe59d544
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/camerauis/cameraxui/cxengine/inc/cxefilenamegenerator.h	Fri Apr 16 14:51:30 2010 +0300
@@ -0,0 +1,70 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef CXEFILENAMEGENERATOR_H
+#define CXEFILENAMEGENERATOR_H
+
+#include <QString>
+#include "cxenamespace.h"
+#include "cxeerror.h"
+
+
+/**
+ * CxeFilenameGeneratorSymbian provides file names for saving images and videos.
+ */
+class CxeFilenameGenerator
+{
+public:
+    virtual ~CxeFilenameGenerator() {}
+
+    /**
+     * Initialize the file name generator for the given mode.
+     * @param   mode: current camera mode (image/video)
+     * @return  error id, Id::None if no error
+     */
+    virtual CxeError::Id init(Cxe::CameraMode mode) = 0;
+
+    /**
+     * This must be called for every burst capture.
+     */
+    virtual void startNewImageFilenameSequence() = 0;
+
+    /**
+     * Generates the next file name in the sequence.
+     * @param fileExt, used a file extension for image/video
+     * @param   filename: A QString reference to hold the filename
+     * @return  error id, Id::None if no error
+     */
+    virtual CxeError::Id nextImageFilenameInSequence(QString &filename, const QString &fileExt) = 0;
+
+    /**
+     * Generates image/video file name depending on the current active mode.
+     * @param fileExt, used a file extension for image/video
+     * @param   filename: A QString reference to hold the filename
+     * @return  error id, CxeError::None if no error.
+     */
+    virtual CxeError::Id generateFilename(QString &filename, const QString &fileExt) = 0;
+
+    /**
+     * Raises file number counter value by one
+     */
+    virtual void raiseCounterValue() = 0;
+
+protected:
+    CxeFilenameGenerator() {} // protected empty contructor so that derived class construction works
+};
+
+#endif // CXEFILENAMEGENERATOR_H