CarrotChat v2.8.80.240429版本的 MD5 值为:fdf98761f01e715a89df24b85b0d206e
以下内容为反编译后的 d2.java 源代码,内容仅作参考
package y0;
import ak.im.module.Group;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import java.util.List;
import java.util.Map;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smack.util.ParserUtils;
import org.json.JSONException;
import org.json.JSONObject;
import org.xmlpull.v1.XmlPullParser;
public class d2 extends IQ {
private String f48138a;
private String f48139b;
private String f48140c;
private Map<String, String> f48141d;
private List<String> f48142e;
private boolean f48143f;
private long f48144g;
public static class a extends IQProvider {
@Override
public IQ parse(XmlPullParser xmlPullParser, int i10) throws Exception {
d2 d2Var = new d2();
boolean z10 = false;
while (!z10) {
int next = xmlPullParser.next();
if (next == 4) {
d2Var.parseResults(xmlPullParser);
} else if (next == 3 && xmlPullParser.getName().equals("pushstatus")) {
z10 = true;
}
}
return d2Var;
}
}
public d2(String str, String str2) {
super("pushstatus", "http://akey.im/protocol/xmpp/iq/userprop#pushstatus");
this.f48138a = null;
this.f48139b = null;
setType(IQ.Type.set);
setTo(ak.im.sdk.manager.f1.getInstance().getServer().getXmppDomain());
setFrom(str);
this.f48138a = str;
this.f48139b = str2;
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.append(">");
if (this.f48139b != null && this.f48138a != null) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("pushstatus", this.f48139b);
jSONObject.put(ParserUtils.JID, this.f48138a);
} catch (JSONException e10) {
e10.printStackTrace();
}
iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, jSONObject.toString());
} else {
iQChildElementXmlStringBuilder.optElement("result", Boolean.valueOf(this.f48143f));
iQChildElementXmlStringBuilder.optElement(Group.VERSION_CODE, Long.valueOf(this.f48144g));
}
return iQChildElementXmlStringBuilder;
}
public List<String> getJidlist() {
return this.f48142e;
}
public Map<String, String> getResult_for_query_map() {
return this.f48141d;
}
public String getResult_t() {
return this.f48140c;
}
public long getVersionCode() {
return this.f48144g;
}
public boolean isSuccess() {
return this.f48143f;
}
protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
try {
String text = xmlPullParser.getText();
this.f48140c = text;
if ("success".equals(text)) {
this.f48143f = true;
} else {
this.f48144g = Long.parseLong(this.f48140c);
}
} catch (Exception e10) {
e10.printStackTrace();
}
}
public d2() {
super("pushstatus", "http://akey.im/protocol/xmpp/iq/userprop#pushstatus");
this.f48138a = null;
this.f48139b = null;
}
}