1 package net.osdn.gokigen.a01d.camera.nikon.wrapper.liveview
3 import android.util.Log
4 import net.osdn.gokigen.a01d.camera.ptpip.wrapper.command.IPtpIpCommandCallback
5 import net.osdn.gokigen.a01d.camera.utils.SimpleLogDumper
7 class NikonLiveViewStatusReceiver(private val isDumpLog: Boolean = false) : IPtpIpCommandCallback
9 override fun receivedMessage(id: Int, rx_body: ByteArray?)
13 Log.v(TAG, " receivedMessage $id is NULL.")
19 Log.v(TAG, " receivedMessage() [$id] : ${rx_body.size} bytes. ");
20 val logDumpSize = if (rx_body.size > 64) 64 else rx_body.size
21 SimpleLogDumper.dump_bytes(" [rcv]", rx_body.copyOfRange(0, logDumpSize))
25 override fun onReceiveProgress(currentBytes: Int, totalBytes: Int, rx_body: ByteArray?)
29 Log.v(TAG, " onReceiveProgress() : $currentBytes/$totalBytes is NULL")
34 Log.v(TAG, " receivedMessage() [$currentBytes/$totalBytes] : ${rx_body.size} bytes. ");
35 val logDumpSize = if (rx_body.size > 64) 64 else rx_body.size
36 SimpleLogDumper.dump_bytes(" [rcv-m]", rx_body.copyOfRange(0, logDumpSize))
40 override fun isReceiveMulti(): Boolean
42 Log.v(TAG, " isReceiveMulti() : false")
48 private val TAG = "NikonLiveViewImageReceiver"