camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxediskmonitor/cxesysutil.cpp
changeset 42 feebad15db8c
child 45 24fd82631616
equal deleted inserted replaced
41:67457b2ffb33 42:feebad15db8c
       
     1 /*
       
     2 * Copyright (c) 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 
       
    18 #include "cxesysutil.h"
       
    19 #include "cxutils.h"
       
    20 
       
    21 qint64 CxeSysUtil::mSpaceAvailable = 0;
       
    22 
       
    23  /**
       
    24      * Checks if free disk drive storage space is or will fall below critical
       
    25      * level. Static configuration values stored in Central Repository are
       
    26      * used to determine a critical level for each drive.
       
    27      * 
       
    28      * If aBytesToWrite is more than zero, function returns false otherwise true.
       
    29      * By defining aBytesToWrite to zero it is possible to get fake fulldisk error.
       
    30      *  
       
    31      */
       
    32 TBool CxeSysUtil::DiskSpaceBelowCriticalLevel(
       
    33         RFs* /*aFs*/,
       
    34         TInt aBytesToWrite,
       
    35         TInt /*aDrive*/ )
       
    36 {
       
    37     CX_DEBUG_IN_FUNCTION(); 
       
    38     
       
    39     if (aBytesToWrite > 0) {
       
    40         return EFalse;
       
    41     }
       
    42     else {
       
    43         return ETrue;
       
    44     }
       
    45 }
       
    46 
       
    47 qint64 CxeSysUtil::spaceAvailable(
       
    48                      RFs & /*fs*/, 
       
    49                      int /*index*/, 
       
    50                      CxeSettings & /*settings*/)
       
    51 {
       
    52     CX_DEBUG_IN_FUNCTION();
       
    53     return CxeSysUtil::mSpaceAvailable;
       
    54 }
       
    55 
       
    56 void CxeSysUtil::setSpaceAvailable(qint64 aSpaceAvailable)
       
    57 {
       
    58     CX_DEBUG_IN_FUNCTION();
       
    59     mSpaceAvailable = aSpaceAvailable;
       
    60 }
       
    61 
       
    62 int CxeSysUtil::getCameraDrive(RFs & /*fs*/)
       
    63 {
       
    64     CX_DEBUG_IN_FUNCTION();
       
    65     return 1;
       
    66 }
       
    67 
       
    68 // End of file