00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00039 #include "nsISupports.idl"
00040 interface nsIArray;
00041
00056 [scriptable, uuid(5224b8f1-34bf-4c88-8742-1c54b6d20c0a)]
00057 interface sbIFileScanCallback : nsISupports
00058 {
00064 void onFileScanStart();
00065
00073 void onFileScanFile(in AString filePath,
00074 in PRInt32 fileCount);
00075
00081 void onFileScanEnd();
00082 };
00083
00116 [scriptable, uuid(db7d7cda-a6fd-4f32-98d1-32ed746eb13d)]
00117 interface sbIFileScanQuery : nsISupports
00118 {
00119 attribute boolean searchHidden;
00120
00127 void setDirectory(in AString strDirectory);
00128
00135 AString getDirectory();
00136
00143 void setRecurse(in PRBool bRecurse);
00144
00151 PRBool getRecurse();
00152
00153 void addFileExtension(in AString strExtension);
00154
00161 void setCallback(in sbIFileScanCallback pCallback);
00162
00169 sbIFileScanCallback getCallback();
00170
00177 PRUint32 getFileCount();
00178
00182 void addFilePath(in AString strFilePath);
00183
00192 AString getFilePath(in PRUint32 nIndex);
00193
00200 PRBool isScanning();
00201
00205 void setIsScanning(in PRBool bIsScanning);
00206
00216 AString getLastFileFound();
00217
00227 AString getCurrentScanPath();
00228
00232 void setCurrentScanPath(in AString strScanPath);
00233
00237 void cancel();
00238
00242 nsIArray getResultRangeAsURIStrings(in unsigned long aStartIndex,
00243 in unsigned long aEndIndex);
00244
00248 PRBool isCancelled();
00249 };
00250
00264 [scriptable, uuid(411DD545-EAD0-41c4-8BA1-697DBE5C67EA)]
00265 interface sbIFileScan : nsISupports
00266 {
00273 void submitQuery(in sbIFileScanQuery pQuery);
00274
00283 PRInt32 scanDirectory(in AString strDirectory,
00284 in PRBool bRecurse,
00285 in sbIFileScanCallback pCallback);
00286 };