PosPrinterService.MyBinder

net.posprinter.service

## Class PosPrinterService.MyBinder

- java.lang.Object
- - android.os.Binder
  - - net.posprinter.service.PosPrinterService.MyBinder

- All Implemented Interfaces:
    android.os.IBinder, IMyBinder
  Enclosing class:
    PosPrinterService

      public class PosPrinterService.MyBinder
      extends android.os.Binder
      implements IMyBinder

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface android.os.IBinder

      `android.os.IBinder.DeathRecipient`

  - ### Field Summary

    - ### Fields inherited from interface android.os.IBinder

      `DUMP_TRANSACTION, FIRST_CALL_TRANSACTION, FLAG_ONEWAY, INTERFACE_TRANSACTION, LAST_CALL_TRANSACTION, LIKE_TRANSACTION, PING_TRANSACTION, TWEET_TRANSACTION`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PosPrinterService.MyBinder()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `acceptdatafromprinter(UiExecute execute)`
    `void` | `connectBtPort(java.lang.String bluetoothID, UiExecute execute)`
    `void` | `connectNetPort(java.lang.String ethernetIP, int ethernetPort, UiExecute execute)`
    `void` | `connectUsbPort(android.content.Context context, java.lang.String usbPathName, UiExecute execute)`
    `void` | `disconnectCurrentPort(UiExecute execute)`
    `RoundQueue<byte[]>` | `readBuffer()`
    `void` | `write(byte[] data, UiExecute execute)`
    `void` | `writeDataByYouself(UiExecute execute, ProcessData processData)`

    - ### Methods inherited from class android.os.Binder

      `attachInterface, clearCallingIdentity, dump, dump, dumpAsync, finalize, flushPendingCommands, getCallingPid, getCallingUid, getCallingUserHandle, getInterfaceDescriptor, isBinderAlive, joinThreadPool, linkToDeath, onTransact, pingBinder, queryLocalInterface, restoreCallingIdentity, transact, unlinkToDeath`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PosPrinterService.MyBinder

          public PosPrinterService.MyBinder()

  - ### Method Detail

    - #### connectNetPort

          public void connectNetPort(java.lang.String ethernetIP,
                            int ethernetPort,
                            UiExecute execute)

      Specified by:
        `connectNetPort` in interface `IMyBinder`
      Parameters:
        `ethernetIP` - Printer IP address
        `ethernetPort` - printer ethernet port

    - #### connectBtPort

          public void connectBtPort(java.lang.String bluetoothID,
                           UiExecute execute)

      Specified by:
        `connectBtPort` in interface `IMyBinder`
      Parameters:
        `bluetoothID` - printer bluetooth ID

    - #### connectUsbPort

          public void connectUsbPort(android.content.Context context,
                            java.lang.String usbPathName,
                            UiExecute execute)

      Specified by:
        `connectUsbPort` in interface `IMyBinder`
      Parameters:
        `context` - context
        `usbPathName` - printer usbid

    - #### disconnectCurrentPort

          public void disconnectCurrentPort(UiExecute execute)

      Specified by:
        `disconnectCurrentPort` in interface `IMyBinder`

    - #### write

          public void write(byte[] data,
                   UiExecute execute)

      Specified by:
        `write` in interface `IMyBinder`
      Parameters:
        `data` - byte[]

    - #### writeDataByYouself

          public void writeDataByYouself(UiExecute execute,
                                ProcessData processData)

      Specified by:
        `writeDataByYouself` in interface `IMyBinder`
      Parameters:
        `execute` - execute interface£¬the method is performed in the UI thread
        `processData` - interface£¬You can rewrite the processing method of data to be transmitted,

    - #### acceptdatafromprinter

          public void acceptdatafromprinter(UiExecute execute)

      Specified by:
        `acceptdatafromprinter` in interface `IMyBinder`

    - #### readBuffer

          public RoundQueue<byte[]> readBuffer()

      Specified by:
        `readBuffer` in interface `IMyBinder`
      Returns:
        Returns a circular queue object¡£