camerauis/cameraxui/cxengine/inc/cxeimagedataitemsymbian.h
changeset 19 d9aefe59d544
child 37 64817133cd1d
equal deleted inserted replaced
3:8b2d6d0384b0 19:d9aefe59d544
       
     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 CXEIMAGEDATAITEMSYMBIAN_H
       
    18 #define CXEIMAGEDATAITEMSYMBIAN_H
       
    19 
       
    20 //  Include Files
       
    21 #include <f32file.h> // for RFile and RFs
       
    22 #include "cxeimagedataitem.h"
       
    23 #include "cxestatemachine.h"
       
    24 
       
    25 
       
    26 class RFs;
       
    27 
       
    28 class CxeImageDataItemSymbian : public CxeImageDataItem,
       
    29                                 public CxeStateMachine
       
    30 {
       
    31     Q_OBJECT
       
    32 public: // from CxeImageDataItemSymbian
       
    33     CxeImageDataItemSymbian(QByteArray data, QString filename, int id, CxeImageDataItem::State state = CxeImageDataItem::SavePending);
       
    34     virtual ~CxeImageDataItemSymbian();
       
    35 
       
    36     CxeImageDataItem::State state() const;
       
    37     CxeError::Id save();
       
    38     int id() const;
       
    39 public: // new methods
       
    40     QString path() const;
       
    41 
       
    42 protected: // from CxeStateMachine
       
    43     void handleStateChanged( int newStateId, CxeError::Id error );
       
    44 
       
    45 
       
    46 protected:
       
    47     void initializeStates();
       
    48 
       
    49 private: // private member functions
       
    50 
       
    51     void saveCleanup(); // delete data and report
       
    52     int checkDiskSpace(RFs* aFs, TInt aBytesToWrite, TInt aDrive);
       
    53 
       
    54 
       
    55 private: // private data members
       
    56 
       
    57     int mIndex;
       
    58     int mError;
       
    59     int mId;
       
    60 
       
    61     // used for image saving
       
    62     QByteArray mData;
       
    63     QString mPath;
       
    64     RFile mFile;
       
    65     RFs mFs;
       
    66 };
       
    67 
       
    68 
       
    69 
       
    70 #endif  // __CXEIMAGEDATAITEMSYMBIAN_H__