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
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
|
|
|
struct BlobResponse
|
|
|
|
{
|
2012-08-09 15:41:18 -07:00
|
|
|
PBlob blob;
|
2012-06-19 16:14:39 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct DeviceStorageFileValue
|
|
|
|
{
|
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;
|
|
|
|
nsString relpath;
|
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
|
|
|
{
|
2012-08-22 08:56:38 -07:00
|
|
|
int64_t freeBytes;
|
2013-01-25 11:05:24 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct UsedSpaceStorageResponse
|
|
|
|
{
|
|
|
|
int64_t usedBytes;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct AvailableStorageResponse
|
|
|
|
{
|
2012-08-14 08:53:20 -07:00
|
|
|
nsString mountState;
|
2012-07-31 12:28:23 -07:00
|
|
|
};
|
|
|
|
|
2012-06-19 16:14:39 -07:00
|
|
|
union DeviceStorageResponseValue
|
|
|
|
{
|
|
|
|
ErrorResponse;
|
|
|
|
SuccessResponse;
|
|
|
|
BlobResponse;
|
|
|
|
EnumerationResponse;
|
2013-01-25 11:05:24 -08:00
|
|
|
FreeSpaceStorageResponse;
|
|
|
|
UsedSpaceStorageResponse;
|
|
|
|
AvailableStorageResponse;
|
2012-06-19 16:14:39 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
sync protocol PDeviceStorageRequest {
|
|
|
|
manager PContent;
|
|
|
|
child:
|
|
|
|
__delete__(DeviceStorageResponseValue response);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace devicestorage
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|