analyzetool/dynamicmemoryhook/inc/atdriveinfo.h
branchRCL_3
changeset 49 7fdc9a71d314
equal deleted inserted replaced
46:e26895079d7c 49:7fdc9a71d314
       
     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:  Declaration of the class TATDriveInfo.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef ATDRIVEINFO_H
       
    21 #define ATDRIVEINFO_H
       
    22 
       
    23 #include <f32file.h>
       
    24 
       
    25 // The path of the storage file
       
    26 #ifdef __WINS__
       
    27 _LIT( KATDataFilePath, ":\\logs\\analyzetool\\" );
       
    28 #else
       
    29 _LIT( KATDataFilePath, ":\\analyzetool\\" );
       
    30 _LIT( KATDataFilePath2, ":\\data\\analyzetool\\" );
       
    31 #endif
       
    32 
       
    33 /**
       
    34 *  Check what drives exists and creates file full path.
       
    35 */
       
    36 class TATDriveInfo
       
    37     {    
       
    38     public: // Constructors
       
    39         
       
    40         /**
       
    41         * C++ default constructor.
       
    42         */
       
    43         TATDriveInfo();
       
    44 
       
    45     public: // New functions
       
    46 
       
    47         /**
       
    48         * Create the file full path.
       
    49         * @param aPath Full path.
       
    50         * @param aFileName Filename.
       
    51         * @param aFs A handle to a file server.
       
    52         * @return KErrNone or KErrAlreadyExists, if successful; 
       
    53         *   Otherwise one of the other system wide error codes.
       
    54         */
       
    55         static TInt CreatePath( TDes& aPath, const TDesC& aFileName, const TDesC& aFilePath, RFs& aFs );   
       
    56     
       
    57     private: // New functions
       
    58     
       
    59         /**
       
    60         * Get the available drive character.
       
    61         * @param aDrive The drive letter.
       
    62         * @param aDriveNumber The drive number.
       
    63         * @param aFs A handle to a file server.
       
    64         * @param aDriveType Drive type.
       
    65         * @return KErrNone, if successful; otherwise KErrNotFound
       
    66         */
       
    67         static TInt GetDrive( TChar& aDrive, TInt& aDriveNumber, 
       
    68                 RFs& aFs, const TUint aDriveType );  
       
    69         
       
    70     };
       
    71 
       
    72 #endif // ATDRIVEINFO_H
       
    73 
       
    74 // End of File
       
    75