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
00031 #include "nsISupports.idl"
00032
00033 interface nsIPropertyBag2;
00034 interface nsIVariant;
00035
00036 interface sbIDeviceCapabilities;
00037 interface sbIDeviceContent;
00038 interface sbIDeviceProperties;
00039 interface sbIDeviceParameters;
00040 interface sbIDeviceStatus;
00041
00048 [scriptable, uuid(5e65f09a-b47c-41f7-bb4e-0174a3a956eb)]
00049 interface sbIDevice : nsISupports
00050 {
00054 readonly attribute AString name;
00055
00059 readonly attribute nsIDPtr controllerId;
00060
00064 readonly attribute nsIDPtr id;
00065
00069 void connect();
00070
00076 void disconnect();
00077
00081 readonly attribute boolean connected;
00082
00087 readonly attribute boolean threaded;
00088
00092 nsIVariant getPreference(in AString aPrefName);
00093
00097 void setPreference(in AString aPrefName,
00098 in nsIVariant aPrefValue);
00099
00103 readonly attribute sbIDeviceCapabilities capabilities;
00104
00108 readonly attribute sbIDeviceContent content;
00109
00113 readonly attribute nsIPropertyBag2 parameters;
00114
00118 readonly attribute sbIDeviceProperties properties;
00119
00125 readonly attribute boolean isBusy;
00126
00134 readonly attribute boolean canDisconnect;
00135
00142 readonly attribute sbIDeviceStatus currentStatus;
00143
00150 readonly attribute unsigned long state;
00151
00152 const unsigned long STATE_IDLE = 0;
00153 const unsigned long STATE_SYNCING = 1;
00154
00155 const unsigned long STATE_COPYING = 2;
00156 const unsigned long STATE_DELETING = 3;
00157 const unsigned long STATE_UPDATING = 4;
00158 const unsigned long STATE_MOUNTING = 5;
00159 const unsigned long STATE_DOWNLOADING = 6;
00160 const unsigned long STATE_UPLOADING = 7;
00161 const unsigned long STATE_DOWNLOAD_PAUSED = 8;
00162 const unsigned long STATE_UPLOAD_PAUSED = 9;
00163 const unsigned long STATE_DISCONNECTED = 10;
00164 const unsigned long STATE_BUSY = 11;
00165
00166 const unsigned long STATE_CANCEL = 12;
00167
00168 const unsigned long STATE_USER = 0x20000000;
00169
00170 const unsigned long REQUEST_FLAG_USER = 0x80000000;
00171 const unsigned long REQUEST_FLAG_WRITE = 0x40000000;
00172
00173
00174 const unsigned long REQUEST_MOUNT = 1;
00175 const unsigned long REQUEST_READ = 2;
00176 const unsigned long REQUEST_EJECT = 3;
00177 const unsigned long REQUEST_SUSPEND = 4;
00178
00179
00180 const unsigned long REQUEST_WRITE = REQUEST_FLAG_WRITE + 1;
00181 const unsigned long REQUEST_DELETE = REQUEST_FLAG_WRITE + 2;
00182 const unsigned long REQUEST_SYNC = REQUEST_FLAG_WRITE + 3;
00183
00184 const unsigned long REQUEST_WIPE = REQUEST_FLAG_WRITE + 4;
00185
00186 const unsigned long REQUEST_MOVE = REQUEST_FLAG_WRITE + 5;
00187 const unsigned long REQUEST_UPDATE = REQUEST_FLAG_WRITE + 6;
00188 const unsigned long REQUEST_NEW_PLAYLIST = REQUEST_FLAG_WRITE + 7;
00189
00190
00191 const unsigned long REQUEST_FACTORY_RESET = REQUEST_FLAG_WRITE + 8;
00192
00196 void submitRequest(in unsigned long aRequest, in nsIPropertyBag2 aRequestParameters);
00200 void cancelRequests();
00201
00205 void syncLibraries();
00206
00210 void eject();
00211
00212
00213 void setWarningDialogEnabled(in AString aWarning, in boolean aEnabled);
00214
00215 boolean getWarningDialogEnabled(in AString aWarning);
00216
00217 void resetWarningDialogs();
00218 };