// Path: app/src/main/java/am/project/x/ProjectXApplication.java
// public class ProjectXApplication extends BroadcastApplication {
// 
//     private static ProjectXApplication mInstance;
// 
//     @Override
//     public void onCreate() {
//         mInstance = this;
//         super.onCreate();
//         NotificationChannelHelper.updateNotificationChannel(this);
//     }
// 
//     /**
//      * 获取Application
//      *
//      * @return Application
//      */
//     public static ProjectXApplication getInstance() {
//         return mInstance;
//     }
// }


import android.bluetooth.BluetoothDevice;
import android.text.TextUtils;
import com.am.mvp.core.MVPModel;
import com.am.printer.PrintExecutor;
import com.am.printer.PrintSocketHolder;
import com.am.printer.PrinterWriter;
import com.am.printer.PrinterWriter58mm;
import com.am.printer.PrinterWriter80mm;
import am.project.x.ProjectXApplication;
import am.project.x.R;
/*
 * Copyright (C) 2018 AlexMofer
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package am.project.x.business.others.printer;




/**
 * Model
 */
class PrinterModel extends MVPModel<PrinterPresenter> implements PrinterViewModel,
        PrintSocketHolder.OnStateChangedListener, PrintExecutor.OnPrintResultListener {

    private int mType = PrinterWriter80mm.TYPE_80;
    private boolean mImageEnable = true;
    private int mWidth = 300;
    private int mHeight = PrinterWriter.HEIGHT_PARTING_DEFAULT;
    private String mQRCodeData;
    private PrintExecutor mExecutor;
    private PrinterPrintDataMaker mMaker;

    PrinterModel() {
// Path: app/src/main/java/am/project/x/ProjectXApplication.java
// public class ProjectXApplication extends BroadcastApplication {
// 
//     private static ProjectXApplication mInstance;
// 
//     @Override
//     public void onCreate() {
//         mInstance = this;
//         super.onCreate();
//         NotificationChannelHelper.updateNotificationChannel(this);
//     }
// 
//     /**
//      * 获取Application
//      *
//      * @return Application
//      */
//     public static ProjectXApplication getInstance() {
//         return mInstance;
//     }
// }


// Path: app/src/main/java/am/project/x/business/others/printer/PrinterModel.java
import android.bluetooth.BluetoothDevice;
import android.text.TextUtils;
import com.am.mvp.core.MVPModel;
import com.am.printer.PrintExecutor;
import com.am.printer.PrintSocketHolder;
import com.am.printer.PrinterWriter;
import com.am.printer.PrinterWriter58mm;
import com.am.printer.PrinterWriter80mm;
import am.project.x.ProjectXApplication;
import am.project.x.R;

/*
 * Copyright (C) 2018 AlexMofer
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package am.project.x.business.others.printer;




/**
 * Model
 */
class PrinterModel extends MVPModel<PrinterPresenter> implements PrinterViewModel,
        PrintSocketHolder.OnStateChangedListener, PrintExecutor.OnPrintResultListener {

    private int mType = PrinterWriter80mm.TYPE_80;
    private boolean mImageEnable = true;
    private int mWidth = 300;
    private int mHeight = PrinterWriter.HEIGHT_PARTING_DEFAULT;
    private String mQRCodeData;
    private PrintExecutor mExecutor;
    private PrinterPrintDataMaker mMaker;

    PrinterModel() {
        mMaker = new PrinterPrintDataMaker(ProjectXApplication.getInstance(), mQRCodeData,