camerauis/cameraxui/cxengine/inc/cxefilenamegenerator.h
branchRCL_3
changeset 54 bac7acad7cb3
parent 53 61bc0f252b2b
child 57 2c87b2808fd7
equal deleted inserted replaced
53:61bc0f252b2b 54:bac7acad7cb3
     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 #ifndef CXEFILENAMEGENERATOR_H
       
    18 #define CXEFILENAMEGENERATOR_H
       
    19 
       
    20 #include <QString>
       
    21 #include "cxenamespace.h"
       
    22 #include "cxeerror.h"
       
    23 
       
    24 
       
    25 /**
       
    26  * CxeFilenameGeneratorSymbian provides file names for saving images and videos.
       
    27  */
       
    28 class CxeFilenameGenerator
       
    29 {
       
    30 public:
       
    31     virtual ~CxeFilenameGenerator() {}
       
    32 
       
    33     /**
       
    34      * Initialize the file name generator for the given mode.
       
    35      * @param   mode: current camera mode (image/video)
       
    36      * @return  error id, Id::None if no error
       
    37      */
       
    38     virtual CxeError::Id init(Cxe::CameraMode mode) = 0;
       
    39 
       
    40     /**
       
    41      * This must be called for every burst capture.
       
    42      */
       
    43     virtual void startNewImageFilenameSequence() = 0;
       
    44 
       
    45     /**
       
    46      * Generates the next file name in the sequence.
       
    47      * @param fileExt, used a file extension for image/video
       
    48      * @param   filename: A QString reference to hold the filename
       
    49      * @return  error id, Id::None if no error
       
    50      */
       
    51     virtual CxeError::Id nextImageFilenameInSequence(QString &filename, const QString &fileExt) = 0;
       
    52 
       
    53     /**
       
    54      * Generates image/video file name depending on the current active mode.
       
    55      * @param fileExt, used a file extension for image/video
       
    56      * @param   filename: A QString reference to hold the filename
       
    57      * @return  error id, CxeError::None if no error.
       
    58      */
       
    59     virtual CxeError::Id generateFilename(QString &filename, const QString &fileExt) = 0;
       
    60 
       
    61     /**
       
    62      * Raises file number counter value by one
       
    63      */
       
    64     virtual void raiseCounterValue() = 0;
       
    65 
       
    66 protected:
       
    67     CxeFilenameGenerator() {} // protected empty contructor so that derived class construction works
       
    68 };
       
    69 
       
    70 #endif // CXEFILENAMEGENERATOR_H