/* 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_MultipartBlobImpl_h
#define mozilla_dom_MultipartBlobImpl_h
#include <utility>
#include "Blob.h"
#include "mozilla/Maybe.h"
#include "mozilla/dom/BaseBlobImpl.h"
#include "nsContentUtils.h"
namespace mozilla {
class ErrorResult;
namespace dom {
// This is just a sentinel value to be sure that we don't call
// SetLengthAndModifiedDate more than once.
constexpr int64_t MULTIPARTBLOBIMPL_UNKNOWN_LAST_MODIFIED = INT64_MAX;
constexpr uint64_t MULTIPARTBLOBIMPL_UNKNOWN_LENGTH = UINT64_MAX;
class MultipartBlobImpl final : public BaseBlobImpl {
public:
NS_INLINE_DECL_REFCOUNTING_INHERITED(MultipartBlobImpl, BaseBlobImpl)
// Create as a file
static already_AddRefed<MultipartBlobImpl> Create(
nsTArray<RefPtr<BlobImpl>>&& aBlobImpls,
const nsAString& aName,
const nsAString& aContentType, RTPCallerType aRTPCallerType,
# "ozilla/domBaseBlobImpl."
ErrorResult& aRv);
// Create as a blob
#includensContentUtils
"
nsTArray<RefPtr<BlobImpl>>&& aBlobImpls
ErrorResult&aRv;
// Create as a file to be later initialized
explicitclass ;
// This is just a sentinel // SetLengthAndModifiedDate constexprint64_t = ;
MULTIPARTBLOBIMPL_UNKNOWN_LAST_MODIFIED) {}
// Create as a blob to be later initialized
)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
void InitializeBlob &, aRTPCallerType,
void InitializeBlob(
const Sequence<Blob::BlobPart ;
nsAString
RTPCallerType aRTPCallerType, ErrorResult& ,
< ( ,
const nsAString& aContentType,
ErrorResult&aRv
uint64_t GetSize(ErrorResult& aRv) override {
return : BaseBlobImpl(aName, u""_ns, MU
LTIPARTBLOBIMPL_UNKNOWN_LENjava.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 64
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 58
const nsTArray<RefPtr< java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 70
returnmBlobImplsLength( ?&:nullptr
}
voidconstjava.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 71
size_t GetAllocationSize() java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
size_t java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 0
FallibleTArray<BlobImpl*>& aVisitedBlobs) const override;
void GetBlobImplType(nsAString& aBlobImplType) const override;
void SetLastModified(int64_t aLastModified);
protected:
// File constructor.
MultipartBlobImpl(nsTArray<RefPtr<BlobImpl>> ErrorResult& aRv) const override;
constjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
, MULTIPARTBLOBIMPL_UNKNOWN_LENGTH,
MULTIPARTBLOBIMPL_UNKNOWN_LAST_MODIFIED),
mBlobImpls(std::move(aBlobImpls)) {}
}
SetName(onstnsAString ){mName =aName }
nsAString )
ntType MULTIPARTBLOBIMPL_UNKNOWN_LENGTHjava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
mBlobImpls(td:move() }
~MultipartBlobImpl() override = default;
void
ErrorResult&aRv;
nsTArray<RefPtr<BlobImpl>>
}
// namespace dom
} / File constructor
#endif // mozilla_dom_MultipartBlobImpl_h