27 #include <sbITranscodeError.h>
28 #include <sbITranscodeManager.h>
30 #include <nsStringGlue.h>
41 const nsAString& aMessageWithoutItem,
42 const nsAString& aDetails,
43 const nsAString& aUri,
47 NS_ENSURE_ARG_POINTER(_retval);
49 nsCOMPtr<sbITranscodeError> error =
51 NS_ENSURE_SUCCESS(rv, rv);
52 rv = error->Init(aMessageWithItem, aMessageWithoutItem, aDetails);
53 NS_ENSURE_SUCCESS(rv, rv);
54 rv = error->SetSourceUri(aUri);
55 NS_ENSURE_SUCCESS(rv, rv);
56 rv = error->SetSourceItem(aMediaItem);
57 NS_ENSURE_SUCCESS(rv, rv);
58 error.forget(_retval);
63 const nsAString& aMessageWithoutItem,
64 const nsAString& aDetails,
69 NS_ENSURE_ARG_POINTER(aUri);
71 nsresult rv = aUri->GetSpec(uri);
72 NS_ENSURE_SUCCESS(rv, rv);
74 NS_ConvertUTF8toUTF16(uri), aMediaItem, _retval);
78 const char* aMessageWithoutItem,
85 NS_ConvertASCIItoUTF16(aMessageWithoutItem),
86 NS_ConvertASCIItoUTF16(aDetails),
93 const char* aMessageWithoutItem,
100 NS_ConvertASCIItoUTF16(aMessageWithoutItem),
101 NS_ConvertASCIItoUTF16(aDetails),
102 NS_ConvertASCIItoUTF16(aUri),
#define SONGBIRD_TRANSCODEERROR_CONTRACTID
nsresult SB_NewTranscodeError(const nsAString &aMessageWithItem, const nsAString &aMessageWithoutItem, const nsAString &aDetails, const nsAString &aUri, sbIMediaItem *aMediaItem, sbITranscodeError **_retval)