CarrotChat v2.8.80.240429版本的 MD5 值为:fdf98761f01e715a89df24b85b0d206e
以下内容为反编译后的 x4.java 源代码,内容仅作参考
package y0;
import ak.im.module.Group;
import ak.im.sdk.manager.bf;
import ak.im.utils.Log;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.provider.IQProvider;
import org.json.JSONException;
import org.json.JSONObject;
import org.xmlpull.v1.XmlPullParser;
public class x4 extends IQ {
private final String f49015a;
private final String f49016b;
private String f49017c;
private long f49018d;
private final String f49019e;
public static class b extends IQProvider {
@Override
public IQ parse(XmlPullParser xmlPullParser, int i10) throws Exception {
x4 x4Var = new x4();
boolean z10 = false;
while (!z10) {
int next = xmlPullParser.next();
if (next == 2) {
String name = xmlPullParser.getName();
if ("result".equals(name)) {
x4Var.parseResults(xmlPullParser);
} else if (Group.LIST_VERSION_CODE.equals(name)) {
x4Var.a(xmlPullParser);
}
} else if (next == 3 && xmlPullParser.getName().equals("quit")) {
z10 = true;
}
}
return x4Var;
}
}
protected void a(XmlPullParser xmlPullParser) throws Exception {
try {
this.f49018d = Long.parseLong(xmlPullParser.nextText());
} catch (Exception e10) {
Log.w(this.f49015a, "encounter excp in parse m-l-v-c:" + e10.getMessage());
}
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.append(">");
if (this.f49016b != null) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("name", this.f49016b);
} catch (JSONException e10) {
e10.printStackTrace();
Log.w(this.f49015a, "illegal group params,quit group failed.");
}
iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, jSONObject.toString());
} else {
String str = this.f49017c;
if (str != null) {
iQChildElementXmlStringBuilder.optElement("result", str);
}
long j10 = this.f49018d;
if (j10 != -1) {
iQChildElementXmlStringBuilder.optElement(Group.LIST_VERSION_CODE, Long.valueOf(j10));
}
}
return iQChildElementXmlStringBuilder;
}
public long getmListVersionCode() {
return this.f49018d;
}
public String getmquitResult() {
return this.f49017c;
}
public boolean isQuitGroupSuccess() {
if (!"success".equals(this.f49017c) && this.f49018d == -1) {
return false;
}
return true;
}
protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
try {
this.f49017c = xmlPullParser.nextText();
Log.i(this.f49015a, "start parse result in quit group:" + this.f49017c);
Log.i(this.f49015a, "after parse result:" + this.f49017c);
} catch (Exception e10) {
Log.w(this.f49015a, "encounter excp in parse results" + e10.getMessage());
}
}
public void setmListVersionCode(long j10) {
this.f49018d = j10;
}
private x4() {
super("quit", "http://akey.im/protocol/xmpp/iq/mucroom#quit");
this.f49018d = -1L;
this.f49019e = "success";
setType(IQ.Type.set);
setTo(ak.im.sdk.manager.f1.getInstance().getServer().getXmppDomain());
setFrom(bf.getInstance().getUserMe().getJID());
this.f49016b = null;
this.f49015a = getClass().getSimpleName();
}
public x4(String str) {
super("quit", "http://akey.im/protocol/xmpp/iq/mucroom#quit");
this.f49018d = -1L;
this.f49019e = "success";
setType(IQ.Type.set);
setTo(ak.im.sdk.manager.f1.getInstance().getServer().getXmppDomain());
setFrom(bf.getInstance().getUserMe().getJID());
this.f49016b = str;
this.f49015a = getClass().getSimpleName();
}
}