package com.espressif.iot.esptouch;

import java.net.InetAddress;
import java.util.concurrent.atomic.AtomicBoolean;

public class EsptouchResult {
	private final boolean mSuccess;
	private final String mBssid;
	private final InetAddress mInetAddress;
	private AtomicBoolean mCancelled;

	/**
	 * Constructor of EsptouchResult
	 *
	 * @param successed   whether the esptouch task is executed suc
	 * @param bssid       the device's bssid
	 * @param inetAddress the device's ip address
	 */
	public EsptouchResult(boolean successed, String bssid, InetAddress inetAddress) {
		mSuccess = successed;
		mBssid = bssid;
		mInetAddress = inetAddress;
		mCancelled = new AtomicBoolean(false);
	}

	public boolean isSuccess() {
		return mSuccess;
	}

	public String getBssid() {
		return mBssid;
	}

	public boolean isCancelled() {
		return mCancelled.get();
	}

	public void setCancelled(boolean cancelled) {
		mCancelled.set(cancelled);
	}

	public InetAddress getInetAddress() {
		return mInetAddress;
	}
}

@@ -991,11 +991,241 @@
 ress;%0A%09%7D
+%0A%0A%09@Override%0A%09public String toString() %7B%0A%09%09return super.toString() +%0A%09%09%09%09%22%7B success = %22 + mSuccess +%0A%09%09%09%09%22, cancelled = %22 + mCancelled.get() +%0A%09%09%09%09%22, bssid = %22 + mBssid +%0A%09%09%09%09%22, ip = %22 + mInetAddress.getHostAddress() +%0A%09%09%09%09%22%7D%22;%0A%09%7D
 %0A%7D%0A

implement EsptouchResult.toString()