localconnectivityservice/lcstylustap/inc/lcstylustapdismount.h
branchRCL_3
changeset 39 4096754ee773
parent 38 3dcb815346df
child 40 52a167391590
equal deleted inserted replaced
38:3dcb815346df 39:4096754ee773
     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:  Header file for Stylus Tap indicator
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_LCSTYLUSTAPDISMOUNT_H
       
    20 #define C_LCSTYLUSTAPDISMOUNT_H
       
    21 
       
    22 #include <e32base.h> // CActive
       
    23 #include <f32file.h> 
       
    24 #include "forcedismounttimer.h"
       
    25 
       
    26 
       
    27 /**
       
    28  *  Active class dismount notifications notifiers 
       
    29  *
       
    30  */
       
    31 NONSHARABLE_CLASS( CLcStylusTapDismount ) : public CActive, 
       
    32                                             public MTimerNotifier
       
    33     {
       
    34 public:
       
    35     virtual ~CLcStylusTapDismount();
       
    36     static CLcStylusTapDismount* NewL();
       
    37     static CLcStylusTapDismount* NewLC();
       
    38     
       
    39 public:
       
    40     /**
       
    41      * Send dismount notifications for all usb drives.
       
    42      */
       
    43     void DisMountUsbDrives();
       
    44     
       
    45 protected:
       
    46     /**
       
    47      * Constructor
       
    48      */
       
    49     CLcStylusTapDismount();
       
    50     
       
    51     /**
       
    52      * ConstructL
       
    53      */
       
    54     void ConstructL();
       
    55     
       
    56 private:
       
    57     /**
       
    58      *  Send dismount nontication
       
    59      */
       
    60     void DoDismount();
       
    61 
       
    62 private: //from CActive    
       
    63     // CActive implementation
       
    64     /**
       
    65      * RunL
       
    66      */
       
    67     void RunL();
       
    68     
       
    69     /**
       
    70      * DoCancel
       
    71      */
       
    72     void DoCancel();
       
    73     
       
    74 private: // from MTimerNotifier
       
    75 
       
    76     /**
       
    77      * Force dismount timer callback
       
    78      */     
       
    79     void TimerExpired();    
       
    80         
       
    81 private:
       
    82     /**
       
    83      * Drive index
       
    84      */
       
    85     TInt iDriveIndex;
       
    86     /**
       
    87      * RFs session
       
    88      */
       
    89     RFs  iRFs;
       
    90     
       
    91     /**
       
    92      * List of drives
       
    93      */
       
    94     TDriveList iDriveList;    
       
    95     
       
    96     /**
       
    97      * Force dismount timer
       
    98      * Own
       
    99      */
       
   100     CForceDismountTimer* iDismountTimer;
       
   101     };
       
   102 
       
   103 
       
   104 
       
   105 #endif      // __LCSTYLUSTAP_H__