package com.miya.print;

import android.content.Context;
import android.graphics.Bitmap;

/**
 * 打印基类
 */
public class BasePrinter implements IPrinter {

    /**
     * 初始化调用者的引用
     */
    Context context;

    /**
     * 当前状态码，具体值参考全局状态码
     */
    int status;

    /**
     * 打印机器名称
     */
    String name;

    @Override
    public boolean init(Context context) {
        this.context = context;
        return false;
    }

    @Override
    public boolean release() {
        return false;
    }

    @Override
    public int printText(int align, int size, String content, boolean isFeed) {
        return PrinterStatusEnum.CODE_SUCCESS.status;
    }

    @Override
    public int printBarcode(int align, String content, boolean isFeed) {
        return 0;
    }

    @Override
    public int printQrcode(int align, String content, boolean isFeed) {
        return 0;
    }

    @Override
    public int printImage(int align, Bitmap bm, boolean isFeed) {
        return 0;
    }

    @Override
    public int cutPaper() {
        return 0;
    }

    @Override
    public int setAlign(int align) {
        return 0;
    }

    @Override
    public int feedPaper() {
        return 0;
    }

    @Override
    public int getPrinterStatus() {
        return 0;
    }

    @Override
    public int excuteCmd(String cmd) {
        return 0;
    }

    @Override
    public int beginPrint() {
        return 0;
    }

    @Override
    public int endPrint() {
        return 0;
    }

    @Override
    public void setPrinterName(String name) {
        this.name = name;
    }

    @Override
    public String getPrinterName() {
        return this.name;
    }

}
