package com.avg.zaap.crashlibrary.core.helper.process;

import android.content.Context;
import android.support.annotation.Nullable;

/**
 * This interface denotes the common behavior for the process helper.
 * <p/>
 * Created by marek.osvald on 13.7.2016.
 */
public interface IProcessHelper {

    /**
     * Crash reporting service name.
     */
    @SuppressWarnings("SpellCheckingInspection")
    String SERVICE_NAME = "com.avg.zaap.crashlibrary.crashservice";

    /**
     * Returns whether the current process is the Crash Reporting Service process or not.
     *
     * @param context Android Application context
     * @return true, provided that current process is the Crash Reporting Service process, false
     * otherwise
     */
    @SuppressWarnings("BooleanMethodIsAlwaysInverted")
    boolean isReportingServiceProcess(Context context);

    /**
     * Returns current process name.
     *
     * @param context Android context
     * @return current process name, or null provided that process name is not founds
     */
    @Nullable
    String getCurrentProcessName(Context context);

}
