CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05
以下内容为反编译后的 l4.java 源代码,内容仅作参考
package ak.smack;
import ak.im.module.Group;
import ak.im.sdk.manager.df;
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 java.util.ArrayList;
import java.util.List;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.provider.IQProvider;
import org.xmlpull.v1.XmlPullParser;
public class l4 extends IQ {
private final String a;
private int f4474b;
private int f4475c;
private boolean f4476d;
private Akeychat.PublicMucGetResponse f4477e;
private String f;
private long g;
private List<Group> h;
private final boolean i;
public static class a extends IQProvider {
@Override
public IQ parse(XmlPullParser xmlPullParser, int i) throws Exception {
l4 l4Var = new l4();
boolean z = false;
while (!z) {
int next = xmlPullParser.next();
if (next == 4) {
l4Var.parseResults(xmlPullParser);
} else if (next == 3 && xmlPullParser.getName().equals("publicmuc")) {
z = true;
}
}
return l4Var;
}
}
public l4(String str, int i, int i2, boolean z) {
super("publicmuc", "http://akey.im/protocol/xmpp/iq/publicmuc");
setType(IQ.Type.get);
setTo(ye.getInstance().getServer().getXmppDomain());
setFrom(nf.getInstance().getUserMe().getJID());
this.a = str;
this.f4474b = i;
this.f4475c = i2;
this.f4476d = true;
this.i = z;
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.append(">");
if (this.f4476d) {
Akeychat.PublicMucGetRequest.b newBuilder = Akeychat.PublicMucGetRequest.newBuilder();
String str = this.a;
if (TextUtils.isEmpty(str)) {
Log.i("QueryPublicGroupExtension", "we set null search key");
str = "";
}
newBuilder.setFilter(str.trim());
newBuilder.setCheckPublicSwitch(this.i);
newBuilder.setIndex(this.f4474b);
newBuilder.setLen(this.f4475c);
iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, ak.comm.d.encodeBytes(newBuilder.build().toByteArray()));
} else {
String str2 = this.f;
if (str2 != null) {
iQChildElementXmlStringBuilder.optElement("result", str2);
}
}
return iQChildElementXmlStringBuilder;
}
public long getTotalCount() {
return this.g;
}
public List<Group> getmPublicGroups() {
return this.h;
}
protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
try {
String text = xmlPullParser.getText();
this.f = text;
Akeychat.PublicMucGetResponse parseFrom = Akeychat.PublicMucGetResponse.parseFrom(ak.comm.d.decode(text));
this.f4477e = parseFrom;
if (parseFrom == null || parseFrom.getResult().getReturnCode() != 0) {
return;
}
if (this.h == null) {
this.h = new ArrayList();
}
this.g = this.f4477e.getTotalCount();
for (Akeychat.MucroomBasicSearchInfo mucroomBasicSearchInfo : this.f4477e.getPublicMucListList()) {
if (mucroomBasicSearchInfo != null) {
try {
Group generateAGroup = df.getInstance().generateAGroup(mucroomBasicSearchInfo.getMucroom());
generateAGroup.setmOwner(nf.getInstance().generateAStranger(mucroomBasicSearchInfo.getOwner(), null));
generateAGroup.setMember(mucroomBasicSearchInfo.getIsMember());
this.h.add(generateAGroup);
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
} catch (Exception e3) {
e3.printStackTrace();
Log.w("QueryPublicGroupExtension", "encounter excp in parse results" + e3.getMessage());
}
}
public l4() {
super("publicmuc", "http://akey.im/protocol/xmpp/iq/publicmuc");
setType(IQ.Type.get);
setTo(ye.getInstance().getServer().getXmppDomain());
setFrom(nf.getInstance().getUserMe().getJID());
this.a = null;
this.f4476d = false;
this.i = false;
}
}