index 33ea3ff849efea1c14f2c8b4f00c2d2b5fb5741a..a5e6487a63db793306f27e9a4fc29a517eac61e0 100644 (file)
package android.hardware.health.filesystem@1.0;
+import IGarbageCollectCallback;
+
/**
* IFileSystem is an interface that provides operations on underlying storage
* devices, including flash memory.
*/
interface IFileSystem {
/**
- * Start garbage collection on the driver of storage devices. This function
- * must be called at regular intervals when it is a good time for a
- * longer-running cleanup tasks.
+ * Start garbage collection on the driver of storage devices.
+ *
+ * Garbage collection must be started at regular intervals when it is a good
+ * time for a longer-running cleanup tasks, roughly daily.
+ *
+ * When garbage collection finishes or encounters an error before the
+ * specified timeout, the implementation must call IGarbageCollect.finish
+ * immediately with appropriate result.
+ *
+ * If garbage collection does not finish within the specified timeout,
+ * the implementation must stop garbage collection, and must not call
+ * IGarbageCollect.finish.
+ *
+ * @param timeoutSeconds timeout in seconds. The implementation must
+ * return after the timeout is reached.
+ *
+ * @param callback callback interface. Callback must be null if the client
+ * does not need to receive any callbacks.
*
- * @return result Execution result. See documentation for Result for
- * details.
*/
- garbageCollect() generates (Result result);
+ oneway garbageCollect(uint64_t timeoutSeconds,
+ IGarbageCollectCallback callback);
};