2012-06-20 03:14:39 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* 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/. */
|
|
|
|
|
2012-08-10 02:41:18 +04:00
|
|
|
include protocol PBlob;
|
2012-06-20 03:14:39 +04:00
|
|
|
include protocol PContent;
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
namespace devicestorage {
|
|
|
|
|
|
|
|
|
|
|
|
struct ErrorResponse
|
|
|
|
{
|
|
|
|
nsString error;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct SuccessResponse
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
2014-01-17 05:01:27 +04:00
|
|
|
struct FileDescriptorResponse
|
|
|
|
{
|
|
|
|
FileDescriptor fileDescriptor;
|
|
|
|
};
|
|
|
|
|
2012-06-20 03:14:39 +04:00
|
|
|
struct BlobResponse
|
|
|
|
{
|
2012-08-10 02:41:18 +04:00
|
|
|
PBlob blob;
|
2012-06-20 03:14:39 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct DeviceStorageFileValue
|
|
|
|
{
|
2013-05-11 13:10:18 +04:00
|
|
|
nsString storageName;
|
2012-08-10 02:41:18 +04:00
|
|
|
nsString name;
|
2012-06-20 03:14:39 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct EnumerationResponse
|
|
|
|
{
|
2013-04-18 18:13:23 +04:00
|
|
|
nsString type;
|
2013-05-11 13:10:18 +04:00
|
|
|
nsString rootdir;
|
2012-06-20 03:14:39 +04:00
|
|
|
DeviceStorageFileValue[] paths;
|
|
|
|
};
|
|
|
|
|
2013-01-25 23:05:24 +04:00
|
|
|
struct FreeSpaceStorageResponse
|
2012-07-31 23:28:23 +04:00
|
|
|
{
|
2013-05-03 03:26:31 +04:00
|
|
|
uint64_t freeBytes;
|
2013-01-25 23:05:24 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct UsedSpaceStorageResponse
|
|
|
|
{
|
2013-05-03 03:26:31 +04:00
|
|
|
uint64_t usedBytes;
|
2013-01-25 23:05:24 +04:00
|
|
|
};
|
|
|
|
|
2013-09-06 10:11:58 +04:00
|
|
|
struct FormatStorageResponse
|
|
|
|
{
|
|
|
|
nsString mountState;
|
|
|
|
};
|
|
|
|
|
2014-03-04 15:24:19 +04:00
|
|
|
struct MountStorageResponse
|
|
|
|
{
|
|
|
|
nsString storageStatus;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct UnmountStorageResponse
|
|
|
|
{
|
|
|
|
nsString storageStatus;
|
|
|
|
};
|
|
|
|
|
2012-06-20 03:14:39 +04:00
|
|
|
union DeviceStorageResponseValue
|
|
|
|
{
|
|
|
|
ErrorResponse;
|
|
|
|
SuccessResponse;
|
2014-01-17 05:01:27 +04:00
|
|
|
FileDescriptorResponse;
|
2012-06-20 03:14:39 +04:00
|
|
|
BlobResponse;
|
|
|
|
EnumerationResponse;
|
2013-01-25 23:05:24 +04:00
|
|
|
FreeSpaceStorageResponse;
|
|
|
|
UsedSpaceStorageResponse;
|
2013-09-06 10:11:58 +04:00
|
|
|
FormatStorageResponse;
|
2014-03-04 15:24:19 +04:00
|
|
|
MountStorageResponse;
|
|
|
|
UnmountStorageResponse;
|
2012-06-20 03:14:39 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
sync protocol PDeviceStorageRequest {
|
|
|
|
manager PContent;
|
|
|
|
child:
|
2016-01-27 00:51:53 +03:00
|
|
|
async __delete__(DeviceStorageResponseValue response);
|
2012-06-20 03:14:39 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace devicestorage
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|