package net.northking.cctp.upperComputer.service;

import io.appium.java_client.AppiumDriver;
import net.northking.cctp.upperComputer.entity.DebuggerDeviceInfo;
import org.openqa.selenium.WebElement;

import java.util.Map;

public interface DebuggerService {

    Object getUiTree(String deviceId);

    AppiumDriver<WebElement> getDriver(DebuggerDeviceInfo info);

    boolean initApp(DebuggerDeviceInfo info);

    String getScreenShot(DebuggerDeviceInfo info);

    boolean destroyDriver(String deviceId);

    boolean cleanData(String deviceId,String packageName);

    String getPackageVersion(String deviceId,String packageName);

    String downloadApp(String appId, String appName);

    String getScreenShotToBase64(DebuggerDeviceInfo info);

    String shotAllScreen(DebuggerDeviceInfo info);

    String uploadShotAllScreen(DebuggerDeviceInfo info);

    boolean startRecord(DebuggerDeviceInfo info);

    String endRecord(DebuggerDeviceInfo info);

    boolean isAppInstalled(String deviceId, String appPackage);

    boolean removeApp(String deviceId, String appPackage);

    boolean installApp(String deviceId, String appPath);

    String execShellWaitResult(String shell ,String dir, Map<String,String> envMap,boolean isWaitOrNot);

    boolean activeApp(String deviceId, String appPackage);

    String getCurrentMessage(String deviceId);

    boolean recordDevicePer(DebuggerDeviceInfo info);

    String[] stopRecordDevicePer(DebuggerDeviceInfo info);

    boolean terminateApp(String deviceId, String appPackage);

    boolean releaseAdbForwardPort(String deviceId);
}
