30 #include <sbICDDevice.h>
32 #include <sbIDeviceProperties.h>
33 #include <sbITranscodeManager.h>
34 #include <sbIMetadataLookupManager.h>
35 #include <sbIMetadataLookupProvider.h>
36 #include <sbIMetadataLookupData.h>
40 #include <nsIRunnable.h>
41 #include <nsIThread.h>
125 #define PREF_CDDEVICE_RIPBRANCH "songbird.cdrip."
126 #define PREF_CDDEVICE_AUTOEJECT "oncomplete.autoeject"
127 #define PREF_CDDEVICE_NOTIFYSOUND "oncomplete.notifysound"
128 #define PREF_CDDEVICE_RIPFORMAT "format"
129 #define PREF_CDDEVICE_RIPQUALITY "quality"
146 NS_DECL_SBIJOBPROGRESSLISTENER
153 nsIPropertyBag *aProperties);
168 static nsresult
New(
const nsID & aControllerId,
169 nsIPropertyBag *aProperties,
170 sbCDDevice **aOutCDDevice);
177 PRMonitor* mPropertiesLock;
184 PRRWLock* mConnectLock;
189 nsCOMPtr<sbITranscodeManager> mTranscodeManager;
202 nsCOMPtr<sbICDDevice> mCDDevice;
207 nsCOMPtr<sbIDeviceLibrary> mDeviceLibrary;
212 nsCOMPtr<sbIDeviceCapabilities> mCapabilities;
217 nsCOMPtr<nsIPropertyBag> mCreationProperties;
222 nsCOMPtr<sbIDeviceProperties> mProperties;
227 nsCOMPtr<sbIDeviceContent> mDeviceContent;
232 nsString mDeviceLibraryPath;
237 nsCOMPtr<sbITranscodeProfile> mTranscodeProfile;
238 nsString mTranscodeBitrateStr;
243 PRBool mPrefAutoEject;
244 PRBool mPrefNotifySound;
247 void InitRequestHandler();
252 virtual nsresult DeviceSpecificDisconnect();
257 nsresult InitializeProperties();
262 nsresult CapabilitiesReset();
267 nsresult CreateDeviceID(nsID* aDeviceID);
290 virtual nsresult ProcessBatch(
Batch & aBatch);
314 nsresult GetMediaFiles(nsIArray ** aURIList);
319 nsresult GetMediaProperties(nsIArray ** aPropertyList);
325 nsresult AttemptCDLookup();
343 void ProxyCDLookup();
354 nsresult ShowMetadataLookupDialog(
const char *aLookupDialogURI,
356 PRBool aShouldReportEvents);
363 nsresult HandleRipEnd();
368 void ProxyHandleRipEnd();
374 nsresult QueryUserViewErrors();
379 void ProxyQueryUserViewErrors();
388 nsAString& aCDDiscHash);
392 nsresult GetSupportedTranscodeProfiles(PRUint32 aType,
393 nsIArray **aSupportedProfiles);
403 nsACString & aOutFilename);
409 nsresult ReqHandleRead(
TransferRequest * aRequest, PRUint32 aBatchCount);
414 nsresult GetBitrateFromProfile(PRUint32 * bitrate);
417 #define SB_CD_DEVICE_AUTO_INVOKE(aName, aMethod) \
418 SB_AUTO_NULL_CLASS(aName, sbCDDevice*, mValue->aMethod)
Generic interface for exposing long running jobs to the UI.
[UNIMPLEMENTED UNTIL AFTER 0.3]
virtual nsresult InitDevice()
Implemented to receive notifications from sbIJobProgress interfaces.
static nsresult New(const nsID &aControllerId, nsIPropertyBag *aProperties, sbCDDevice **aOutCDDevice)
NS_DECL_ISUPPORTS NS_DECL_SBIDEVICE NS_DECL_SBIJOBPROGRESSLISTENER NS_DECL_NSICLASSINFO sbCDDevice(const nsID &aControllerId, nsIPropertyBag *aProperties)
virtual PRBool IsRequestAborted()