camerauis/cameraxui/cxengine/inc/cxeimagedataitemsymbian.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-2010 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 CxeImageDataItemSymbian : public CxeImageDataItem,
       
    27                                 public CxeStateMachine
       
    28 {
       
    29     Q_OBJECT
       
    30 public: // from CxeImageDataItemSymbian
       
    31     CxeImageDataItemSymbian(QByteArray data,
       
    32                             QString filename,
       
    33                             int id,
       
    34                             bool addLocation,
       
    35                             CxeImageDataItem::State state = CxeImageDataItem::SavePending);
       
    36 
       
    37     virtual ~CxeImageDataItemSymbian();
       
    38 
       
    39     CxeImageDataItem::State state() const;
       
    40     CxeError::Id save();
       
    41     int id() const;
       
    42     bool isLocationEnabled() const;
       
    43 
       
    44 public: // new methods
       
    45     QString path() const;
       
    46 
       
    47 protected: // from CxeStateMachine
       
    48     void handleStateChanged(int newStateId, CxeError::Id error);
       
    49     void initializeStates();
       
    50 
       
    51 protected:
       
    52     virtual bool checkDiskSpace(RFs *aFs, TInt aBytesToWrite, TInt aDrive);
       
    53 
       
    54 private: // private member functions
       
    55     void trySave();
       
    56     void closeHandles();
       
    57 
       
    58 private: // private data members
       
    59 
       
    60     int mIndex;
       
    61     int mId;
       
    62 
       
    63     // used for image saving
       
    64     QByteArray mData;
       
    65     bool mAddLocationInfo;
       
    66     QString mPath;
       
    67     RFile mFile;
       
    68     RFs mFs;
       
    69 };
       
    70 
       
    71 
       
    72 
       
    73 #endif  // __CXEIMAGEDATAITEMSYMBIAN_H__