sbIFileScan.idl
Go to the documentation of this file.
1 /*
2 //
3 // BEGIN SONGBIRD GPL
4 //
5 // This file is part of the Songbird web player.
6 //
7 // Copyright(c) 2005-2008 POTI, Inc.
8 // http://songbirdnest.com
9 //
10 // This file may be licensed under the terms of of the
11 // GNU General Public License Version 2 (the "GPL").
12 //
13 // Software distributed under the License is distributed
14 // on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either
15 // express or implied. See the GPL for the specific language
16 // governing rights and limitations.
17 //
18 // You should have received a copy of the GPL along with this
19 // program. If not, go to http://www.gnu.org/licenses/gpl.html
20 // or write to the Free Software Foundation, Inc.,
21 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 //
23 // END SONGBIRD GPL
24 //
25 */
26 
39 #include "nsISupports.idl"
40 interface nsIArray;
41 
56 [scriptable, uuid(e1cf5762-1dd1-11b2-bc1c-a0de92947c7a)]
58 {
64  void onFileScanStart();
65 
73  void onFileScanFile(in AString filePath,
74  in PRInt32 fileCount);
75 
81  void onFileScanEnd();
82 };
83 
116 [scriptable, uuid(E53F7F77-9576-46FC-9F25-0A5A05A7E9CA)]
118 {
119  attribute boolean searchHidden;
120 
127  void setDirectory(in AString strDirectory);
128 
135  AString getDirectory();
136 
143  void setRecurse(in PRBool bRecurse);
144 
151  PRBool getRecurse();
152 
153  void addFileExtension(in AString strExtension);
154 
160  void addFlaggedFileExtension(in AString strExtension);
161 
166  readonly attribute boolean flaggedExtensionsFound;
167 
174  void setCallback(in sbIFileScanCallback pCallback);
175 
183 
190  PRUint32 getFileCount();
191 
195  PRUint32 getFlaggedFileCount();
196 
200  void addFilePath(in AString strFilePath);
201 
210  AString getFilePath(in PRUint32 nIndex);
211 
220  AString getFlaggedFilePath(in PRUint32 nIndex);
221 
228  PRBool isScanning();
229 
233  void setIsScanning(in PRBool bIsScanning);
234 
244  AString getLastFileFound();
245 
255  AString getCurrentScanPath();
256 
260  void setCurrentScanPath(in AString strScanPath);
261 
265  void cancel();
266 
270  nsIArray getResultRangeAsURIStrings(in unsigned long aStartIndex,
271  in unsigned long aEndIndex);
272 
276  PRBool isCancelled();
277 
282  attribute boolean wantLibraryContentURIs;
283 
284 };
285 
299 [scriptable, uuid(27431e35-b060-486e-ba58-76c5ae7f8c24)]
301 {
308  void submitQuery(in sbIFileScanQuery pQuery);
309 
314  void finalize();
315 };
void setDirectory(in AString strDirectory)
Set the directory to scan.
AString getCurrentScanPath()
Returns the most recent directory scanned.
attribute boolean searchHidden
sbIFileScanCallback getCallback()
Get the callback object for the scan.
nsIArray getResultRangeAsURIStrings(in unsigned long aStartIndex, in unsigned long aEndIndex)
readonly attribute boolean flaggedExtensionsFound
Returns true if a flagged file extension set in |addFlaggedFileExtension()| was found during the file...
void setRecurse(in PRBool bRecurse)
Set the scan to run recursively under the given directory.
AString getFilePath(in PRUint32 nIndex)
Get the N'th file from the results of the scan.
PRUint32 getFileCount()
Get the number of files found.
void setIsScanning(in PRBool bIsScanning)
USER CODE SHOULD NOT REFERENCE THIS METHOD.
AString getFlaggedFilePath(in PRUint32 nIndex)
Get the N'th flagged file from the results of the scan.
The callback to the sbIFileScanQuery interface.
Definition: sbIFileScan.idl:57
void addFlaggedFileExtension(in AString strExtension)
Add an extension that will not be added to the final discovered paths but will set the |flaggedExtens...
void addFilePath(in AString strFilePath)
USER CODE SHOULD NOT REFERENCE THIS METHOD.
var uuid
attribute boolean wantLibraryContentURIs
void submitQuery(in sbIFileScanQuery pQuery)
Execute a sbIFileScanQuery object.
void addFileExtension(in AString strExtension)
void setCurrentScanPath(in AString strScanPath)
USER CODE SHOULD NOT REFERENCE THIS METHOD.
void setCallback(in sbIFileScanCallback pCallback)
Set the callback object for the scan.
PRBool getRecurse()
Whether or not the scan will run recursively.
void onFileScanStart()
The media scan is starting.
void onFileScanEnd()
The media scan is complete.
The engine in which to execute sbIFileScanQuery objects.
PRBool isCancelled()
USER CODE SHOULD NOT REFERENCE THIS METHOD.
AString getDirectory()
Get the directory to scan.
AString getLastFileFound()
Returns the most recent file found by the scan.
void onFileScanFile(in AString filePath, in PRInt32 fileCount)
The media scan has found (yet another) file.
PRBool isScanning()
Whether or not the scan operation is executing.
void finalize()
An object to scan through the files of a folder (and optionally subfolders)
void cancel()
Cancel the current scanning loop.
PRUint32 getFlaggedFileCount()
Get the number of flagged files found.