2014-03-05 07:25:40 +04:00
|
|
|
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
|
|
|
|
/* vim: set ts=2 et sw=2 tw=80: */
|
|
|
|
/* 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/. */
|
|
|
|
|
2016-04-09 21:17:02 +03:00
|
|
|
include protocol PBackground;
|
2014-03-05 07:25:40 +04:00
|
|
|
include protocol PBlob;
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
|
|
|
struct FileSystemFileResponse
|
|
|
|
{
|
2017-02-01 09:33:18 +03:00
|
|
|
PBlob blob;
|
2014-03-05 07:25:40 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct FileSystemDirectoryResponse
|
|
|
|
{
|
|
|
|
nsString realPath;
|
|
|
|
};
|
|
|
|
|
2016-04-09 21:15:50 +03:00
|
|
|
struct FileSystemDirectoryListingResponseFile
|
2016-03-20 13:56:10 +03:00
|
|
|
{
|
2017-02-01 09:33:18 +03:00
|
|
|
PBlob blob;
|
2016-03-20 13:56:10 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct FileSystemDirectoryListingResponseDirectory
|
|
|
|
{
|
|
|
|
// This is the full real path for the directory that we are sending via IPC.
|
|
|
|
nsString directoryRealPath;
|
|
|
|
};
|
|
|
|
|
|
|
|
union FileSystemDirectoryListingResponseData
|
|
|
|
{
|
2016-04-09 21:15:50 +03:00
|
|
|
FileSystemDirectoryListingResponseFile;
|
2016-03-20 13:56:10 +03:00
|
|
|
FileSystemDirectoryListingResponseDirectory;
|
|
|
|
};
|
|
|
|
|
2015-06-23 02:31:32 +03:00
|
|
|
struct FileSystemDirectoryListingResponse
|
|
|
|
{
|
2016-03-20 13:56:10 +03:00
|
|
|
FileSystemDirectoryListingResponseData[] data;
|
2015-06-23 02:31:32 +03:00
|
|
|
};
|
|
|
|
|
2016-04-13 14:15:56 +03:00
|
|
|
struct FileSystemFilesResponse
|
|
|
|
{
|
|
|
|
FileSystemFileResponse[] data;
|
|
|
|
};
|
|
|
|
|
2014-03-05 07:25:40 +04:00
|
|
|
struct FileSystemErrorResponse
|
|
|
|
{
|
|
|
|
nsresult error;
|
|
|
|
};
|
|
|
|
|
|
|
|
union FileSystemResponseValue
|
|
|
|
{
|
|
|
|
FileSystemDirectoryResponse;
|
2015-06-23 02:31:32 +03:00
|
|
|
FileSystemDirectoryListingResponse;
|
2014-03-05 07:25:40 +04:00
|
|
|
FileSystemFileResponse;
|
2016-04-13 14:15:56 +03:00
|
|
|
FileSystemFilesResponse;
|
2014-03-05 07:25:40 +04:00
|
|
|
FileSystemErrorResponse;
|
|
|
|
};
|
|
|
|
|
2016-04-09 21:17:02 +03:00
|
|
|
protocol PFileSystemRequest
|
2014-03-05 07:25:40 +04:00
|
|
|
{
|
2016-04-09 21:17:02 +03:00
|
|
|
manager PBackground;
|
2014-03-05 07:25:40 +04:00
|
|
|
|
|
|
|
child:
|
2016-01-27 00:51:53 +03:00
|
|
|
async __delete__(FileSystemResponseValue response);
|
2014-03-05 07:25:40 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|