blob: cae43e56db5a1300be553a4f07127ae67230e886 [file] [log] [blame]
// Copyright 2016 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module media;
import "lib/media/fidl/media_result.fidl";
// Reader with seek semantics.
interface SeekingReader {
const uint64 kUnknownSize = 0xffffffffffffffff;
// Gets the content size and whether the reader can seek. The |result|
// callback parameter is |OK| unless there was a problem accessing the
// content to be read. Other possible values:
// |NOT_FOUND| - The content could not be found.
// |UNKNOWN_ERROR| - Some other error occurred.
// A |size| value of |kUnknownSize| if the size of the content isn't known.
Describe@0() => (MediaResult result, uint64 size, bool can_seek);
// Reads into a socket starting at a specified position. If the reader
// can't seek, position must be 0. The |result| callback parameter is |OK|
// unless there was a problem performing the read. Other possible values:
// |NOT_FOUND| - The content could not be found.
// |INVALID_ARGUMENT| - The reader can't seek and |position| was non-zero.
// |UNKNOWN_ERROR| - Some other error occurred.
ReadAt@1(uint64 position) => (MediaResult result, handle<socket>? socket);
};