CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05
以下内容为反编译后的 d2.java 源代码,内容仅作参考
package ak.smack;
import ak.im.module.Group;
import ak.im.sdk.manager.ye;
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 a;
private String f4252b;
private String f4253c;
private Map<String, String> f4254d;
private List<String> f4255e;
private boolean f;
private long g;
public static class a extends IQProvider {
@Override
public IQ parse(XmlPullParser xmlPullParser, int i) throws Exception {
d2 d2Var = new d2();
boolean z = false;
while (!z) {
int next = xmlPullParser.next();
if (next == 4) {
d2Var.parseResults(xmlPullParser);
} else if (next == 3 && xmlPullParser.getName().equals("pushstatus")) {
z = true;
}
}
return d2Var;
}
}
public d2(String str, String str2) {
super("pushstatus", "http://akey.im/protocol/xmpp/iq/userprop#pushstatus");
this.a = null;
this.f4252b = null;
setType(IQ.Type.set);
setTo(ye.getInstance().getServer().getXmppDomain());
setFrom(str);
this.a = str;
this.f4252b = str2;
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.append(">");
if (this.f4252b != null && this.a != null) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("pushstatus", this.f4252b);
jSONObject.put(ParserUtils.JID, this.a);
} catch (JSONException e2) {
e2.printStackTrace();
}
iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, jSONObject.toString());
} else {
iQChildElementXmlStringBuilder.optElement("result", Boolean.valueOf(this.f));
iQChildElementXmlStringBuilder.optElement(Group.VERSION_CODE, Long.valueOf(this.g));
}
return iQChildElementXmlStringBuilder;
}
public List<String> getJidlist() {
return this.f4255e;
}
public Map<String, String> getResult_for_query_map() {
return this.f4254d;
}
public String getResult_t() {
return this.f4253c;
}
public long getVersionCode() {
return this.g;
}
public boolean isSuccess() {
return this.f;
}
protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
try {
String text = xmlPullParser.getText();
this.f4253c = text;
if ("success".equals(text)) {
this.f = true;
} else {
this.g = Long.parseLong(this.f4253c);
}
} catch (Exception e2) {
e2.printStackTrace();
}
}
public d2() {
super("pushstatus", "http://akey.im/protocol/xmpp/iq/userprop#pushstatus");
this.a = null;
this.f4252b = null;
}
}