CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05
以下内容为反编译后的 h3.java 源代码,内容仅作参考
package ak.smack;
import ak.im.sdk.manager.nf;
import ak.im.sdk.manager.ye;
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 h3 extends IQ {
private String a;
private boolean f4367b;
private Akeychat.ChannelQueryResponse f4368c;
Akeychat.ChannelQueryRequestType f4369d;
private String f4370e;
public static class a extends IQProvider {
@Override
public IQ parse(XmlPullParser xmlPullParser, int i) throws Exception {
h3 h3Var = new h3();
boolean z = false;
while (!z) {
int next = xmlPullParser.next();
if (next == 4) {
h3Var.parseResults(xmlPullParser);
} else if (next == 3 && xmlPullParser.getName().equals("querychannel")) {
z = true;
}
}
return h3Var;
}
}
public h3(String str, Akeychat.ChannelQueryRequestType channelQueryRequestType) {
super("querychannel", "http://akey.im/protocol/xmpp/iq/querychannel");
setType(IQ.Type.get);
setTo(ye.getInstance().getServer().getXmppDomain());
setFrom(nf.getInstance().getUserMe().getJID());
this.a = str;
this.f4369d = channelQueryRequestType;
this.f4367b = true;
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.append(">");
if (this.f4367b) {
Akeychat.ChannelQueryRequest.b newBuilder = Akeychat.ChannelQueryRequest.newBuilder();
String str = this.a;
if (TextUtils.isEmpty(str)) {
Log.i("QueryChannelIQ", "we set null search key");
str = "";
}
newBuilder.setFilter(str);
newBuilder.setQueryType(this.f4369d);
iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, ak.comm.d.encodeBytes(newBuilder.build().toByteArray()));
} else {
String str2 = this.f4370e;
if (str2 != null) {
iQChildElementXmlStringBuilder.optElement("result", str2);
}
}
return iQChildElementXmlStringBuilder;
}
public Akeychat.ChannelQueryResponse getmResponse() {
return this.f4368c;
}
protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
try {
String text = xmlPullParser.getText();
this.f4370e = text;
this.f4368c = Akeychat.ChannelQueryResponse.parseFrom(ak.comm.d.decode(text));
} catch (Exception e2) {
e2.printStackTrace();
Log.w("QueryChannelIQ", "encounter excp in parse results" + e2.getMessage());
}
}
public h3() {
super("querychannel", "http://akey.im/protocol/xmpp/iq/querychannel");
}
}