javacommons/fileutils/src.linux/drivechangedeventgenerator.cpp
branchRCL_3
changeset 18 9ac0a0a7da70
parent 17 0fd27995241b
child 19 71c436fe3ce0
equal deleted inserted replaced
17:0fd27995241b 18:9ac0a0a7da70
     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:  DriveChangedEventGenerator - S60 specific
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "logger.h"
       
    20 
       
    21 #include "drivechangedeventgenerator.h"
       
    22 #include "driveutilities.h"
       
    23 
       
    24 namespace java
       
    25 {
       
    26 namespace fileutils
       
    27 {
       
    28 
       
    29 DriveChangedEventGenerator::DriveChangedEventGenerator(DriveListenerInterface* aEventDispatcher)
       
    30         :iEventDispatcher(aEventDispatcher)
       
    31 {
       
    32     JELOG2(EJavaFile);
       
    33 }
       
    34 
       
    35 DriveChangedEventGenerator::~DriveChangedEventGenerator()
       
    36 {
       
    37     JELOG2(EJavaFile);
       
    38 }
       
    39 
       
    40 void DriveChangedEventGenerator::startEvents()
       
    41 {
       
    42     JELOG2(EJavaFile);
       
    43 
       
    44     driveInfos drives;
       
    45     DriveUtilities::getAllDrives(drives);
       
    46 
       
    47     for (driveInfos::const_iterator iter = drives.begin() ;
       
    48             iter != drives.end() ; ++iter)
       
    49     {
       
    50         if (iter->iIsRemovable)
       
    51         {
       
    52             // Add implementation
       
    53         }
       
    54     }
       
    55 }
       
    56 void DriveChangedEventGenerator::stopEvents()
       
    57 {
       
    58     JELOG2(EJavaFile);
       
    59 }
       
    60 
       
    61 
       
    62 // DriveListenerInterface
       
    63 void DriveChangedEventGenerator::driveChanged(const int& aOperation, const driveInfo& aDriveInfo)
       
    64 {
       
    65     JELOG2(EJavaFile);
       
    66     iEventDispatcher->driveChanged(aOperation, aDriveInfo);
       
    67 }
       
    68 
       
    69 } // namespace fileutils
       
    70 } // namespace java