package com.epson.lib.escani2;

import com.epson.lib.escani2.EscanI2NativeInterface;

class EscanI2NativeIf implements EscanI2NativeInterface {
    private long mNativeInscance;
    EscanI2NativeInterface.PageWriteCallback mPageWriteCallback;

    public native int calibrateAdf();

    public native void cancelScanJni();

    public native void cancelWaitingJni();

    public native int cleanAdf();

    public native int freeBlockedCalibrateAdf();

    public native int freeBlockedCleanAdf();

    public native int getCapability(ScannerI2Capability scannerI2Capability);

    public int getEscanI2LibError() {
        return 0;
    }

    public native int[] getMaintAppliedParameters();

    public native int[] getMaintCapability();

    public native int getScanPages(int i);

    public native int getScannerInfo(ScannerI2Info scannerI2Info);

    public native int initializeLibraryJni();

    public native int releaseLibraryJni();

    public native int releaseScannerJni();

    public native int scan(int i, String str, String str2);

    public native int setPowerOffTime(int i);

    public native int setPowerSaveTime(int i);

    public native int setScannerJni(String str);

    public native int startScan(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10, int i11, int i12, int i13, int i14, int i15, int i16, int i17, int i18, int i19, int i20, int i21);

    public native int waitStartRequest();

    EscanI2NativeIf() {
    }

    static {
        System.loadLibrary("escani2");
    }

    private synchronized int pageWriteEndCallback(int i, int i2) {
        if (mPageWriteCallback != null) {
            mPageWriteCallback.pageWriteDone(i, i2);
        }
        return 1;
    }

    public synchronized void setPageWriteCallback(EscanI2NativeInterface.PageWriteCallback pageWriteCallback) {
        mPageWriteCallback = pageWriteCallback;
    }
}
