import net.osdn.gokigen.pkremote.camera.interfaces.playback.IProgressEvent;
import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.IPtpIpCommandCallback;
import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.IPtpIpCommandPublisher;
+import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.messages.PtpIpCommandCanonGetPartialObject;
import net.osdn.gokigen.pkremote.camera.vendor.ptpip.wrapper.command.messages.PtpIpCommandGeneric;
import java.io.ByteArrayOutputStream;
private final IPtpIpCommandPublisher publisher;
private IDownloadContentCallback callback = null;
+ private boolean isReceiveMulti = true;
private int objectId = 0;
private int received_total_bytes = 0;
this.callback = callback;
this.objectId = objectId;
this.target_image_size = imageSize;
+ this.isReceiveMulti = true;
Log.v(TAG, " getPartialObject (id : " + objectId + ", size:" + imageSize + ")");
- publisher.enqueueCommand(new PtpIpCommandGeneric(this, (objectId + 1), false, objectId, 0x9107, 12, objectId, 0x00, imageSize)); // 0x9107 : GetPartialObject
+ publisher.enqueueCommand(new PtpIpCommandCanonGetPartialObject(this, (objectId + 1), false, objectId, objectId, 0x00, imageSize, imageSize)); // 0x9107 : GetPartialObject
}
@Override
@Override
public boolean isReceiveMulti()
{
- return (true);
+ return (isReceiveMulti);
}
private void getPartialObjectFinished()
{
// すべてのデータを受信した後に...終わりを送信する
Log.v(TAG, " getPartialObjectFinished(), id : " + objectId + " (size : " + target_image_size + ")");
+ isReceiveMulti = false;
publisher.enqueueCommand(new PtpIpCommandGeneric(this, (objectId + 2), false, objectId, 0x9117, 4,0x01)); // 0x9117 : TransferComplete
}
catch (Throwable t)