28 #ifndef sbTranscodeProgressListener_H_
29 #define sbTranscodeProgressListener_H_
33 #include <sbIJobProgress.h>
34 #include <sbIMediacoreEventListener.h>
50 NS_DECL_SBIJOBPROGRESSLISTENER
51 NS_DECL_SBIMEDIACOREEVENTLISTENER
64 nsAString
const & aPropertyName = nsString()) :
65 mSourceItem(aSourceItem),
66 mPropertyName(aPropertyName)
74 if (!mPropertyName.IsEmpty() && mSourceItem) {
75 nsresult rv = mSourceItem->SetProperty(mPropertyName, aValue);
76 NS_ENSURE_SUCCESS(rv, rv);
81 nsCOMPtr<sbIMediaItem> mSourceItem;
82 nsString mPropertyName;
88 PRMonitor * aCompleteNotifyMonitor = nsnull,
89 StatusProperty
const & aStatusProperty = StatusProperty(),
99 PRMonitor * aCompleteNotifyMonitor,
100 StatusProperty
const & aStatusProperty,
128 nsCOMPtr<sbIMediaItem> mItem;
129 PRMonitor *mCompleteNotifyMonitor;
132 StatusProperty mStatusProperty;
133 nsCOMPtr<sbIJobCancelable> mCancel;
Generic interface for exposing long running jobs to the UI.
static sbTranscodeProgressListener * New(sbBaseDevice *aDeviceBase, sbDeviceStatusHelper *aDeviceStatusHelper, sbIMediaItem *aItem, PRMonitor *aCompleteNotifyMonitor=nsnull, StatusProperty const &aStatusProperty=StatusProperty(), sbIJobCancelable *aCancel=nsnull)
Implemented to receive notifications from sbIJobProgress interfaces.
StatusProperty(sbIMediaItem *aSourceItem=nsnull, nsAString const &aPropertyName=nsString())
nsresult SetValue(nsAString const &aValue)
PRBool IsComplete() const