CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05
以下内容为反编译后的 u2.java 源代码,内容仅作参考
package ak.smack;
import ak.im.sdk.manager.ye;
import ak.im.utils.Log;
import com.asim.protobuf.Akeychat;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import java.util.ArrayList;
import java.util.Iterator;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.provider.IQProvider;
import org.xmlpull.v1.XmlPullParser;
public class u2 extends IQ {
private Akeychat.ChatSessionMessageGetBulkResponse a;
private String f4705b;
private long f4706c;
private long f4707d;
private String f4708e;
private boolean f;
private ArrayList<Object[]> g;
public static class a extends IQProvider {
@Override
public IQ parse(XmlPullParser xmlPullParser, int i) throws Exception {
u2 u2Var = new u2();
boolean z = false;
while (!z) {
int next = xmlPullParser.next();
if (next == 4) {
u2Var.parseResults(xmlPullParser);
} else if (next == 3 && xmlPullParser.getName().equals("bulk_feedback_session_message")) {
z = true;
}
}
return u2Var;
}
}
public u2(ArrayList<Object[]> arrayList) {
super("bulk_feedback_session_message", "http://akey.im/protocol/xmpp/iq/bulk_feedback_session_message");
this.g = new ArrayList<>();
this.f = true;
this.g = arrayList;
setType(IQ.Type.get);
setTo(ye.getInstance().getServer().getXmppDomain());
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.append(">");
if (this.f) {
Akeychat.ChatSessionMessageGetBulkRequest.b newBuilder = Akeychat.ChatSessionMessageGetBulkRequest.newBuilder();
Iterator<Object[]> it = this.g.iterator();
while (it.hasNext()) {
Object[] next = it.next();
this.f4705b = (String) next[0];
this.f4706c = ak.im.utils.a4.cut32Protobuf(((Long) next[1]).longValue());
this.f4707d = ((Long) next[2]).longValue();
Akeychat.GetSessionMessage.b newBuilder2 = Akeychat.GetSessionMessage.newBuilder();
newBuilder2.setSessionId(this.f4705b);
newBuilder2.setMessageSeqNo(this.f4706c);
newBuilder2.setLen(this.f4707d);
newBuilder.addGetMsg(newBuilder2);
}
Log.debug("PullFeedbackSessionMessage", "req " + newBuilder.build());
iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, ak.comm.d.encodeBytes(newBuilder.build().toByteArray()));
} else {
iQChildElementXmlStringBuilder.optElement("result", "pull some messages ");
}
return iQChildElementXmlStringBuilder;
}
public Akeychat.ChatSessionMessageGetBulkResponse getmResponse() {
return this.a;
}
protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
try {
String text = xmlPullParser.getText();
this.f4708e = text;
this.a = Akeychat.ChatSessionMessageGetBulkResponse.parseFrom(ak.comm.d.decode(text));
Log.debug("PullFeedbackSessionMessage", "rep " + this.a);
} catch (Exception e2) {
e2.printStackTrace();
}
}
public u2() {
super("bulk_feedback_session_message", "http://akey.im/protocol/xmpp/iq/bulk_feedback_session_message");
this.g = new ArrayList<>();
}
}