commonuis/CommonDialogs/src/CAknFileSelectionEventHandler.cpp
branchRCL_3
changeset 15 08e69e956a8c
parent 10 9f56a4e1b8ab
child 16 71dd06cfe933
--- a/commonuis/CommonDialogs/src/CAknFileSelectionEventHandler.cpp	Mon Mar 15 12:41:34 2010 +0200
+++ b/commonuis/CommonDialogs/src/CAknFileSelectionEventHandler.cpp	Wed Mar 31 21:59:52 2010 +0300
@@ -24,6 +24,8 @@
 
 #include "CAknFileSelectionModel.h"
 #include "MAknFileSelectionObserver.h"
+#include "CAknCommonDialogsPopupList.h"
+#include "CAknCFDFileSystemEvent.h"
 #include "AknCFDUtility.h"
 
 
@@ -93,6 +95,12 @@
 // Destructor
 CAknFileSelectionEventHandler::~CAknFileSelectionEventHandler()
     {
+    if(iFSObserver)
+        {
+        iFSObserver->Cancel();
+        delete iFSObserver;
+        iFSObserver = NULL;
+        }
     }
 
 
@@ -384,4 +392,21 @@
     return returnType;
     }
 
+void CAknFileSelectionEventHandler::StartFileSystemNotifierL(CAknCommonDialogsPopupList* aPopupList)
+    {
+    iPopupList = aPopupList;
+    TPath path;
+    iModel->GetCurrentPath(path);
+    iFSObserver = CAknCFDFileSystemEvent::NewL(iCoeEnv->FsSession(),*this,
+            ENotifyEntry,path);
+    }
+void CAknFileSelectionEventHandler::StopFileSystemNotifier()
+    {
+    iFSObserver->Cancel();
+    }
+void CAknFileSelectionEventHandler::NotifyFileSystemChangedL()
+    {
+    iModel->UpdateItemListL();
+    iPopupList->HandleFileSystemChangedL(iModel);
+    }
 // End of File