<?php

declare(strict_types=1);

namespace Drupal\ffmpeg_media\Cdn;

/**
 * Handles chunked multipart uploads to S3-compatible storage.
 *
 * Not a Drupal service - instantiated by S3CdnIntegration.
 */
interface S3MultipartUploaderInterface {

  /**
   * Uploads a file using S3 multipart upload protocol.
   *
   * @param string $localPath
   *   Local file path.
   * @param string $remotePath
   *   Remote S3 path.
   * @param array<string, string> $metadata
   *   File metadata.
   * @param int $contentLength
   *   File size in bytes.
   *
   * @return array{success: bool, url: string|null, error: string|null}
   *   Upload result.
   */
  public function upload(
    string $localPath,
    string $remotePath,
    array $metadata,
    int $contentLength,
  ): array;

}
