package com.avg.zaap.crashlibrary.provider;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

/**
 * This interface denotes the common behavior for the asynchronous provider callback receivers.
 * <p>
 * Created by marek.osvald on 8.4.2016.
 */
public interface ICrashProviderCallback {

    /**
     * This method should be called upon successful data provision.
     *
     * @param filepath the filepath to the data provision result result
     */
    void onSuccess(@NonNull final String filepath);

    /**
     * This method should be called upon unsuccessful data provision.
     *
     * @param providerName failed asynchronous provider name
     * @param throwable    throwable which caused the failure
     */
    void onFailure(@NonNull String providerName, @Nullable Throwable throwable);

}
