CarrotChat v2.8.80.240429版本的 MD5 值为:fdf98761f01e715a89df24b85b0d206e
以下内容为反编译后的 i4.java 源代码,内容仅作参考
package y0;
import ak.im.module.OnlineSession;
import ak.im.sdk.manager.bc;
import ak.im.sdk.manager.bf;
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 kotlin.Metadata;
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;
@Metadata(bv = {}, d1 = {"\u00004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\t\n\u0000\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0006\u0018\u00002\u00020\u0001:\u0002\u0012\u0013B\u000f\u0012\u0006\u0010\u000f\u001a\u00020\u000e¢\u0006\u0004\b\u0010\u0010\u0011J\u0006\u0010\u0003\u001a\u00020\u0002J\u000e\u0010\u0006\u001a\n\u0012\u0004\u0012\u00020\u0005\u0018\u00010\u0004J\u0010\u0010\t\u001a\u00020\u00072\u0006\u0010\b\u001a\u00020\u0007H\u0014J\u0010\u0010\r\u001a\u00020\f2\u0006\u0010\u000b\u001a\u00020\nH\u0004¨\u0006\u0014"}, d2 = {"Ly0/i4;", "Lorg/jivesoftware/smack/packet/IQ;", "", "getmTotalCount", "", "Lak/im/module/OnlineSession;", "getmOnlineSessions", "Lorg/jivesoftware/smack/packet/IQ$IQChildElementXmlStringBuilder;", "xml", "getIQChildElementBuilder", "Lorg/xmlpull/v1/XmlPullParser;", "parser", "Lkd/s;", "parseResults", "", "isSend", "<init>", "(Z)V", "a", "b", "ak-im_carrotArmV7Release"}, k = 1, mv = {1, 6, 0})
public final class i4 extends IQ {
@NotNull
public static final a f48373g = new a(null);
private final boolean f48374a;
@NotNull
private final String f48375b;
@Nullable
private String f48376c;
@Nullable
private Akeychat.DesktopSessionGetResponse f48377d;
private long f48378e;
@Nullable
private List<OnlineSession> f48379f;
@Metadata(bv = {}, d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0002\b\u0006\b\u0086\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0006\u0010\u0007R\u0014\u0010\u0003\u001a\u00020\u00028\u0006X\u0086T¢\u0006\u0006\n\u0004\b\u0003\u0010\u0004R\u0014\u0010\u0005\u001a\u00020\u00028\u0006X\u0086T¢\u0006\u0006\n\u0004\b\u0005\u0010\u0004¨\u0006\b"}, d2 = {"Ly0/i4$a;", "", "", "ELEMENT", "Ljava/lang/String;", "NAMESPACE", "<init>", "()V", "ak-im_carrotArmV7Release"}, k = 1, mv = {1, 6, 0})
public static final class a {
private a() {
}
public a(kotlin.jvm.internal.o oVar) {
this();
}
}
@Metadata(bv = {}, d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0006\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001:\u0001\nB\u0007¢\u0006\u0004\b\b\u0010\tJ\u0018\u0010\u0007\u001a\u00020\u00022\u0006\u0010\u0004\u001a\u00020\u00032\u0006\u0010\u0006\u001a\u00020\u0005H\u0016¨\u0006\u000b"}, d2 = {"Ly0/i4$b;", "Lorg/jivesoftware/smack/provider/IQProvider;", "Lorg/jivesoftware/smack/packet/IQ;", "Lorg/xmlpull/v1/XmlPullParser;", "parser", "", "initDepth", "parse", "<init>", "()V", "a", "ak-im_carrotArmV7Release"}, k = 1, mv = {1, 6, 0})
public static final class b extends IQProvider<IQ> {
@NotNull
public static final a f48380a = new a(null);
@NotNull
private static final String f48381b = "QueryOnlineSessionsIQ";
@Metadata(bv = {}, d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0002\b\u0007\b\u0086\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0007\u0010\bR\u001a\u0010\u0003\u001a\u00020\u00028\u0000X\u0080D¢\u0006\f\n\u0004\b\u0003\u0010\u0004\u001a\u0004\b\u0005\u0010\u0006¨\u0006\t"}, d2 = {"Ly0/i4$b$a;", "", "", RemoteMessageConst.Notification.TAG, "Ljava/lang/String;", "getTag$ak_im_carrotArmV7Release", "()Ljava/lang/String;", "<init>", "()V", "ak-im_carrotArmV7Release"}, k = 1, mv = {1, 6, 0})
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.f48381b;
}
}
@Override
@NotNull
public IQ parse(@NotNull XmlPullParser parser, int initDepth) throws Exception {
kotlin.jvm.internal.r.checkNotNullParameter(parser, "parser");
boolean z10 = false;
i4 i4Var = new i4(false);
while (!z10) {
int next = parser.next();
if (next != 3) {
if (next == 4) {
i4Var.parseResults(parser);
}
} else if (kotlin.jvm.internal.r.areEqual(parser.getName(), "desktopsession")) {
z10 = true;
}
}
return i4Var;
}
}
public i4(boolean z10) {
super("desktopsession", "http://akey.im/protocol/xmpp/iq/onlinedesktopsessions");
this.f48374a = z10;
this.f48375b = "QueryOnlineSessionsIQ";
setType(IQ.Type.get);
setTo(ak.im.sdk.manager.f1.getInstance().getServer().getXmppDomain());
setFrom(bf.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.f48374a && (str = this.f48376c) != null) {
xml.optElement("result", str);
}
return xml;
}
@Nullable
public final List<OnlineSession> getmOnlineSessions() {
return this.f48379f;
}
public final long getF48378e() {
return this.f48378e;
}
protected final void parseResults(@NotNull XmlPullParser parser) throws Exception {
kotlin.jvm.internal.r.checkNotNullParameter(parser, "parser");
try {
String text = parser.getText();
this.f48376c = text;
Akeychat.DesktopSessionGetResponse parseFrom = Akeychat.DesktopSessionGetResponse.parseFrom(e.e.decode(text));
this.f48377d = parseFrom;
if (parseFrom != null) {
kotlin.jvm.internal.r.checkNotNull(parseFrom);
if (parseFrom.getResult().getReturnCode() == 0) {
if (this.f48379f == null) {
this.f48379f = new ArrayList();
}
kotlin.jvm.internal.r.checkNotNull(this.f48377d);
this.f48378e = r4.getDesktopsessionsCount();
Akeychat.DesktopSessionGetResponse desktopSessionGetResponse = this.f48377d;
kotlin.jvm.internal.r.checkNotNull(desktopSessionGetResponse);
for (Akeychat.DesktopDessionInfo desktopDessionInfo : desktopSessionGetResponse.getDesktopsessionsList()) {
if (desktopDessionInfo != null) {
try {
OnlineSession generateOneSession = bc.getInstance().generateOneSession(desktopDessionInfo);
if (generateOneSession != null) {
List<OnlineSession> list = this.f48379f;
kotlin.jvm.internal.r.checkNotNull(list);
list.add(generateOneSession);
}
} catch (Exception e10) {
e10.printStackTrace();
}
}
}
}
}
} catch (Exception e11) {
e11.printStackTrace();
Log.w(this.f48375b, "encounter excp in parse results" + e11.getMessage());
}
}
}