package ctbrec.recorder.download;

import java.io.File;
import java.io.IOException;
import java.time.Duration;
import java.time.Instant;

import ctbrec.Config;
import ctbrec.Model;
import ctbrec.Recording;

public interface Download {
    public void init(Config config, Model model);
    public void start() throws IOException;
    public void stop();
    public Model getModel();
    public Instant getStartTime();
    public Duration getLength();
    public void postprocess(Recording recording);

    /**
     * Returns the path to the recording in the filesystem as file object
     * @param model
     * @return
     * @see #getPath(Model)
     */
    public File getTarget();

    /**
     * Returns the path to the recording starting from the configured recordings directory
     * @param model
     * @return
     * @see #getTarget()
     */
    public String getPath(Model model);
}
