package com.avg.zaap.crashlibrary.offline.publisher;

import com.avg.zaap.crashlibrary.offline.publisher.metadata.ICrashMetadataWriter;

import java.io.File;

/**
 * This interface denotes the common behavior for the offline publisher dependency factories.
 * <p/>
 * Created by marek.osvald on 27.7.2016.
 */
public interface IOfflinePublisherFactory {

    /**
     * Returns a file instance for given filepath.
     *
     * @param filePath filepath to return the file instance for
     * @return a file instance for given filepath
     */
    File openFile(String filePath);

    /**
     * Returns a file instance for given directory and file name.
     *
     * @param directory parent directory
     * @param fileName  file name
     * @return file instance for given directory and file name
     */
    File openFile(File directory, String fileName);

    /**
     * Returns an instance of crash metadata writer.
     *
     * @return an instance of crash metadata writer
     */
    ICrashMetadataWriter getCrashMetadataWriter();

}
