package dev.photosync.core.provider;

/**
 * Byte-level progress callback for an in-flight upload.
 *
 * <p>Called from the upload worker thread, possibly very often. Implementations
 * must not block and must not touch the render thread directly.
 *
 * <p>Throwing {@link TransferCancelledException} from here aborts the transfer.
 */
@FunctionalInterface
public interface TransferProgress {

    void onProgress(long bytesTransferred, long totalBytes);

    static TransferProgress ignored() {
        return (transferred, total) -> {
        };
    }
}
