<?php

declare(strict_types=1);

namespace PhpWA\Media;

use PhpWA\Runtime\Deadline;

interface ResumableMediaHttpClientInterface extends MediaHttpClientInterface
{
    /**
     * Appends a validated HTTP byte range to a private partial file.
     * The partial file is intentionally retained when the deadline expires.
     */
    public function downloadRange(
        string $url,
        string $partialPath,
        int $offset,
        int $expectedBytes,
        Deadline $deadline
    ): MediaDownloadProgress;
}
