cellularsrvapitest/datatransferhaitest/common/inc/BreathSaver.h
changeset 0 3553901f7fa8
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 /*
       
     2 * Copyright (c) 2005-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 
       
    18 
       
    19 #ifndef BREATHSAVER_H
       
    20 #define BREATHSAVER_H
       
    21 
       
    22 #include <f32file.h>
       
    23 
       
    24 
       
    25 // Forward declarations
       
    26 class CDataDealer;
       
    27 
       
    28 /**
       
    29  * BreathSaver provides ways to save data, for example to filesystem (c:\)
       
    30  */
       
    31 class CBreathSaver : public CBase
       
    32     {
       
    33 public:
       
    34     static CBreathSaver* NewL();
       
    35     ~CBreathSaver();
       
    36 
       
    37 	TInt StartDealer(const TUint aKey);
       
    38     TInt StartFile(const TDesC &aFileName);
       
    39     TInt Append(TDes8 &aBuffer);
       
    40     TInt End();
       
    41 
       
    42 protected:
       
    43     CBreathSaver();
       
    44     void ConstructL();
       
    45 
       
    46 private:
       
    47     RFs iRFsession;
       
    48     RFile iFile;
       
    49 
       
    50     TBool iFileStarted; // while file is started but not ended new start is not allowed
       
    51     TBool iDealerStarted; // while file is started but not ended new start is not allowed
       
    52 	CDataDealer* iDataDealer;
       
    53     };
       
    54 
       
    55 #endif	// BREATHSAVER_H