messagingfw/msgsrvnstore/server/inc/cmsvdiskchangenotifier.h
changeset 0 8e480a14352b
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     1 // Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __CMSVDISKCHANGENOTIFIER_H__
       
    17 #define __CMSVDISKCHANGENOTIFIER_H__
       
    18 
       
    19 #include <e32base.h>
       
    20 #include <f32file.h>
       
    21 
       
    22 
       
    23 //**********************************
       
    24 // MMsvDiskChangeObserver
       
    25 //**********************************
       
    26 
       
    27 class MMsvDiskChangeObserver
       
    28 /**
       
    29 @internalComponent
       
    30 @released
       
    31 */
       
    32 	{
       
    33 public:
       
    34 #if (defined SYMBIAN_MESSAGESTORE_UNIT_TESTCODE)
       
    35 	virtual void DiskRemoved(const TDriveUnit& aDrive, TBool aTestRemoval = EFalse)=0;
       
    36 	virtual void DiskInserted(const TDriveUnit& aDrive, TBool aTestInsert = EFalse)=0;
       
    37 #else
       
    38 	virtual void DiskRemoved(const TDriveUnit& aDrive)=0;
       
    39 	virtual void DiskInserted(const TDriveUnit& aDrive)=0;
       
    40 #endif
       
    41 	virtual void DiskChanged(const TDriveUnit& aDrive)=0;
       
    42 	};
       
    43 
       
    44 
       
    45 NONSHARABLE_CLASS (CMsvDiskChangeNotifier) : public CActive
       
    46 	{
       
    47 public:
       
    48 	static CMsvDiskChangeNotifier* NewL(const TDriveUnit& aDrive,MMsvDiskChangeObserver& aObserver);
       
    49 	void Start();
       
    50 	~CMsvDiskChangeNotifier();
       
    51 private:
       
    52 	CMsvDiskChangeNotifier(const TDriveUnit& aDrive, MMsvDiskChangeObserver& aObserver);
       
    53 	void ConstructL();
       
    54 	void RunL();
       
    55 	void DoCancel();	
       
    56 private:
       
    57 	RFs iFs;
       
    58 	TDriveUnit iDrive;
       
    59 	HBufC16* iDrivePath;
       
    60 	MMsvDiskChangeObserver& iObserver;
       
    61 	};
       
    62 	
       
    63 #endif /*__CMSVDISKCHANGENOTIFIER_H__*/