package com.avg.zaap.crashlibrary;

import android.content.BroadcastReceiver;
import android.content.Context;

import com.avg.zaap.crashlibrary.offline.IConnectivityHelper;
import com.avg.zaap.crashlibrary.offline.service.ICrashReportingServiceBroadcastReceiverCallback;
import com.avg.zaap.crashlibrary.offline.uploader.IOfflineUploader;

/**
 * This interface defines the common behavior for the crash reporting service dependency factories.
 * <p/>
 * Created by marek.osvald on 2.5.2016.
 */
public interface ICrashReportingServiceFactory {

    /**
     * Returns an instance of crash reporter.
     *
     * @param context Android service context
     * @return an instance of crash reporter
     */
    ICrashReporter getCrashReporter(Context context);

    /**
     * Returns an instance of crash service binder.
     *
     * @param context       Android context
     * @param crashReporter crash reporter to initialize the binder with
     * @return an instance of crash service binder
     */
    ICrashServiceCommunicator.Stub getCrashServiceBinder(Context context, ICrashReporter crashReporter);

    BroadcastReceiver getBroadcastReceiver(ICrashReportingServiceBroadcastReceiverCallback callback);

    IConnectivityHelper getConnectivityHelper(Context context);

    IOfflineUploader getOfflineUploader(Context context);

}
