//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
package [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
public abstract class SeeDeviceChannel extends Handler {
private static final String TAG = "SeeDeviceChannel";
public static final int TYPE_BLE_DEVICE = 1;
/** @deprecated */
@Deprecated
public static final int TYPE_WIFI_DEVICE = 2;
public static final int TYPE_T2_DEVICE = 2;
public static final int TYPE_T2PLUS_DEVICE = 3;
public static final int TYPE_T_DEVICE = 6;
protected final Set<SeeDeviceChannelCallback> mCallback = new
CopyOnWriteArraySet();
protected Context mContext;
private static SeeDeviceBluetoothChannelImpl sDeviceBluetoothChannel;
private static SeeDeviceTChannelImpl sDeviceTChannel;
protected int mPort = 8887;
protected int mDeviceType;
public SeeDeviceChannel(Context context, int type, SeeDeviceChannelCallback
callback) {
super([Link]());
[Link](callback);
[Link] = context;
[Link] = type;
[Link]();
}
public static SeeDeviceChannel create(Context context, SeeDeviceChannelCallback
callback) {
return create(context, isBindType(context), callback);
}
public static SeeDeviceChannel create(Context context, int deviceType,
SeeDeviceChannelCallback callback) {
Log.i("SeeDeviceChannel", "create deviceType:" + deviceType + "
isBindType:" + isBindType(context));
if (1 == deviceType) {
if (sDeviceBluetoothChannel == null) {
sDeviceBluetoothChannel = new
SeeDeviceBluetoothChannelImpl(context, deviceType, callback);
}
return sDeviceBluetoothChannel;
} else {
if (sDeviceTChannel == null) {
sDeviceTChannel = new SeeDeviceTChannelImpl(context, deviceType,
callback);
}
if (deviceType != [Link]()) {
Log.i("SeeDeviceChannel", "create new type:" + deviceType + " old
type:" + [Link]());
destroy([Link]());
sDeviceTChannel = new SeeDeviceTChannelImpl(context, deviceType,
callback);
}
return sDeviceTChannel;
}
}
public static void destroy(int type) {
if (1 == type) {
if (sDeviceBluetoothChannel != null) {
[Link]();
sDeviceBluetoothChannel = null;
}
} else if (sDeviceTChannel != null) {
[Link]();
sDeviceTChannel = null;
}
public static int isBindType(Context context) {
return [Link](context);
}
protected abstract void init();
protected abstract void destroyObj();
public abstract int getType();
public abstract boolean isConnect();
public abstract void connect(String var1);
public abstract void disconnect();
public void reconnect(int delayed) {
}
public abstract void unbind();
public abstract boolean sendCmdData(Object var1);
public abstract String getAddress();
public static String getLockedAddress(Context context) {
return [Link](context);
}
public static String getLockedIp(Context context) {
return [Link](context);
}
public String getLockedIp() {
return [Link]([Link]);
}
public String getLockedAddress() {
return [Link]([Link]);
}
public boolean sendCmdData(int cmdId, String data) {
return true;
}
public void removeChannelCallback(SeeDeviceChannelCallback callback) {
if (callback != null) {
[Link](callback);
}
public void addChannelCallback(SeeDeviceChannelCallback listener) {
if (listener != null) {
[Link](listener);
}
public void clearChannelCallback() {
[Link]();
}
}