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