filemanager/src/inc/fmdrivewatcher/private/symbian/fmdrivewatcherprivate.cpp
branchRCL_3
changeset 20 491b3ed49290
equal deleted inserted replaced
19:95243422089a 20:491b3ed49290
       
     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 * 
       
    15 * Description:
       
    16 *     The source file of drive event watcher private
       
    17 */
       
    18 
       
    19 #include "fmdrivewatcherprivate.h"
       
    20 
       
    21 #include "fmdrivewatcher.h"
       
    22 #include "fmcommon.h"
       
    23 
       
    24 FmDriveWatcherPrivate::FmDriveWatcherPrivate( FmDriveWatcher *driveWatcher ) :
       
    25     q( driveWatcher )
       
    26 {
       
    27     fs.Connect();
       
    28     mDriveEvent = CFmDriveEvent::NewL( fs, this );
       
    29 }
       
    30 
       
    31 FmDriveWatcherPrivate::~FmDriveWatcherPrivate()
       
    32 {
       
    33     fs.Close();
       
    34     delete mDriveEvent;
       
    35 }
       
    36 
       
    37 
       
    38 void FmDriveWatcherPrivate::startWatch()
       
    39 {
       
    40     mDriveEvent->Setup();
       
    41 }
       
    42 
       
    43 void FmDriveWatcherPrivate::cancelWatch()
       
    44 {
       
    45     mDriveEvent->Cancel();
       
    46 }
       
    47 
       
    48 void FmDriveWatcherPrivate::OnDriveAddedOrChangedL()
       
    49 {
       
    50     FM_LOG( QString( "FmDriveWatcherPrivate::OnDriveAddedOrChangedL start" ) );
       
    51     emit driveAddedOrChanged();
       
    52     FM_LOG( QString( "FmDriveWatcherPrivate::OnDriveAddedOrChangedL end" ) );
       
    53 }