diff -r 8b2d6d0384b0 -r d9aefe59d544 camerauis/cameraapp/generic/inc/CamDriveChangeNotifier.h --- a/camerauis/cameraapp/generic/inc/CamDriveChangeNotifier.h Tue Feb 02 00:01:39 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,162 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - -#ifndef CAMDISKCHANGELISTENER_H -#define CAMDISKCHANGELISTENER_H - -// INCLUDES -#include - -// FORWARD DECLARATIONS -class MCamDriveChangeNotifierObserver; - -// CLASS DECLARATION - -/** -* Mmc Change Notifier. -* -* @since 5.0 -*/ -class MCamDriveChangeNotifierObserver - { - public: - enum TCamDriveChangeType - { - EDriveDismount, - EDriveMount - }; - - public: // New functions - - /** - * This method is used to notify changes. - */ - virtual TInt DriveChangeL( TCamDriveChangeType aType ) = 0; - - - protected: - - /** - * Destructor. - */ - virtual ~MCamDriveChangeNotifierObserver() {} - - }; - -/** -* Mmc Change Notifier. -* -* @since 5.0 -*/ -class CCamDriveChangeNotifier : public CBase - - { - private: - class CCamDiskChangeListener : public CActive - { - public: - static CCamDiskChangeListener* NewLC( - RFs& aFs, - TDriveNumber aDrive, - MCamDriveChangeNotifierObserver::TCamDriveChangeType aType, - CCamDriveChangeNotifier& aObserver ); - ~CCamDiskChangeListener(); - - void Start(); - void Stop(); - - protected: - CCamDiskChangeListener( - RFs& aFs, - TDriveNumber aDrive, - MCamDriveChangeNotifierObserver::TCamDriveChangeType aType, - CCamDriveChangeNotifier& aObserver ); - - private: - /** - * From CActive - */ - void DoCancel(); - - /** - * From CActive - */ - void RunL(); - - private: - RFs& iFs; - TDriveNumber iDrive; - MCamDriveChangeNotifierObserver::TCamDriveChangeType iType; - CCamDriveChangeNotifier& iObserver; - }; - - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - static CCamDriveChangeNotifier* NewL( - RFs& aFs, - MCamDriveChangeNotifierObserver& aObserver ); - - /** - * Destructor. - */ - ~CCamDriveChangeNotifier(); - - public: - /** - * Called from listeners - */ - TInt NotifyChangeL( - MCamDriveChangeNotifierObserver::TCamDriveChangeType aType ); - - /** - * Called by the observer when pending dismount can be done. - */ - void SendAllowDismount(); - - // New functions - - void StartMonitoring(); - void CancelMonitoring(); - - private: - - /** - * C++ default constructor. - */ - CCamDriveChangeNotifier( - RFs& aFs, - MCamDriveChangeNotifierObserver& aObserver ); - - private: // Data - // Ref. - MCamDriveChangeNotifierObserver& iObserver; - - // Ref. File server session - RFs& iFs; - - RPointerArray iListeners; - - }; - -#endif // CAMDISKCHANGELISTENER_H - -// End of File