2015-09-09 14:15:05 +03: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/. */
|
|
|
|
|
|
|
|
include protocol PBackgroundFileHandle;
|
|
|
|
|
2022-02-09 20:29:46 +03:00
|
|
|
include "mozilla/dom/indexedDB/ActorsChild.h";
|
|
|
|
|
2020-11-23 19:05:20 +03:00
|
|
|
using struct mozilla::void_t from "mozilla/ipc/IPCCore.h";
|
2015-09-09 14:15:05 +03:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
|
|
|
struct FileRequestMetadata
|
|
|
|
{
|
2019-03-15 20:10:13 +03:00
|
|
|
uint64_t? size;
|
|
|
|
int64_t? lastModified;
|
2015-09-09 14:15:05 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct FileRequestGetMetadataResponse
|
|
|
|
{
|
|
|
|
FileRequestMetadata metadata;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct FileRequestReadResponse
|
|
|
|
{
|
|
|
|
nsCString data;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct FileRequestWriteResponse
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
|
|
|
struct FileRequestTruncateResponse
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
|
|
|
struct FileRequestFlushResponse
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
|
|
|
union FileRequestResponse
|
|
|
|
{
|
|
|
|
nsresult;
|
|
|
|
FileRequestGetMetadataResponse;
|
|
|
|
FileRequestReadResponse;
|
|
|
|
FileRequestWriteResponse;
|
|
|
|
FileRequestTruncateResponse;
|
|
|
|
FileRequestFlushResponse;
|
|
|
|
};
|
|
|
|
|
2022-02-09 20:29:47 +03:00
|
|
|
[ManualDealloc, ChildImpl="indexedDB::BackgroundFileRequestChild", ParentImpl=virtual]
|
2015-09-09 14:15:05 +03:00
|
|
|
protocol PBackgroundFileRequest
|
|
|
|
{
|
|
|
|
manager PBackgroundFileHandle;
|
|
|
|
|
|
|
|
child:
|
2016-01-27 00:51:53 +03:00
|
|
|
async __delete__(FileRequestResponse response);
|
2015-09-09 14:15:05 +03:00
|
|
|
|
2016-01-27 00:51:53 +03:00
|
|
|
async Progress(uint64_t progress,
|
|
|
|
uint64_t progressMax);
|
2015-09-09 14:15:05 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|