--- a/camerauis/cameraapp/generic/inc/CamDriveChangeNotifier.h Wed Apr 14 15:41:04 2010 +0300
+++ b/camerauis/cameraapp/generic/inc/CamDriveChangeNotifier.h Tue Apr 27 16:19:06 2010 +0300
@@ -22,6 +22,8 @@
// INCLUDES
#include <f32file.h>
+#include "campropertywatcher.h"
+#include "campropertyobserver.h"
// FORWARD DECLARATIONS
class MCamDriveChangeNotifierObserver;
@@ -39,7 +41,9 @@
enum TCamDriveChangeType
{
EDriveDismount,
- EDriveMount
+ EDriveMount,
+ EDriveUSBMassStorageModeOn,
+ EDriveUSBMassStorageModeOff
};
public: // New functions
@@ -64,7 +68,8 @@
*
* @since 5.0
*/
-class CCamDriveChangeNotifier : public CBase
+class CCamDriveChangeNotifier : public CBase,
+ public MPropertyObserver
{
private:
@@ -74,7 +79,6 @@
static CCamDiskChangeListener* NewLC(
RFs& aFs,
TDriveNumber aDrive,
- MCamDriveChangeNotifierObserver::TCamDriveChangeType aType,
CCamDriveChangeNotifier& aObserver );
~CCamDiskChangeListener();
@@ -85,7 +89,6 @@
CCamDiskChangeListener(
RFs& aFs,
TDriveNumber aDrive,
- MCamDriveChangeNotifierObserver::TCamDriveChangeType aType,
CCamDriveChangeNotifier& aObserver );
private:
@@ -102,10 +105,9 @@
private:
RFs& iFs;
TDriveNumber iDrive;
- MCamDriveChangeNotifierObserver::TCamDriveChangeType iType;
CCamDriveChangeNotifier& iObserver;
};
-
+
public: // Constructors and destructor
/**
@@ -137,6 +139,14 @@
void StartMonitoring();
void CancelMonitoring();
+ public: // From MPropertyObserver
+ /**
+ * The value of a watched property has changed
+ * @param aCategory The category of the property
+ * @param aKey the Identifier of the property
+ */
+ void HandlePropertyChangedL( const TUid& aCategory, const TUint aKey );
+
private:
/**
@@ -145,6 +155,8 @@
CCamDriveChangeNotifier(
RFs& aFs,
MCamDriveChangeNotifierObserver& aObserver );
+
+ void ConstructL();
private: // Data
// Ref.
@@ -154,6 +166,10 @@
RFs& iFs;
RPointerArray<CCamDiskChangeListener> iListeners;
+
+ CCamPropertyWatcher* iUsbMSWatcher;
+
+ TBool iMassStorageModeOn;
};