nsEmbedStream.h 912 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #ifndef nsEmbedStream_h__
  6. #define nsEmbedStream_h__
  7. #include "nsCOMPtr.h"
  8. #include "nsIOutputStream.h"
  9. #include "nsIURI.h"
  10. #include "nsIWebBrowser.h"
  11. class nsEmbedStream : public nsISupports
  12. {
  13. public:
  14. nsEmbedStream();
  15. void InitOwner(nsIWebBrowser* aOwner);
  16. nsresult Init(void);
  17. nsresult OpenStream(nsIURI* aBaseURI, const nsACString& aContentType);
  18. nsresult AppendToStream(const uint8_t* aData, uint32_t aLen);
  19. nsresult CloseStream(void);
  20. NS_DECL_ISUPPORTS
  21. protected:
  22. virtual ~nsEmbedStream();
  23. private:
  24. nsIWebBrowser* mOwner;
  25. nsCOMPtr<nsIOutputStream> mOutputStream;
  26. };
  27. #endif // nsEmbedStream_h__