First public contribution.
1 // Copyright (c) 2003-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.
22 #define MSG0(aType) ((TUint32)(TFsPluginRequest::aType))
23 #define MSG1(aType) ((TUint32)(TFsPluginRequest::aType) << 8)
24 #define MSG2(aType) ((TUint32)(TFsPluginRequest::aType) << 16)
25 #define MSG3(aType) ((TUint32)(TFsPluginRequest::aType) << 24)
27 static const TOperation OperationArray[EMaxClientOperations]=
28 {/* function Flags iInitialise iPostInitialise iDoRequestL iMessageArguments*/
29 { EFsAddFileSystem, ESync, &TFsAddFileSystem::Initialise, NULL, &TFsAddFileSystem::DoRequestL },
30 { EFsRemoveFileSystem, ESync, &TFsRemoveFileSystem::Initialise, NULL, &TFsRemoveFileSystem::DoRequestL },
31 { EFsMountFileSystem, 0, &TFsMountFileSystem::Initialise, NULL, &TFsMountFileSystem::DoRequestL },
32 { EFsNotifyChange, ESync, &TFsNotifyChange::Initialise, NULL, &TFsNotifyChange::DoRequestL },
33 { EFsNotifyChangeCancel, ESync, &TFsNotifyChangeCancel::Initialise, NULL, &TFsNotifyChangeCancel::DoRequestL },
34 { EFsDriveList, ESync, &TFsDriveList::Initialise, NULL, &TFsDriveList::DoRequestL },
35 { EFsDrive, ESync, &TFsDrive::Initialise, NULL, &TFsDrive::DoRequestL },
36 { EFsVolume, 0, &TFsVolume::Initialise, NULL, &TFsVolume::DoRequestL , MSG0(EVolumeInfo)},
37 { EFsSetVolume, 0, &TFsSetVolume::Initialise, NULL, &TFsSetVolume::DoRequestL },
38 { EFsSubst, ESync, &TFsSubst::Initialise, NULL, &TFsSubst::DoRequestL },
39 { EFsSetSubst, ESync | EParseSrc, &TFsSetSubst::Initialise, NULL, &TFsSetSubst::DoRequestL },
40 { EFsRealName, ESync | EParseSrc, &TFsRealName::Initialise, NULL, &TFsRealName::DoRequestL },
41 { EFsDefaultPath, ESync, &TFsDefaultPath::Initialise, NULL, &TFsDefaultPath::DoRequestL },
42 { EFsSetDefaultPath, ESync, &TFsSetDefaultPath::Initialise, NULL, &TFsSetDefaultPath::DoRequestL },
43 { EFsSessionPath, ESync, &TFsSessionPath::Initialise, NULL, &TFsSessionPath::DoRequestL },
44 { EFsSetSessionPath, ESync, &TFsSetSessionPath::Initialise, NULL, &TFsSetSessionPath::DoRequestL },
45 { EFsMkDir, EParseSrc, &TFsMkDir::Initialise, NULL, &TFsMkDir::DoRequestL , MSG0(EName) | MSG1(EMode)},
46 { EFsRmDir, EParseSrc, &TFsRmDir::Initialise, NULL, &TFsRmDir::DoRequestL , MSG0(EName)},
47 { EFsParse, ESync, &TFsParse::Initialise, NULL, &TFsParse::DoRequestL },
48 { EFsDelete, EParseSrc, &TFsDelete::Initialise, NULL, &TFsDelete::DoRequestL , MSG0(EName)},
49 { EFsRename, EParseDst | EParseSrc, &TFsRename::Initialise, NULL, &TFsRename::DoRequestL , MSG0(EName) | MSG1(ENewName)},
50 { EFsReplace, EParseDst | EParseSrc, &TFsReplace::Initialise, NULL, &TFsReplace::DoRequestL , MSG0(EName) | MSG1(ENewName)},
51 { EFsEntry, EParseSrc, &TFsEntry::Initialise, NULL, &TFsEntry::DoRequestL , MSG0(EName) | MSG1(EEntry)},
52 { EFsSetEntry, EParseSrc, &TFsSetEntry::Initialise, NULL, &TFsSetEntry::DoRequestL , MSG0(EName) | MSG1(ETime) | MSG2(ESetAtt) | MSG3(EClearAtt)},
53 { EFsGetDriveName, ESync, &TFsGetDriveName::Initialise, NULL, &TFsGetDriveName::DoRequestL },
54 { EFsSetDriveName, ESync, &TFsSetDriveName::Initialise, NULL, &TFsSetDriveName::DoRequestL },
55 { EFsFormatSubClose, ESync, &TFsSubClose::Initialise, NULL, &TFsSubClose::DoRequestL },
56 { EFsDirSubClose, ESync, &TFsSubClose::Initialise, NULL, &TFsSubClose::DoRequestL },
57 { EFsFileSubClose, EFileShare, &TFsSubClose::Initialise, NULL, &TFsSubClose::DoRequestL },
58 { EFsRawSubClose, ESync, &TFsSubClose::Initialise, NULL, &TFsSubClose::DoRequestL },
59 { EFsFileOpen, EParseSrc, &TFsFileOpen::Initialise, NULL, &TFsFileOpen::DoRequestL , MSG0(EName) | MSG1(EMode)},
60 { EFsFileCreate, EParseSrc, &TFsFileCreate::Initialise, NULL, &TFsFileCreate::DoRequestL , MSG0(EName) | MSG1(EMode)},
61 { EFsFileReplace, EParseSrc, &TFsFileReplace::Initialise, NULL, &TFsFileReplace::DoRequestL , MSG0(EName) | MSG1(EMode)},
62 { EFsFileTemp, EParseSrc, &TFsFileTemp::Initialise, NULL, &TFsFileTemp::DoRequestL , MSG0(EName) | MSG1(EMode) | MSG2(ENewName)},
63 { EFsFileRead, EParseSrc | EFileShare, &TFsFileRead::Initialise, &TFsFileRead::PostInitialise, &TFsFileRead::DoRequestL , MSG0(EData) | MSG1(ELength) | MSG2(EPosition) },
64 { EFsFileWrite, EParseSrc | EFileShare, &TFsFileWrite::Initialise, &TFsFileWrite::PostInitialise, &TFsFileWrite::DoRequestL , MSG0(EData) | MSG1(ELength) | MSG2(EPosition) },
65 { EFsFileLock, EParseSrc | EFileShare, &TFsFileLock::Initialise, NULL, &TFsFileLock::DoRequestL , MSG0(EPosition) | MSG1(ELength)},
66 { EFsFileUnLock, EParseSrc | EFileShare, &TFsFileUnlock::Initialise, NULL, &TFsFileUnlock::DoRequestL , MSG0(EPosition) | MSG1(ELength)},
67 { EFsFileSeek, EParseSrc | EFileShare, &TFsFileSeek::Initialise, NULL, &TFsFileSeek::DoRequestL , MSG0(EPosition) | MSG1(EMode) | MSG2(ENewPosition)},
68 { EFsFileFlush, EParseSrc | EFileShare, &TFsFileFlush::Initialise, NULL, &TFsFileFlush::DoRequestL },
69 { EFsFileSize, EParseSrc | EFileShare, &TFsFileSize::Initialise, NULL, &TFsFileSize::DoRequestL , MSG0(ESize)},
70 { EFsFileSetSize, EParseSrc | EFileShare, &TFsFileSetSize::Initialise, NULL, &TFsFileSetSize::DoRequestL , MSG0(ESize)},
71 { EFsFileAtt, EParseSrc | EFileShare, &TFsFileAtt::Initialise, NULL, &TFsFileAtt::DoRequestL , MSG0(EAtt)},
72 { EFsFileSetAtt, EParseSrc | EFileShare, &TFsFileSetAtt::Initialise, NULL, &TFsFileSetAtt::DoRequestL , MSG0(ESetAtt) | MSG1(EClearAtt)},
73 { EFsFileModified, EParseSrc | EFileShare, &TFsFileModified::Initialise, NULL, &TFsFileModified::DoRequestL , MSG0(ETime)},
74 { EFsFileSetModified, EParseSrc | EFileShare, &TFsFileSetModified::Initialise, NULL, &TFsFileSetModified::DoRequestL , MSG0(ETime)},
75 { EFsFileSet, EParseSrc | EFileShare, &TFsFileSet::Initialise, NULL, &TFsFileSet::DoRequestL , MSG0(ETime) | MSG1(ESetAtt) | MSG2(EClearAtt)},
76 { EFsFileChangeMode, EParseSrc | EFileShare, &TFsFileChangeMode::Initialise, NULL, &TFsFileChangeMode::DoRequestL , MSG0(EMode)},
77 { EFsFileRename, EParseDst | EParseSrc, &TFsFileRename::Initialise, NULL, &TFsFileRename::DoRequestL , MSG0(ENewName)},
78 { EFsDirOpen, EParseSrc, &TFsDirOpen::Initialise, NULL, &TFsDirOpen::DoRequestL , MSG0(EName) | MSG1(EAttMask) | MSG2(EUid)},
79 { EFsDirReadOne, 0, &TFsDirReadOne::Initialise, NULL, &TFsDirReadOne::DoRequestL , MSG0(EEntry)},
80 { EFsDirReadPacked, 0, &TFsDirReadPacked::Initialise, NULL, &TFsDirReadPacked::DoRequestL , MSG0(EEntryArray)},
81 { EFsFormatOpen, EParseSrc, &TFsFormatOpen::Initialise, NULL, &TFsFormatOpen::DoRequestL },
82 { EFsFormatNext, EParseSrc, &TFsFormatNext::Initialise, NULL, &TFsFormatNext::DoRequestL },
83 { EFsRawDiskOpen, 0, &TFsRawDiskOpen::Initialise, NULL, &TFsRawDiskOpen::DoRequestL },
84 { EFsRawDiskRead, EParseSrc, &TFsRawDiskRead::Initialise, NULL, &TFsRawDiskRead::DoRequestL },
85 { EFsRawDiskWrite, EParseSrc, &TFsRawDiskWrite::Initialise, NULL, &TFsRawDiskWrite::DoRequestL },
86 { EFsResourceCountMarkStart, ESync, &TFsResourceCountMarkStart::Initialise, NULL, &TFsResourceCountMarkStart::DoRequestL },
87 { EFsResourceCountMarkEnd, ESync, &TFsResourceCountMarkEnd::Initialise, NULL, &TFsResourceCountMarkEnd::DoRequestL },
88 { EFsResourceCount, ESync, &TFsResourceCount::Initialise, NULL, &TFsResourceCount::DoRequestL },
89 { EFsCheckDisk, EParseSrc, &TFsCheckDisk::Initialise, NULL, &TFsCheckDisk::DoRequestL },
90 { EFsGetShortName, EParseSrc, &TFsGetShortName::Initialise, NULL, &TFsGetShortName::DoRequestL },
91 { EFsGetLongName, EParseSrc, &TFsGetLongName::Initialise, NULL, &TFsGetLongName::DoRequestL },
92 { EFsIsFileOpen, EParseSrc, &TFsIsFileOpen::Initialise, NULL, &TFsIsFileOpen::DoRequestL },
93 { EFsListOpenFiles, ESync, &TFsListOpenFiles::Initialise, NULL, &TFsListOpenFiles::DoRequestL },
94 { EFsGetNotifyUser, ESync, &TFsGetNotifyUser::Initialise, NULL, &TFsGetNotifyUser::DoRequestL },
95 { EFsSetNotifyUser, ESync, &TFsSetNotifyUser::Initialise, NULL, &TFsSetNotifyUser::DoRequestL },
96 { EFsIsFileInRom, EParseSrc, &TFsIsFileInRom::Initialise, NULL, &TFsIsFileInRom::DoRequestL },
97 { EFsIsValidName, ESync, &TFsIsValidName::Initialise, NULL, &TFsIsValidName::DoRequestL },
98 { EFsDebugFunction, ESync, &TFsDebugFunc::Initialise, NULL, &TFsDebugFunc::DoRequestL },
99 { EFsReadFileSection, EParseSrc, &TFsReadFileSection::Initialise, NULL, &TFsReadFileSection::DoRequestL , MSG0(EData) | MSG1(EName) | MSG2(EPosition) | MSG3(ELength)},
100 { EFsNotifyChangeEx, ESync | EParseSrc, &TFsNotifyChangeEx::Initialise, NULL, &TFsNotifyChangeEx::DoRequestL },
101 { EFsNotifyChangeCancelEx, ESync, &TFsNotifyChangeCancelEx::Initialise, NULL, &TFsNotifyChangeCancelEx::DoRequestL },
102 { EFsDismountFileSystem, 0, &TFsDismountFileSystem::Initialise, NULL, &TFsDismountFileSystem::DoRequestL },
103 { EFsFileSystemName, ESync, &TFsFileSystemName::Initialise, NULL, &TFsFileSystemName::DoRequestL },
104 { EFsScanDrive, EParseSrc, &TFsScanDrive::Initialise, NULL, &TFsScanDrive::DoRequestL },
105 { EFsControlIo, 0, &TFsControlIo::Initialise, NULL, &TFsControlIo::DoRequestL },
106 { EFsLockDrive, 0, &TFsLockDrive::Initialise, NULL, &TFsLockDrive::DoRequestL },
107 { EFsUnlockDrive, 0, &TFsUnlockDrive::Initialise, NULL, &TFsUnlockDrive::DoRequestL },
108 { EFsClearPassword, 0, &TFsClearPassword::Initialise, NULL, &TFsClearPassword::DoRequestL },
109 { EFsNotifyDiskSpace, 0, &TFsNotifyDiskSpace::Initialise, NULL, &TFsNotifyDiskSpace::DoRequestL },
110 { EFsNotifyDiskSpaceCancel, ESync, &TFsNotifyDiskSpaceCancel::Initialise, NULL, &TFsNotifyDiskSpaceCancel::DoRequestL },
111 { EFsFileDrive, EParseSrc | EFileShare, &TFsFileDrive::Initialise, NULL, &TFsFileDrive::DoRequestL },
112 { EFsRemountDrive, 0, &TFsRemountDrive::Initialise, NULL, &TFsRemountDrive::DoRequestL },
113 { EFsMountFileSystemScan, 0, &TFsMountFileSystemScan::Initialise, NULL, &TFsMountFileSystemScan::DoRequestL },
114 { EFsSessionToPrivate, ESync, &TFsSessionToPrivate::Initialise, NULL, &TFsSessionToPrivate::DoRequestL },
115 { EFsPrivatePath, ESync, &TFsPrivatePath::Initialise, NULL, &TFsPrivatePath::DoRequestL },
116 { EFsCreatePrivatePath, 0, &TFsCreatePrivatePath::Initialise, NULL, &TFsCreatePrivatePath::DoRequestL },
117 { EFsAddExtension, ESync, &TFsAddExtension::Initialise, NULL, &TFsAddExtension::DoRequestL },
118 { EFsMountExtension, 0, &TFsMountExtension::Initialise, NULL, &TFsMountExtension::DoRequestL },
119 { EFsDismountExtension, 0, &TFsDismountExtension::Initialise, NULL, &TFsDismountExtension::DoRequestL },
120 { EFsRemoveExtension, ESync, &TFsRemoveExtension::Initialise, NULL, &TFsRemoveExtension::DoRequestL },
121 { EFsExtensionName, 0, &TFsExtensionName::Initialise, NULL, &TFsExtensionName::DoRequestL },
122 { EFsStartupInitComplete, ESync, &TFsStartupInitComplete::Initialise, NULL, &TFsStartupInitComplete::DoRequestL },
123 { EFsSetLocalDriveMapping, ESync, &TFsSetLocalDriveMapping::Initialise, NULL, &TFsSetLocalDriveMapping::DoRequestL },
124 { EFsFinaliseDrive, 0, &TFsFinaliseDrive::Initialise, NULL, &TFsFinaliseDrive::DoRequestL },
125 { EFsFileDuplicate, 0 | EFileShare, &TFsFileDuplicate::Initialise, NULL, &TFsFileDuplicate::DoRequestL }, // Not done
126 { EFsFileAdopt, ESync, &TFsFileAdopt::Initialise, NULL, &TFsFileAdopt::DoRequestL }, // Not done
127 { EFsSwapFileSystem, ESync, &TFsSwapFileSystem::Initialise, NULL, &TFsSwapFileSystem::DoRequestL },
128 { EFsErasePassword, 0, &TFsErasePassword::Initialise, NULL, &TFsErasePassword::DoRequestL },
129 { EFsReserveDriveSpace, 0, &TFsReserveDriveSpace::Initialise, NULL, &TFsReserveDriveSpace::DoRequestL },
130 { EFsGetReserveAccess, ESync, &TFsGetReserveAccess::Initialise, NULL, &TFsGetReserveAccess::DoRequestL },
131 { EFsReleaseReserveAccess, ESync, &TFsReleaseReserveAccess::Initialise, NULL, &TFsReleaseReserveAccess::DoRequestL },
132 { EFsFileName, ESync, &TFsFileName::Initialise, NULL, &TFsFileName::DoRequestL , MSG0(EName)},
133 { EFsGetMediaSerialNumber, 0, &TFsGetMediaSerialNumber::Initialise, NULL, &TFsGetMediaSerialNumber::DoRequestL },
134 { EFsFileFullName, ESync, &TFsFileFullName::Initialise, NULL, &TFsFileFullName::DoRequestL , MSG0(EName)}, // Wasn't in original list?
135 { EFsAddPlugin, ESync, &TFsAddPlugin::Initialise, NULL, &TFsAddPlugin::DoRequestL },
136 { EFsRemovePlugin, ESync, &TFsRemovePlugin::Initialise, NULL, &TFsRemovePlugin::DoRequestL },
137 { EFsMountPlugin, ESync, &TFsMountPlugin::Initialise, NULL, &TFsMountPlugin::DoRequestL },
138 { EFsDismountPlugin, 0, &TFsDismountPlugin::Initialise, NULL, &TFsDismountPlugin::DoRequestL },
139 { EFsPluginName, ESync, &TFsPluginName::Initialise, NULL, &TFsPluginName::DoRequestL },
140 { EFsPluginOpen, ESync | EParseSrc, &TFsPluginOpen::Initialise, NULL, &TFsPluginOpen::DoRequestL },
141 { EFsPluginSubClose, ESync, &TFsSubClose::Initialise, NULL, &TFsSubClose::DoRequestL },
142 { EFsPluginDoRequest, 0, &TFsPluginDoRequest::Initialise, NULL, &TFsPluginDoRequest::DoRequestL },
143 { EFsPluginDoControl, 0, &TFsPluginDoControl::Initialise, NULL, &TFsPluginDoControl::DoRequestL },
144 { EFsPluginDoCancel, 0, &TFsPluginDoCancel::Initialise, NULL, &TFsPluginDoCancel::DoRequestL },
145 { EFsNotifyDismount, 0, &TFsNotifyDismount::Initialise, NULL, &TFsNotifyDismount::DoRequestL },
146 { EFsNotifyDismountCancel, ESync, &TFsNotifyDismountCancel::Initialise, NULL, &TFsNotifyDismountCancel::DoRequestL },
147 { EFsAllowDismount, 0, &TFsAllowDismount::Initialise, NULL, &TFsAllowDismount::DoRequestL },
148 { EFsSetStartupConfiguration, ESync, &TFsSetStartupConfiguration::Initialise, NULL, &TFsSetStartupConfiguration::DoRequestL },
149 { EFsFileReadCancel, ESync, &TFsFileReadCancel::Initialise, NULL, &TFsFileReadCancel::DoRequestL },
150 { EFsAddCompositeMount, ESync, &TFsAddCompositeMount::Initialise, NULL, &TFsAddCompositeMount::DoRequestL },
151 { EFsSetSessionFlags, ESync, &TFsSetSessionFlags::Initialise, NULL, &TFsSetSessionFlags::DoRequestL },
152 { EFsSetSystemDrive, ESync, &TFsSetSystemDrive::Initialise, NULL, &TFsSetSystemDrive::DoRequestL },
153 { EFsBlockMap, EParseSrc, &TFsBlockMap::Initialise, NULL, &TFsBlockMap::DoRequestL },
154 { EFsUnclamp, 0, &TFsUnclamp::Initialise, NULL, &TFsUnclamp::DoRequestL },
155 { EFsFileClamp, EParseSrc, &TFsFileClamp::Initialise, NULL, &TFsFileClamp::DoRequestL },
156 { EFsQueryVolumeInfoExt, 0, &TFsQueryVolumeInfoExt::Initialise, NULL, &TFsQueryVolumeInfoExt::DoRequestL },
157 { EFsInitialisePropertiesFile,0, &TFsInitialisePropertiesFile::Initialise, NULL, &TFsInitialisePropertiesFile::DoRequestL },
158 { EFsFileWriteDirty, EFileShare, NULL, &TFsFileWriteDirty::PostInitialise, &TFsFileWrite::DoRequestL },
159 { EFsSynchroniseDriveThread, 0, &TFsSynchroniseDriveThread::Initialise, NULL, &TFsSynchroniseDriveThread::DoRequestL },
160 { EFsAddProxyDrive, ESync, &TFsAddProxyDrive::Initialise, NULL, &TFsAddProxyDrive::DoRequestL },
161 { EFsRemoveProxyDrive, ESync, &TFsRemoveProxyDrive::Initialise, NULL, &TFsRemoveProxyDrive::DoRequestL },
162 { EFsMountProxyDrive, 0, &TFsMountProxyDrive::Initialise, NULL, &TFsMountProxyDrive::DoRequestL },
163 { EFsDismountProxyDrive, 0, &TFsDismountProxyDrive::Initialise, NULL, &TFsDismountProxyDrive::DoRequestL },
164 { EFsNotificationOpen, ESync, &TFsNotificationOpen::Initialise, NULL, &TFsNotificationOpen::DoRequestL },
165 { EFsNotificationBuffer, ESync, &TFsNotificationBuffer::Initialise, NULL, &TFsNotificationBuffer::DoRequestL },
166 { EFsNotificationRequest, ESync, &TFsNotificationRequest::Initialise, NULL, &TFsNotificationRequest::DoRequestL },
167 { EFsNotificationCancel, ESync, &TFsNotificationCancel::Initialise, NULL, &TFsNotificationCancel::DoRequestL },
168 { EFsNotificationSubClose, ESync, &TFsNotificationSubClose::Initialise, NULL, &TFsNotificationSubClose::DoRequestL },
169 { EFsNotificationAdd, ESync, &TFsNotificationAdd::Initialise, NULL, &TFsNotificationAdd::DoRequestL },
170 { EFsNotificationRemove, ESync, &TFsNotificationRemove::Initialise, NULL, &TFsNotificationRemove::DoRequestL },
171 { EFsLoadCodePage, 0, &TFsLoadCodePage::Initialise, NULL, &TFsLoadCodePage::DoRequestL },