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
00027
00028
00029 #include "nsISupports.idl"
00030
00040 interface nsIFile;
00041 interface nsIURI;
00042 interface sbIFileDownloaderListener;
00043
00044 [scriptable, uuid(743a7901-baec-4da3-ad92-08ba975effd5)]
00045 interface sbIFileDownloader : nsISupports
00046 {
00051 readonly attribute unsigned long long bytesToDownload;
00052
00053
00058 readonly attribute unsigned long long bytesDownloaded;
00059
00060
00065 readonly attribute unsigned long percentComplete;
00066
00067
00072 readonly attribute boolean complete;
00073
00074
00080 readonly attribute boolean succeeded;
00081
00082
00087 attribute sbIFileDownloaderListener listener;
00088
00089
00094 attribute nsIURI sourceURI;
00095
00096
00101 attribute AString sourceURISpec;
00102
00103
00109 attribute nsIFile destinationFile;
00110
00111
00117 attribute AString destinationFileExtension;
00118
00119
00126 void start();
00127
00128
00133 void cancel();
00134 };
00135
00136
00143 [scriptable, uuid(3267334a-a1ef-4bf3-b6e5-8c8ae5f19f44)]
00144 interface sbIFileDownloaderListener : nsISupports
00145 {
00150 void onProgress();
00151
00152
00157 void onComplete();
00158 };
00159
00160
00161
00162
00163
00164
00165 %{C++
00166 #define SB_FILEDOWNLOADER_CONTRACTID \
00167 "@songbirdnest.com/Songbird/FileDownloader;1"
00168 %}C++
00169