2012-06-19 16:14:39 -07: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-09 15:41:18 -07:00
|
|
|
include protocol PBlob;
|
2012-06-19 16:14:39 -07:00
|
|
|
include protocol PContent;
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
namespace devicestorage {
|
|
|
|
|
|
|
|
|
|
|
|
struct ErrorResponse
|
|
|
|
{
|
|
|
|
nsString error;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct SuccessResponse
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
2014-01-16 17:01:27 -08:00
|
|
|
struct FileDescriptorResponse
|
|
|
|
{
|
|
|
|
FileDescriptor fileDescriptor;
|
|
|
|
};
|
|
|
|
|
2012-06-19 16:14:39 -07:00
|
|
|
struct BlobResponse
|
|
|
|
{
|
2012-08-09 15:41:18 -07:00
|
|
|
PBlob blob;
|
2012-06-19 16:14:39 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct DeviceStorageFileValue
|
|
|
|
{
|
2013-05-11 02:10:18 -07:00
|
|
|
nsString storageName;
|
2012-08-09 15:41:18 -07:00
|
|
|
nsString name;
|
2012-06-19 16:14:39 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct EnumerationResponse
|
|
|
|
{
|
2013-04-18 07:13:23 -07:00
|
|
|
nsString type;
|
2013-05-11 02:10:18 -07:00
|
|
|
nsString rootdir;
|
2012-06-19 16:14:39 -07:00
|
|
|
DeviceStorageFileValue[] paths;
|
|
|
|
};
|
|
|
|
|
2013-01-25 11:05:24 -08:00
|
|
|
struct FreeSpaceStorageResponse
|
2012-07-31 12:28:23 -07:00
|
|
|
{
|
2013-05-02 16:26:31 -07:00
|
|
|
uint64_t freeBytes;
|
2013-01-25 11:05:24 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct UsedSpaceStorageResponse
|
|
|
|
{
|
2013-05-02 16:26:31 -07:00
|
|
|
uint64_t usedBytes;
|
2013-01-25 11:05:24 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct AvailableStorageResponse
|
|
|
|
{
|
2012-08-14 08:53:20 -07:00
|
|
|
nsString mountState;
|
2012-07-31 12:28:23 -07:00
|
|
|
};
|
|
|
|
|
2014-02-18 18:48:05 -08:00
|
|
|
struct StorageStatusResponse
|
|
|
|
{
|
|
|
|
nsString storageStatus;
|
|
|
|
};
|
|
|
|
|
2013-09-05 23:11:58 -07:00
|
|
|
struct FormatStorageResponse
|
|
|
|
{
|
|
|
|
nsString mountState;
|
|
|
|
};
|
|
|
|
|
2012-06-19 16:14:39 -07:00
|
|
|
union DeviceStorageResponseValue
|
|
|
|
{
|
|
|
|
ErrorResponse;
|
|
|
|
SuccessResponse;
|
2014-01-16 17:01:27 -08:00
|
|
|
FileDescriptorResponse;
|
2012-06-19 16:14:39 -07:00
|
|
|
BlobResponse;
|
|
|
|
EnumerationResponse;
|
2013-01-25 11:05:24 -08:00
|
|
|
FreeSpaceStorageResponse;
|
|
|
|
UsedSpaceStorageResponse;
|
|
|
|
AvailableStorageResponse;
|
2014-02-18 18:48:05 -08:00
|
|
|
StorageStatusResponse;
|
2013-09-05 23:11:58 -07:00
|
|
|
FormatStorageResponse;
|
2012-06-19 16:14:39 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
sync protocol PDeviceStorageRequest {
|
|
|
|
manager PContent;
|
|
|
|
child:
|
|
|
|
__delete__(DeviceStorageResponseValue response);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace devicestorage
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|