Update contrib.
1 // Copyright (c) 2002-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 the License "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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // f32\sfile\sf_notif.cpp
22 TChangeQue FsNotify::iChangeQues[KMaxNotifyQues];
23 TDiskSpaceQue FsNotify::iDiskSpaceQues[KMaxDiskQues];
24 TDebugQue FsNotify::iDebugQue;
25 TDismountNotifyQue FsNotify::iDismountNotifyQue;
27 void CNotifyInfo::Initialise(TInfoType aType,TRequestStatus* aStatus,const RMessagePtr2& aMessage,CSessionFs* aSession)
38 CNotifyInfo::~CNotifyInfo()
43 __ASSERT_DEBUG(!iLink.iNext,Fault(ENotifyInfoDestructor));
46 void CNotifyInfo::Complete(TInt aError)
51 __PRINT2(_L("CNotifyInfo::Complete 0x%x error=%d"),this,aError);
52 if (iType != EDismount || !iMessage.IsNull()) // Dismount notifiers may be completed but remain in the list
53 { // until handled by the client or the session is closed.
54 iMessage.Complete(aError);
59 void CStdChangeInfo::Initialise(TNotifyType aChangeType,TRequestStatus* aStatus,const RMessagePtr2& aMessage,CSessionFs* aSession)
64 iChangeType=aChangeType;
65 CNotifyInfo::Initialise(EStdChange,aStatus,aMessage,aSession);
68 TUint CStdChangeInfo::RequestNotifyType(CFsRequest* aRequest)
70 // return notification type for the request
73 TUint notifyType=aRequest->Operation()->NotifyType();
74 if(aRequest->Operation()->Function()==EFsRename)
76 __ASSERT_DEBUG(notifyType==(ENotifyDir|ENotifyFile|ENotifyEntry),Fault(EStdChangeRequestType));
77 if(aRequest->Src().NamePresent())
78 notifyType=ENotifyFile|ENotifyEntry;
80 notifyType=ENotifyDir|ENotifyEntry;
85 TBool CStdChangeInfo::IsMatching(CFsRequest* aRequest)
87 // return ETrue if operation type of request matches that of change notification
90 if((iChangeType&ENotifyAll) || (iChangeType&aRequest->Operation()->NotifyType()))
96 void CExtChangeInfo::Initialise(TNotifyType aChangeType,TRequestStatus* aStatus,const RMessagePtr2& aMessage,CSessionFs* aSession,const TDesC& aName)
101 __ASSERT_DEBUG(aName.Length()<=KMaxFileName-2,Fault(EExtChangeNameLength));
103 iChangeType=aChangeType;
104 CNotifyInfo::Initialise(EExtChange,aStatus,aMessage,aSession);
108 TBool CExtChangeInfo::IsMatching(CFsRequest* aRequest)
110 // return ETrue if operation notify type of request matches that of change notification
114 TInt function=aRequest->Operation()->Function();
115 // if a rename occurred inform any requests if their path has been changed regardless of the notification type
116 if(function==EFsRename)
118 TBuf<KMaxFileName> renamePath=aRequest->Src().FullName().Mid(2);
120 if (iName.MatchF(renamePath)!=KErrNotFound)
125 //Special case where the dir the notifier is setup on has just been created
126 if(function==EFsMkDir)
129 RFs::CharToDrive(aRequest->Src().Drive()[0],notDrive); //can not fail as the drive letter has been parsed already
130 if(aRequest->Src().Path().MatchF(iName) == 0 && aRequest->DriveNumber() == notDrive)
134 //Special case where the File the notifier is setup on has just been created by temp as the name is not known unti it has been created
135 if(function==EFsRename||function==EFsFileOpen||function==EFsFileCreate||function==EFsFileReplace)
138 RFs::CharToDrive(aRequest->Src().Drive()[0],notDrive); //can not fail as the drive letter has been parsed already
139 if(aRequest->Src().FullName().Mid(2).MatchF(iName) == 0 && aRequest->DriveNumber() == notDrive)
143 //For the case of a file created using EFsFileTemp we can probably ignore it for special cases as it
144 //is created with a random name. Not specifically going to be being looked for
146 if((iChangeType&ENotifyAll) || (iChangeType&RequestNotifyType(aRequest)))
150 // Notify interested requests if a SetDriveName(), SetVolume() or RawDiskWrite() operation
151 // occcurred. By their nature, these operations have no distinct path. All outstanding
152 // requests monitoring the relevant TNotifyType are potentially interested in such operations
154 case EFsFileWriteDirty:
157 case EFsFileSetModified:
160 TBuf<KMaxFileName> root=iName;
163 // NB share may be NULL if file server has initiated a flush of the file cache
166 GetFileFromScratch(aRequest, share, fileCache);
167 if (share && share->File().FileName().MatchF(root) != KErrNotFound)
172 case EFsSetDriveName:
174 case EFsRawDiskWrite:
177 case EFsReserveDriveSpace:
184 TBuf<KMaxFileName> root = iName;
187 if(aRequest->Src().FullName().Mid(2).MatchF(root)!=KErrNotFound)
189 else if(function==EFsRename||function==EFsReplace||function==EFsFileRename)
191 // - rename/replace causes the file/path to disappear
192 if(aRequest->Dest().FullName().Mid(2).MatchF(root)!=KErrNotFound)
197 // - rename/replace causes the file/path to arrive
198 root=aRequest->Dest().FullName().Mid(2);
201 if (iName.MatchF(root)!=KErrNotFound)
213 void CDiskSpaceInfo::Initialise(TRequestStatus* aStatus,const RMessagePtr2& aMessage,CSessionFs* aSession,TInt64 aThreshold)
218 __ASSERT_DEBUG(aThreshold>0,Fault(EDiskSpaceThreshold));
219 iThreshold=aThreshold;
220 CNotifyInfo::Initialise(EDiskSpace,aStatus,aMessage,aSession);
223 TBool CDiskSpaceInfo::IsMatching(TInt64& aBefore,TInt64& aAfter)
225 // return ETrue if the threshold has been crossed
228 if((aBefore>=iThreshold&&aAfter<iThreshold)||(aBefore<=iThreshold&&aAfter>iThreshold))
233 void CDebugChangeInfo::Initialise(TUint aDebugType,TRequestStatus* aStatus,const RMessagePtr2& aMessage,CSessionFs* aSession)
238 __ASSERT_DEBUG((aDebugType&KDebugNotifyMask)&&!(aDebugType&~KDebugNotifyMask),Fault(EDebugChangeType));
239 iDebugType=aDebugType;
240 CNotifyInfo::Initialise(EDebugChange,aStatus,aMessage,aSession);
243 TBool CDebugChangeInfo::IsMatching(TUint aFunction)
245 // return ETrue if debug notification type matches aFunction
248 if(iDebugType&aFunction)
254 CDismountNotifyInfo::~CDismountNotifyInfo()
258 case EFsDismountNotifyClients:
260 case EFsDismountRegisterClient:
261 __ASSERT_ALWAYS(TheDrives[iDriveNumber].DismountUnlock() >= 0, Fault(ENotifyDismountCancel));
268 void CDismountNotifyInfo::Initialise(TNotifyDismountMode aMode, TInt aDriveNumber, TRequestStatus* aStatus,const RMessagePtr2& aMessage,CSessionFs* aSession)
271 iDriveNumber=aDriveNumber;
272 CNotifyInfo::Initialise(EDismount,aStatus,aMessage,aSession);
274 if (iMode == EFsDismountRegisterClient)
275 TheDrives[iDriveNumber].DismountLock();
278 TBool CDismountNotifyInfo::IsMatching(TNotifyDismountMode aMode, TInt aDriveNumber, CSessionFs* aSession)
280 if((iDriveNumber == aDriveNumber) && (iMode == aMode) && (aSession == NULL || aSession == Session()))
290 iHeader.SetOffset(_FOFF(CNotifyInfo,iLink));
291 TInt r=iQLock.CreateLocal();
292 __ASSERT_ALWAYS(r==KErrNone,Fault(EBaseQueConstruction));
295 TBaseQue::~TBaseQue()
303 void TBaseQue::DoAddNotify(CNotifyInfo* aInfo)
306 // Que should be locked by calling function
309 iHeader.AddLast(*aInfo);
312 TBool TBaseQue::DoCancelSession(CSessionFs* aSession,TInt aCompletionCode, TRequestStatus* aStatus)
314 // Cancel notification(s) setup by aSession matching aStatus if set
315 // Que should be locked by calling function
318 TDblQueIter<CNotifyInfo> q(iHeader);
320 TBool isFound=EFalse;
321 while((info=q++)!=NULL)
323 if(info->Session()==aSession && (!aStatus || aStatus==info->Status()))
326 info->Complete(aCompletionCode);
336 void TBaseQue::DoCancelAll(TInt aCompletionCode)
338 // Cancel all notifications
339 // Que should be locked by calling function
342 TDblQueIter<CNotifyInfo> q(iHeader);
344 while((info=q++)!=NULL)
346 info->Complete(aCompletionCode);
350 __ASSERT_DEBUG(iHeader.IsEmpty(),Fault(EBaseQueCancel));
353 TBool TBaseQue::IsEmpty()
355 // Que should be locked by calling function
358 return iHeader.IsEmpty();
361 TBool TChangeQue::IsEmpty()
367 TBool empty = TBaseQue::IsEmpty();
372 TInt TChangeQue::AddNotify(CNotifyInfo* aInfo)
378 TBaseQue::DoAddNotify(aInfo);
383 TBool TChangeQue::CancelSession(CSessionFs* aSession,TInt aCompletionCode,TRequestStatus* aStatus)
389 TBool isFound=TBaseQue::DoCancelSession(aSession,aCompletionCode,aStatus);
394 void TChangeQue::CancelAll(TInt aCompletionCode)
400 TBaseQue::DoCancelAll(aCompletionCode);
404 void TChangeQue::CheckChange(CFsRequest* aRequest)
406 // complete any notification in que that matches aRequest
410 TDblQueIter<CNotifyInfo> q(iHeader);
412 while((info=q++)!=NULL)
414 __ASSERT_DEBUG(info->Type()==CNotifyInfo::EStdChange||info->Type()==CNotifyInfo::EExtChange,Fault(EChangeQueType));
416 if(info->Type()==CNotifyInfo::EStdChange)
417 isMatching=((CStdChangeInfo*)info)->IsMatching(aRequest);
419 isMatching=((CExtChangeInfo*)info)->IsMatching(aRequest);
422 __PRINT1(_L("TChangeQue::CheckChange()-Matching info=0x%x"),info);
423 info->Complete(KErrNone);
431 TBool TDiskSpaceQue::IsEmpty()
437 TBool empty = TBaseQue::IsEmpty();
442 TInt TDiskSpaceQue::AddNotify(CNotifyInfo* aInfo)
449 if(iHeader.IsEmpty())
451 r=GetFreeDiskSpace(iFreeDiskSpace);
452 iReservedDiskSpace = TheDrives[iDriveNumber].ReservedSpace();
455 TBaseQue::DoAddNotify(aInfo);
460 TInt TDiskSpaceQue::CancelSession(CSessionFs* aSession,TInt aCompletionCode,TRequestStatus* aStatus)
466 TBaseQue::DoCancelSession(aSession,aCompletionCode,aStatus);
471 void TDiskSpaceQue::CancelAll(TInt aCompletionCode)
477 TBaseQue::DoCancelAll(aCompletionCode);
482 void TDiskSpaceQue::CheckDiskSpace()
484 // Complete any disk space notification whose threshold has been crossed
488 if(iHeader.IsEmpty())
494 TInt r=GetFreeDiskSpace(freeSpace);
495 TInt64 reservedSpace(TheDrives[iDriveNumber].ReservedSpace());
498 if((freeSpace==iFreeDiskSpace) && (reservedSpace==iReservedDiskSpace))
503 TDblQueIter<CNotifyInfo> q(iHeader);
505 while((info=q++)!=NULL)
507 __ASSERT_DEBUG(info->Type()==CNotifyInfo::EDiskSpace,Fault(EDiskSpaceQueType1));
509 TInt64 newSessionFreeSpace(freeSpace);
510 TInt64 oldSessionFreeSpace(iFreeDiskSpace);
511 if(!info->Session()->ReservedAccess(iDriveNumber))
513 newSessionFreeSpace -= reservedSpace;
514 oldSessionFreeSpace -= iReservedDiskSpace;
517 if(((CDiskSpaceInfo*)info)->IsMatching(oldSessionFreeSpace,newSessionFreeSpace))
519 __PRINT1(_L("TDiskSpaceQue::CheckDiskSpace()-Matching info=0x%x"),info);
520 info->Complete(KErrNone);
525 iFreeDiskSpace=freeSpace;
526 iReservedDiskSpace=reservedSpace;
529 TBaseQue::DoCancelAll(KErrNone);
533 void TDiskSpaceQue::CheckDiskSpace(TInt64& aFreeDiskSpace)
539 if(iHeader.IsEmpty())
545 TInt64 reservedSpace(TheDrives[iDriveNumber].ReservedSpace());
547 if((aFreeDiskSpace==iFreeDiskSpace) && (reservedSpace==iReservedDiskSpace))
552 TDblQueIter<CNotifyInfo> q(iHeader);
554 while((info=q++)!=NULL)
556 __ASSERT_DEBUG(info->Type()==CNotifyInfo::EDiskSpace,Fault(EDiskSpaceQueType2));
558 TInt64 newSessionFreeSpace(aFreeDiskSpace);
559 TInt64 oldSessionFreeSpace(iFreeDiskSpace);
560 if(!info->Session()->ReservedAccess(iDriveNumber))
562 newSessionFreeSpace -= reservedSpace;
563 oldSessionFreeSpace -= iReservedDiskSpace;
566 if(((CDiskSpaceInfo*)info)->IsMatching(oldSessionFreeSpace,newSessionFreeSpace))
568 __PRINT1(_L("TDiskSpaceQue::CheckDiskSpace()-Matching info=0x%x"),info);
569 info->Complete(KErrNone);
574 iFreeDiskSpace=aFreeDiskSpace;
575 iReservedDiskSpace=reservedSpace;
579 TInt TDiskSpaceQue::GetFreeDiskSpace(TInt64& aFreeDiskSpace)
584 __ASSERT_DEBUG(iDriveNumber>=EDriveA&&iDriveNumber<=EDriveZ,Fault(EDiskSpaceQueDrive));
585 __CHECK_DRIVETHREAD(iDriveNumber);
586 TInt r=TheDrives[iDriveNumber].FreeDiskSpace(aFreeDiskSpace);
590 TInt TDebugQue::AddNotify(CNotifyInfo* aInfo)
596 TBaseQue::DoAddNotify(aInfo);
601 TInt TDebugQue::CancelSession(CSessionFs* aSession,TInt aCompletionCode,TRequestStatus* aStatus)
607 TBool isFound=TBaseQue::DoCancelSession(aSession,aCompletionCode,aStatus);
612 void TDebugQue::CancelAll(TInt aCompletionCode)
618 TBaseQue::DoCancelAll(aCompletionCode);
622 void TDebugQue::CheckDebug(TUint aDebugChange)
624 // Complete any debug notification whose debug type matches aDebugChange
628 TDblQueIter<CNotifyInfo> q(iHeader);
630 while((info=q++)!=NULL)
632 __ASSERT_DEBUG(info->Type()==CNotifyInfo::EDebugChange,Fault(EDebugQueType));
633 if(((CDebugChangeInfo*)info)->IsMatching(aDebugChange))
635 __PRINT1(_L("TDebugQue::CheckDebug()-Matching info=0x%x"),info);
636 info->Complete(KErrNone);
644 TInt TDismountNotifyQue::AddNotify(CNotifyInfo* aInfo)
650 TBaseQue::DoAddNotify(aInfo);
655 TInt TDismountNotifyQue::CancelSession(CSessionFs* aSession,TInt aCompletionCode,TRequestStatus* aStatus)
661 TBool isFound=TBaseQue::DoCancelSession(aSession,aCompletionCode,aStatus);
666 void TDismountNotifyQue::CancelAll(TInt aCompletionCode)
672 TBaseQue::DoCancelAll(aCompletionCode);
676 void TDismountNotifyQue::CheckDismount(TNotifyDismountMode aMode, TInt aDrive, TBool aRemove, TInt aError)
678 // Complete any dismount notifications on the specified drive.
682 TDblQueIter<CNotifyInfo> q(iHeader);
684 while((info=q++)!=NULL)
686 __ASSERT_DEBUG(info->Type()==CNotifyInfo::EDismount,Fault(EBadDismountNotifyType));
687 if(((CDismountNotifyInfo*)info)->IsMatching(aMode, aDrive, NULL))
689 __PRINT1(_L("TDismountNotifyQue::CheckDismount()-Matching info=0x%x"),info);
690 info->Complete(aError);
699 __ASSERT_ALWAYS(!aRemove || TheDrives[aDrive].DismountLocked() == 0, Fault(EDismountLocked));
704 TBool TDismountNotifyQue::HandlePendingDismount(CSessionFs* aSession, TInt aDrive)
706 // Determine if the session has any outstanding dismount notifications on the specified drive.
710 TDblQueIter<CNotifyInfo> q(iHeader);
712 while((info=q++)!=NULL)
714 __ASSERT_DEBUG(info->Type()==CNotifyInfo::EDismount,Fault(EBadDismountNotifyType));
715 if(((CDismountNotifyInfo*)info)->IsMatching(EFsDismountRegisterClient, aDrive, aSession))
717 __PRINT1(_L("TDismountNotifyQue::CheckDismount()-Pending info=0x%x"),info);
728 void FsNotify::Initialise()
733 for(TInt i=0;i<KMaxDiskQues;++i)
735 iDiskSpaceQues[i].SetDriveNumber(i);
739 TBool FsNotify::IsChangeQueEmpty(TInt aDrive)
744 if((iChangeQues[ChangeIndex(aDrive)].IsEmpty()) && (iChangeQues[ChangeIndex(KDriveInvalid)].IsEmpty()))
750 TInt FsNotify::AddChange(CNotifyInfo* aInfo,TInt aDrive)
755 __ASSERT_DEBUG(aInfo->Type()==CNotifyInfo::EStdChange||aInfo->Type()==CNotifyInfo::EExtChange,Fault(EBadChangeNotifyType));
756 __PRINT2(_L("FsNotify::AddChange() drive=%d,info=0x%x"),aDrive,aInfo);
757 iChangeQues[ChangeIndex(aDrive)].AddNotify(aInfo);
761 TBool FsNotify::IsDiskSpaceQueEmpty(TInt aDrive)
766 if(iDiskSpaceQues[aDrive].IsEmpty())
772 TInt FsNotify::AddDiskSpace(CNotifyInfo* aInfo,TInt aDrive)
777 __ASSERT_DEBUG(aInfo->Type()==CNotifyInfo::EDiskSpace,Fault(EBadDiskNotifyType));
778 __ASSERT_DEBUG((aDrive>=EDriveA && aDrive<=EDriveZ),Fault(EDiskBadIndex1));
779 __PRINT2(_L("FsNotify::AddDiskSpace() drive=%d,info=0x%x"),aDrive,aInfo);
780 return(iDiskSpaceQues[aDrive].AddNotify(aInfo));
783 TInt FsNotify::AddDebug(CNotifyInfo* aDebugInfo)
788 __ASSERT_DEBUG(aDebugInfo->Type()==CNotifyInfo::EDebugChange,Fault(EBadDebugNotifyType));
789 __PRINT1(_L("FsNotify::AddDebug() info=0x%x"),aDebugInfo);
790 iDebugQue.AddNotify(aDebugInfo);
794 TInt FsNotify::AddDismountNotify(CNotifyInfo* aDismountNotifyInfo)
799 __ASSERT_DEBUG(aDismountNotifyInfo->Type()==CNotifyInfo::EDismount,Fault(EBadDismountNotifyType));
800 __PRINT1(_L("FsNotify::AddDismountNotify() info=0x%x"),aDismountNotifyInfo);
801 iDismountNotifyQue.AddNotify(aDismountNotifyInfo);
805 void FsNotify::HandleChange(CFsRequest* aRequest,TInt aDrive)
807 // Check whether any change notifications need to be completed due to aRequest on aDrive
810 __PRINT2(_L("FsNotify::HandleChange() aRequest=0x%x, aDrive=%d"),aRequest,aDrive);
811 if(!aRequest->IsChangeNotify())
813 iChangeQues[ChangeIndex(aDrive)].CheckChange(aRequest);
814 iChangeQues[ChangeIndex(KDriveInvalid)].CheckChange(aRequest);
818 void FsNotify::HandleDiskSpace(CFsRequest* aRequest,TInt aDrive)
820 // Check whether any disk space notifications need to be completed due to aRequest on aDrive
823 __ASSERT_DEBUG((aDrive>=EDriveA && aDrive<=EDriveZ) || aDrive==KDriveInvalid,Fault(EDiskBadIndex2));
824 __PRINT2(_L("FsNotify::HandleDiskSpace() aRequest=0x%x, aDrive=%d"),aRequest,aDrive);
826 if(!aRequest->Operation()->IsDiskSpaceNotify())
828 TInt f = aRequest->Operation()->Function();
829 if ((f == EFsFileWrite || f == EFsFileWriteDirty) && !((CFsClientMessageRequest*)aRequest)->IsFreeChanged())
831 if (FsThreadManager::IsDriveThread(aDrive,EFalse))
832 iDiskSpaceQues[aDrive].CheckDiskSpace();
835 void FsNotify::HandleDiskSpace(TInt aDrive, TInt64& aFreeSpace)
840 __ASSERT_DEBUG((aDrive>=EDriveA && aDrive<=EDriveZ),Fault(EDiskBadIndex3));
841 __PRINT1(_L("FsNotify::HandleDiskSpace() aDrive=%d"),aDrive);
842 iDiskSpaceQues[aDrive].CheckDiskSpace(aFreeSpace);
845 void FsNotify::HandleDebug(TUint aFunction)
847 // Check whether any debug notifications need to be completed due to aFunction
850 __PRINT1(_L("FsNotify::HandleDebug() aFunction=0x%x"),aFunction);
851 if(!(aFunction&KDebugNotifyMask))
853 iDebugQue.CheckDebug(aFunction);
856 void FsNotify::HandleDismount(TNotifyDismountMode aMode, TInt aDrive, TBool aRemove, TInt err)
858 // Handle dismount notifications for the given drive
861 __PRINT4(_L("FsNotify::HandleDismount() aMode = %d, aDrive=%d, aRemove=%d, err=%d"),aMode,aDrive,aRemove,err);
862 iDismountNotifyQue.CheckDismount(aMode, aDrive, aRemove, err);
865 TBool FsNotify::HandlePendingDismount(CSessionFs* aSession, TInt aDrive)
867 // Checks if the session has an outstanding notification registered on the drive
870 __PRINT1(_L("FsNotify::HandlePendingDismount() aDrive=%d"),aDrive);
871 return iDismountNotifyQue.HandlePendingDismount(aSession, aDrive);
874 void FsNotify::DiskChange(TInt aDrive)
876 // Complete all notifications in queus due to a disk change
879 __ASSERT_DEBUG((aDrive>=EDriveA && aDrive<=EDriveZ),Fault(EDiskChangeDrive));
880 __PRINT1(_L("FsNotify::DiskChange() aDrive=%d"),aDrive);
881 iChangeQues[ChangeIndex(aDrive)].CancelAll(KErrNone);
882 iChangeQues[ChangeIndex(KDriveInvalid)].CancelAll(KErrNone);
883 iDiskSpaceQues[aDrive].CancelAll(KErrNone);
884 iDebugQue.CancelAll(KErrNone);
886 // if there are any files containing dirty data, start issuing write-dirty data requests to trigger
887 // a critical notifier (CFileCache::HandleWriteDirtyError())
888 // otherwise purge all file caches
889 TDrive& drive=TheDrives[aDrive];
890 drive.FlushCachedFileInfo(ETrue);
894 void FsNotify::CancelChangeSession(CSessionFs* aSession,TRequestStatus* aStatus)
896 // Cancel change notifcation(s) setup by aSession and matching aStatus if not NULL
899 __PRINT2(_L("FsNotify::CancelChangeSession() aSession=0x%x aStatus=0x%x"),aSession,aStatus);
900 for(TInt i=0;i<KMaxNotifyQues;++i)
902 TBool isFound=iChangeQues[i].CancelSession(aSession,KErrCancel,aStatus);
903 if(aStatus && isFound)
908 void FsNotify::CancelDiskSpaceSession(CSessionFs* aSession,TRequestStatus* aStatus)
910 // Cancel disk space notification(s) setup by aSession and matching aStatus if not NULL
914 __PRINT2(_L("FsNotify::CancelDiskSpaceSession() aSession=0x%x aStatus=0x%x"),aSession,aStatus);
915 for(TInt i=0;i<KMaxDiskQues;++i)
917 TBool isFound=iDiskSpaceQues[i].CancelSession(aSession,KErrCancel,aStatus);
918 if(aStatus && isFound)
923 void FsNotify::CancelDebugSession(CSessionFs* aSession, TRequestStatus* aStatus)
925 // Cancel debug notification(s) setup by aSession and matching aStatus if not NULL
928 __PRINT2(_L("FsNotify::CancelDebugSession() aSession=0x%x aStatus=0x%x"),aSession,aStatus);
929 iDebugQue.CancelSession(aSession,KErrCancel,aStatus);
932 void FsNotify::CancelDismountNotifySession(CSessionFs* aSession, TRequestStatus* aStatus)
934 // Cancel all media removal notification(s) setup by aSession (if aStatus == NULL)
935 // else cancels all oustanding notifications(s) for the session
938 __PRINT2(_L("FsNotify::CancelDismountNotifySession() aSession=0x%x aStatus=0x%x"),aSession,aStatus);
939 iDismountNotifyQue.CancelSession(aSession,KErrCancel,aStatus);
942 void FsNotify::CancelSession(CSessionFs* aSession)
947 __PRINT(_L("FsNotify::CancelSession"));
948 FsNotify::CancelChangeSession(aSession);
949 FsNotify::CancelDiskSpaceSession(aSession);
950 FsNotify::CancelDebugSession(aSession);
951 FsNotify::CancelDismountNotifySession(aSession);
955 TInt FsNotify::ChangeIndex(TInt aDrive)
960 __ASSERT_DEBUG((aDrive>=EDriveA && aDrive<=EDriveZ) || aDrive==KDriveInvalid,Fault(EChangeBadIndex));
961 if(aDrive==KDriveInvalid)