NS_IMETHODIMP nsMailboxService::StreamMessage(const char *aMessageURI, nsISupports *aConsumer, nsIMsgWindow *aMsgWindow, nsIUrlListener *aUrlListener, bool /* aConvertData */, const nsACString &aAdditionalHeader, bool aLocalOnly, nsIURI **aURL) { // The mailbox protocol object will look for "header=filter" or // "header=attach" to decide if it wants to convert the data instead of // using aConvertData. It turns out to be way too hard to pass aConvertData // all the way over to the mailbox protocol object. nsCAutoString aURIString(aMessageURI); if (!aAdditionalHeader.IsEmpty()) { aURIString.FindChar('?') == -1 ? aURIString += "?" : aURIString += "&"; aURIString += "header="; aURIString += aAdditionalHeader; } return FetchMessage(aURIString.get(), aConsumer, aMsgWindow, aUrlListener, nsnull, nsIMailboxUrl::ActionFetchMessage, nsnull, aURL); }
// this method streams a message to the passed in consumer, with an optional stream converter // and additional header (e.g., "header=filter") NS_IMETHODIMP MailEwsMsgMessageService::StreamMessage(const char *aMessageURI, nsISupports *aConsumer, nsIMsgWindow *aMsgWindow, nsIUrlListener *aUrlListener, bool aConvertData, const nsACString &aAdditionalHeader, bool aLocalOnly, nsIURI **aURL) { NS_ENSURE_ARG_POINTER(aMessageURI); mailews_logger << "Stream Message" << std::endl; nsAutoCString aURIString(aMessageURI); if (!aAdditionalHeader.IsEmpty()) { aURIString.FindChar('?') == -1 ? aURIString += "?" : aURIString += "&"; aURIString += "header="; aURIString += aAdditionalHeader; } return FetchMessage(aURIString.get(), aConsumer, aMsgWindow, aUrlListener, nullptr, nsIMailboxUrl::ActionFetchMessage, nullptr, aURL); }