CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05
以下内容为反编译后的 e3.java 源代码,内容仅作参考
package ak.smack;
import ak.im.utils.Log;
import android.text.TextUtils;
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 e3 extends b {
private String a;
private boolean f4283b;
private Akeychat.BotQueryResponse f4284c;
Akeychat.BotQueryRequestType f4285d;
private String f4286e;
public static class a extends IQProvider {
@Override
public IQ parse(XmlPullParser xmlPullParser, int i) throws Exception {
e3 e3Var = new e3();
boolean z = false;
while (!z) {
int next = xmlPullParser.next();
if (next == 4) {
e3Var.parseResults(xmlPullParser);
} else if (next == 3 && xmlPullParser.getName().equals("querybot")) {
z = true;
}
}
return e3Var;
}
}
public e3(String str, Akeychat.BotQueryRequestType botQueryRequestType, q1 q1Var) {
super("querybot", "http://akey.im/protocol/xmpp/iq/querybot", q1Var);
setType(IQ.Type.get);
this.a = str;
this.f4285d = botQueryRequestType;
this.f4283b = true;
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.append(">");
if (this.f4283b) {
Akeychat.BotQueryRequest.b newBuilder = Akeychat.BotQueryRequest.newBuilder();
String str = this.a;
if (TextUtils.isEmpty(str)) {
Log.i("QueryBotIQ", "we set null search key");
str = "";
}
newBuilder.setFilter(str);
newBuilder.setQueryType(this.f4285d);
iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, ak.comm.d.encodeBytes(newBuilder.build().toByteArray()));
} else {
String str2 = this.f4286e;
if (str2 != null) {
iQChildElementXmlStringBuilder.optElement("result", str2);
}
}
return iQChildElementXmlStringBuilder;
}
public Akeychat.BotQueryResponse getmResponse() {
return this.f4284c;
}
protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
try {
String text = xmlPullParser.getText();
this.f4286e = text;
this.f4284c = Akeychat.BotQueryResponse.parseFrom(ak.comm.d.decode(text));
} catch (Exception e2) {
e2.printStackTrace();
Log.w("QueryBotIQ", "encounter excp in parse results" + e2.getMessage());
}
}
public e3() {
super("querybot", "http://akey.im/protocol/xmpp/iq/querybot", null);
}
}