package net.northking.cctp.upperComputer.automation.handler;

import net.northking.cctp.upperComputer.automation.entity.CmdAutomationRequest;

import javax.websocket.Session;

/**
 * @author : yineng.huang
 * @date : 2024/4/16 20:20
 */
public interface AutomationMessageHandler {
    /**
     * 处理自动化指令
     * @param request
     * @param engineSession
     */
    void automationHandle(CmdAutomationRequest request, Session engineSession);

    /**
     * 销毁自动化驱动
     */
    void destroy();

    /**
     * 以下是自动化操作相关
     */
    void openMobileNotificationBar(CmdAutomationRequest request);  //打开手机通知栏

    void closeMobileNotificationBar(CmdAutomationRequest request); //关闭手机通知栏

    void initApplication(CmdAutomationRequest request); //初始化应用

    void clickPoint(CmdAutomationRequest request);  //点击坐标

    void searchNodeByNodeTree(CmdAutomationRequest request); //通过节点树查询节点数据

    void searchNodeByPoint(CmdAutomationRequest request); //通过点查询节点数据

    void searchNodeByOcr(CmdAutomationRequest request); //通过ocr查询节点数据

    void searchNodeByImage(CmdAutomationRequest request); //通过图像查询节点数据

    void getElementValueByNode(CmdAutomationRequest request); //通过节点树查询节点的值

    void getElementValueByOcr(CmdAutomationRequest request); //通过ocr查询节点的值

    void getVerificationCodeByNode(CmdAutomationRequest request); //通过node节点方式获取验证码

    void getVerificationCodeByOcr(CmdAutomationRequest request); //通过ocr方式获取验证码

    void longPress(CmdAutomationRequest request); //长按

    void swipe(CmdAutomationRequest request); //滑动

    void inputText(CmdAutomationRequest request); //输入文本

    void handleNodeByNodeTree(CmdAutomationRequest request); //通过节点树操作节点

    void handleNodeByPoint(CmdAutomationRequest request); //通过点操作节点

    void handleNodeByOcr(CmdAutomationRequest request); //通过ocr操作节点

    void handleNodeByImage(CmdAutomationRequest request); //通过图像操作节点

    void clickTextByOcr(CmdAutomationRequest request); //点击文本

    void clickTextByOcrNew(CmdAutomationRequest request); //点击文本（新）

    void ifText(CmdAutomationRequest request); //是否存在文本

    void handleApp(CmdAutomationRequest request); //应用处理

    void pressHomeKey(CmdAutomationRequest request); //点击home键

    void inputPasswordByOcr(CmdAutomationRequest request); //密码输入（ocr）

    void getElementMoneyText(CmdAutomationRequest request); //识别金额

    void screenShot(CmdAutomationRequest request); //识别金额

    void getElementValueByPathOcr(CmdAutomationRequest request); ////获取控件的值（OCR方式）

    void pressAndSwipe(CmdAutomationRequest request);  //滑动解锁

}
