camerauis/cameraxui/cxengine/tsrc/unit/unittest_cxediskmonitor/cxesysutil.cpp
branchRCL_3
changeset 54 bac7acad7cb3
parent 53 61bc0f252b2b
child 57 2c87b2808fd7
equal deleted inserted replaced
53:61bc0f252b2b 54:bac7acad7cb3
     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 bool CxeSysUtil::DiskSpaceBelowCriticalLevel(
       
    33         RFs* /*aFs*/,
       
    34         TInt aBytesToWrite,
       
    35         TInt /*aDrive*/ )
       
    36 {
       
    37     CX_DEBUG_IN_FUNCTION();
       
    38 
       
    39     return (aBytesToWrite <= 0);
       
    40 }
       
    41 
       
    42 qint64 CxeSysUtil::spaceAvailable(
       
    43                      RFs & /*fs*/,
       
    44                      int /*index*/,
       
    45                      CxeSettings & /*settings*/)
       
    46 {
       
    47     CX_DEBUG_IN_FUNCTION();
       
    48     return CxeSysUtil::mSpaceAvailable;
       
    49 }
       
    50 
       
    51 void CxeSysUtil::setSpaceAvailable(qint64 aSpaceAvailable)
       
    52 {
       
    53     CX_DEBUG_IN_FUNCTION();
       
    54     mSpaceAvailable = aSpaceAvailable;
       
    55 }
       
    56 
       
    57 int CxeSysUtil::getCameraDrive(RFs & /*fs*/)
       
    58 {
       
    59     CX_DEBUG_IN_FUNCTION();
       
    60     return 1;
       
    61 }
       
    62 
       
    63 // End of file