2015-05-03 22:32:37 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2014-10-08 20:15:23 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_dom_BlobSet_h
|
|
|
|
#define mozilla_dom_BlobSet_h
|
|
|
|
|
2016-12-01 17:12:42 +03:00
|
|
|
#include "jsapi.h"
|
2016-06-23 12:58:22 +03:00
|
|
|
#include "mozilla/RefPtr.h"
|
2016-12-01 17:12:42 +03:00
|
|
|
#include "nsString.h"
|
|
|
|
#include "nsTArray.h"
|
2014-10-08 20:15:23 +04:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2016-06-23 12:58:22 +03:00
|
|
|
class BlobImpl;
|
|
|
|
|
|
|
|
class BlobSet final {
|
2014-10-08 20:15:23 +04:00
|
|
|
public:
|
2018-06-18 18:35:46 +03:00
|
|
|
MOZ_MUST_USE nsresult AppendVoidPtr(const void* aData, uint32_t aLength);
|
2016-06-23 12:58:22 +03:00
|
|
|
|
2018-06-18 18:35:46 +03:00
|
|
|
MOZ_MUST_USE nsresult AppendString(const nsAString& aString, bool nativeEOL);
|
2016-06-23 12:58:22 +03:00
|
|
|
|
2018-06-18 18:35:46 +03:00
|
|
|
MOZ_MUST_USE nsresult AppendBlobImpl(BlobImpl* aBlobImpl);
|
2016-06-23 12:58:22 +03:00
|
|
|
|
2018-06-18 18:35:46 +03:00
|
|
|
FallibleTArray<RefPtr<BlobImpl>>& GetBlobImpls() { return mBlobImpls; }
|
2014-10-08 20:15:23 +04:00
|
|
|
|
2016-06-23 12:58:22 +03:00
|
|
|
private:
|
2018-06-18 18:35:46 +03:00
|
|
|
FallibleTArray<RefPtr<BlobImpl>> mBlobImpls;
|
2014-10-08 20:15:23 +04:00
|
|
|
};
|
|
|
|
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
2014-10-08 20:15:23 +04:00
|
|
|
|
|
|
|
#endif // mozilla_dom_BlobSet_h
|