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;
|
2017-05-09 23:35:42 +03:00
|
|
|
include protocol PPendingIPCBlob;
|
2015-09-09 14:15:05 +03:00
|
|
|
|
|
|
|
using struct mozilla::void_t
|
|
|
|
from "ipc/IPCMessageUtils.h";
|
|
|
|
|
|
|
|
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
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
|
|
|
struct FileRequestGetFileResponse
|
|
|
|
{
|
2017-05-09 23:35:42 +03:00
|
|
|
PPendingIPCBlob file;
|
2015-09-09 14:15:05 +03:00
|
|
|
FileRequestMetadata metadata;
|
|
|
|
};
|
|
|
|
|
|
|
|
union FileRequestResponse
|
|
|
|
{
|
|
|
|
nsresult;
|
|
|
|
FileRequestGetMetadataResponse;
|
|
|
|
FileRequestReadResponse;
|
|
|
|
FileRequestWriteResponse;
|
|
|
|
FileRequestTruncateResponse;
|
|
|
|
FileRequestFlushResponse;
|
|
|
|
FileRequestGetFileResponse;
|
|
|
|
};
|
|
|
|
|
|
|
|
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
|