CarrotChat v2.8.80.240429版本的 MD5 值为:fdf98761f01e715a89df24b85b0d206e
以下内容为反编译后的 k1.java 源代码,内容仅作参考
package y0;
import ak.im.utils.Log;
import com.asim.protobuf.Akeychat;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.provider.IQProvider;
import org.xmlpull.v1.XmlPullParser;
public class k1 extends IQ {
private final String f48440a;
private Akeychat.ChatSessionResponse f48441b;
private String f48442c;
private boolean f48443d;
private String f48444e;
public static class a extends IQProvider {
@Override
public IQ parse(XmlPullParser xmlPullParser, int i10) throws Exception {
k1 k1Var = new k1();
boolean z10 = false;
while (!z10) {
int next = xmlPullParser.next();
if (next == 4) {
k1Var.parseResults(xmlPullParser);
} else if (next == 3 && xmlPullParser.getName().equals("getchatsession")) {
z10 = true;
}
}
return k1Var;
}
}
public k1(String str) {
super("getchatsession", "http://akey.im/protocol/xmpp/iq/getchatsession");
this.f48440a = "GetOneChatSession";
setType(IQ.Type.get);
setTo(ak.im.sdk.manager.f1.getInstance().getServer().getXmppDomain());
setFrom(ak.im.sdk.manager.f1.getInstance().getUsername() + "@" + ak.im.sdk.manager.f1.getInstance().getServer().getXmppDomain());
this.f48443d = true;
this.f48442c = str;
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.append(">");
if (this.f48443d) {
Akeychat.ChatSessionRequest.b newBuilder = Akeychat.ChatSessionRequest.newBuilder();
newBuilder.setSessionId(this.f48442c);
iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, e.e.encodeBytes(newBuilder.build().toByteArray()));
}
return iQChildElementXmlStringBuilder;
}
public Akeychat.ChatSessionResponse getResponse() {
return this.f48441b;
}
protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
try {
String text = xmlPullParser.getText();
this.f48444e = text;
this.f48441b = Akeychat.ChatSessionResponse.parseFrom(e.e.decode(text));
Log.i("GetOneChatSession", "we get result:" + this.f48444e + ",response;" + this.f48441b.getChatSession().toString());
} catch (Exception e10) {
this.f48441b = null;
e10.printStackTrace();
}
}
public k1() {
super("getchatsession", "http://akey.im/protocol/xmpp/iq/getchatsession");
this.f48440a = "GetOneChatSession";
}
}