CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05
以下内容为反编译后的 i4.java 源代码,内容仅作参考
package ak.smack;
import ak.im.module.OnlineSession;
import ak.im.sdk.manager.hf;
import ak.im.sdk.manager.nf;
import ak.im.sdk.manager.ye;
import ak.im.utils.Log;
import com.asim.protobuf.Akeychat;
import com.huawei.hms.push.constant.RemoteMessageConst;
import java.util.ArrayList;
import java.util.List;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.provider.IQProvider;
import org.xmlpull.v1.XmlPullParser;
@kotlin.j(d1 = {"\u0000N\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010!\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\t\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\u0018\u0000 \u00192\u00020\u0001:\u0002\u0019\u001aB\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u0010\u0010\u000f\u001a\u00020\u00102\u0006\u0010\u0011\u001a\u00020\u0010H\u0014J\u000e\u0010\u0012\u001a\n\u0012\u0004\u0012\u00020\t\u0018\u00010\u0013J\u0006\u0010\u0014\u001a\u00020\u000eJ\u0010\u0010\u0015\u001a\u00020\u00162\u0006\u0010\u0017\u001a\u00020\u0018H\u0004R\u000e\u0010\u0005\u001a\u00020\u0006X\u0082D¢\u0006\u0002\n\u0000R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u0016\u0010\u0007\u001a\n\u0012\u0004\u0012\u00020\t\u0018\u00010\bX\u0082\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\n\u001a\u0004\u0018\u00010\u000bX\u0082\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\f\u001a\u0004\u0018\u00010\u0006X\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\r\u001a\u00020\u000eX\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006\u001b"}, d2 = {"Lak/smack/QueryOnlineSessionsIQ;", "Lorg/jivesoftware/smack/packet/IQ;", "isSend", "", "(Z)V", "TAG", "", "mOnlineSessions", "", "Lak/im/module/OnlineSession;", "mResponse", "Lcom/asim/protobuf/Akeychat$DesktopSessionGetResponse;", "mResult", "mTotalCount", "", "getIQChildElementBuilder", "Lorg/jivesoftware/smack/packet/IQ$IQChildElementXmlStringBuilder;", "xml", "getmOnlineSessions", "", "getmTotalCount", "parseResults", "", "parser", "Lorg/xmlpull/v1/XmlPullParser;", "Companion", "Provider", "ak-im_carrotArmV7Release"}, k = 1, mv = {1, 6, 0}, xi = 48)
public final class i4 extends IQ {
@NotNull
public static final a a = new a(null);
private final boolean f4402b;
@NotNull
private final String f4403c;
@Nullable
private String f4404d;
@Nullable
private Akeychat.DesktopSessionGetResponse f4405e;
private long f;
@Nullable
private List<OnlineSession> g;
@kotlin.j(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0086T¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0004X\u0086T¢\u0006\u0002\n\u0000¨\u0006\u0006"}, d2 = {"Lak/smack/QueryOnlineSessionsIQ$Companion;", "", "()V", "ELEMENT", "", "NAMESPACE", "ak-im_carrotArmV7Release"}, k = 1, mv = {1, 6, 0}, xi = 48)
public static final class a {
private a() {
}
public a(kotlin.jvm.internal.o oVar) {
this();
}
}
@kotlin.j(d1 = {"\u0000\u001e\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\u0018\u0000 \t2\b\u0012\u0004\u0012\u00020\u00020\u0001:\u0001\tB\u0005¢\u0006\u0002\u0010\u0003J\u0018\u0010\u0004\u001a\u00020\u00022\u0006\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\bH\u0016¨\u0006\n"}, d2 = {"Lak/smack/QueryOnlineSessionsIQ$Provider;", "Lorg/jivesoftware/smack/provider/IQProvider;", "Lorg/jivesoftware/smack/packet/IQ;", "()V", "parse", "parser", "Lorg/xmlpull/v1/XmlPullParser;", "initDepth", "", "Companion", "ak-im_carrotArmV7Release"}, k = 1, mv = {1, 6, 0}, xi = 48)
public static final class b extends IQProvider<IQ> {
@NotNull
public static final a a = new a(null);
@NotNull
private static final String f4406b = "QueryOnlineSessionsIQ";
@kotlin.j(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0003\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u0014\u0010\u0003\u001a\u00020\u0004X\u0080D¢\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\u0006¨\u0006\u0007"}, d2 = {"Lak/smack/QueryOnlineSessionsIQ$Provider$Companion;", "", "()V", RemoteMessageConst.Notification.TAG, "", "getTag$ak_im_carrotArmV7Release", "()Ljava/lang/String;", "ak-im_carrotArmV7Release"}, k = 1, mv = {1, 6, 0}, xi = 48)
public static final class a {
private a() {
}
public a(kotlin.jvm.internal.o oVar) {
this();
}
@NotNull
public final String getTag$ak_im_carrotArmV7Release() {
return b.f4406b;
}
}
@Override
@NotNull
public IQ parse(@NotNull XmlPullParser parser, int i) throws Exception {
kotlin.jvm.internal.r.checkNotNullParameter(parser, "parser");
boolean z = false;
i4 i4Var = new i4(false);
while (!z) {
int next = parser.next();
if (next != 3) {
if (next == 4) {
i4Var.parseResults(parser);
}
} else if (kotlin.jvm.internal.r.areEqual(parser.getName(), "desktopsession")) {
z = true;
}
}
return i4Var;
}
}
public i4(boolean z) {
super("desktopsession", "http://akey.im/protocol/xmpp/iq/onlinedesktopsessions");
this.f4402b = z;
this.f4403c = "QueryOnlineSessionsIQ";
setType(IQ.Type.get);
setTo(ye.getInstance().getServer().getXmppDomain());
setFrom(nf.getInstance().getUserMe().getJID());
}
@Override
@NotNull
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(@NotNull IQ.IQChildElementXmlStringBuilder xml) {
String str;
kotlin.jvm.internal.r.checkNotNullParameter(xml, "xml");
xml.append(">");
if (this.f4402b && (str = this.f4404d) != null) {
xml.optElement("result", str);
}
return xml;
}
@Nullable
public final List<OnlineSession> getmOnlineSessions() {
return this.g;
}
public final long getmTotalCount() {
return this.f;
}
protected final void parseResults(@NotNull XmlPullParser parser) throws Exception {
kotlin.jvm.internal.r.checkNotNullParameter(parser, "parser");
try {
String text = parser.getText();
this.f4404d = text;
Akeychat.DesktopSessionGetResponse parseFrom = Akeychat.DesktopSessionGetResponse.parseFrom(ak.comm.d.decode(text));
this.f4405e = parseFrom;
if (parseFrom != null) {
kotlin.jvm.internal.r.checkNotNull(parseFrom);
if (parseFrom.getResult().getReturnCode() == 0) {
if (this.g == null) {
this.g = new ArrayList();
}
Akeychat.DesktopSessionGetResponse desktopSessionGetResponse = this.f4405e;
kotlin.jvm.internal.r.checkNotNull(desktopSessionGetResponse);
this.f = desktopSessionGetResponse.getDesktopsessionsCount();
Akeychat.DesktopSessionGetResponse desktopSessionGetResponse2 = this.f4405e;
kotlin.jvm.internal.r.checkNotNull(desktopSessionGetResponse2);
for (Akeychat.DesktopDessionInfo desktopDessionInfo : desktopSessionGetResponse2.getDesktopsessionsList()) {
if (desktopDessionInfo != null) {
try {
OnlineSession generateOneSession = hf.getInstance().generateOneSession(desktopDessionInfo);
if (generateOneSession != null) {
List<OnlineSession> list = this.g;
kotlin.jvm.internal.r.checkNotNull(list);
list.add(generateOneSession);
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
}
}
} catch (Exception e3) {
e3.printStackTrace();
Log.w(this.f4403c, kotlin.jvm.internal.r.stringPlus("encounter excp in parse results", e3.getMessage()));
}
}
}