package com.epson.mobilephone.common.maintain;

import android.content.Context;
import com.epson.mobilephone.common.EpLog;
import com.epson.mobilephone.common.escpr.EscprLib;

public class MaintainPrinter {
    protected EscprLib mEscprLib = EscprLib.getInstance();
    protected MaintainPrinterInfo mPrinterInfor = new MaintainPrinterInfo();
    protected int mSearchPos = 0;

    public void setMSearchPos(int i) {
        this.mSearchPos = i;
    }

    public EscprLib getMEscpLib() {
        return this.mEscprLib;
    }

    public MaintainPrinterInfo getMPrinterInfor() {
        return this.mPrinterInfor;
    }

    public int getMSearchPos() {
        return this.mSearchPos;
    }

    public int doInitDriver(Context context, int i) {
        String path = context.getExternalFilesDir((String) null).getPath();
        EpLog.m78i("MaintainPrinter", "**********doInitDriver************:" + path);
        return this.mEscprLib.init_driver(context, path);
    }

    public int doReleaseDriver() {
        return this.mEscprLib.release_driver();
    }

    public int doFindPrinter(int i, int i2) {
        EpLog.m78i("MaintainPrinter", "**********Call do find printer************");
        return this.mEscprLib.search_printer((String) null);
    }

    public int doGetLang() {
        return this.mEscprLib.get_lang();
    }

    public String doGetIp() {
        return this.mEscprLib.epsWrapperGetIp();
    }

    public int doCancelFindPrinter() {
        return this.mEscprLib.cancel_search_printer();
    }

    public int doSetPrinter() {
        return this.mEscprLib.set_printer(this.mSearchPos);
    }

    public int doGetStatus() {
        return this.mEscprLib.epsWrapperGetStatus(this.mPrinterInfor.getMStatus());
    }

    public int doDoMainteCmd(int i) {
        EpLog.m78i("MaintainPrinter", "**********doDoMainteCmd************");
        return this.mEscprLib.epsWrapperDoMainteCmd(i);
    }

    public int doGetSupplyInfo() {
        return this.mEscprLib.epsWrapperGetSupplyInfo(this.mPrinterInfor.getMSupplyInfo());
    }

    public int doGetSupplyInfoEx() {
        return this.mEscprLib.epsWrapperGetSupplyInfo(this.mPrinterInfor.getMSupplyInfo());
    }

    public int doProbePrinter(int i, int i2, String str) {
        EpLog.m78i("MaintainPrinter", "doProbePrinter");
        return this.mEscprLib.search_printer(str);
    }
}
