OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 namespace experimental.systemInfo.storage { |
| 6 |
| 7 enum StorageUnitType { |
| 8 // Unknow storage type. |
| 9 unknown, |
| 10 // Hard disk. |
| 11 harddisk, |
| 12 // Removable storage, e.g.USB device. |
| 13 removable |
| 14 }; |
| 15 |
| 16 dictionary StorageUnitInfo { |
| 17 // The unique id of the storage unit. |
| 18 DOMString id; |
| 19 // The type of storage device. The value is one of the constants defined |
| 20 // for this type. |
| 21 StorageUnitType type; |
| 22 // The total amount of the storage space, in bytes. |
| 23 double capacity; |
| 24 // The available amount of the storage space, in bytes. |
| 25 double availableCapacity; |
| 26 }; |
| 27 |
| 28 dictionary StorageInfo { |
| 29 // The array of storage units connected to the system. |
| 30 StorageUnitInfo[] units; |
| 31 }; |
| 32 |
| 33 callback StorageInfoCallback = void (StorageInfo info); |
| 34 |
| 35 interface Functions { |
| 36 // Get the storage information from the system. |
| 37 static void get(StorageInfoCallback callback); |
| 38 }; |
| 39 }; |
| 40 |
OLD | NEW |