CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05
以下内容为反编译后的 k5.java 源代码,内容仅作参考
package ak.smack;
import ak.im.module.Group;
import ak.im.sdk.manager.ye;
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 k5 extends IQ {
private static final String a = "k5";
private String f4455b;
private String f4456c;
private String f4457d;
private String f4458e;
private boolean f;
private String g;
public String h;
private long i;
private long j;
public static class a extends IQProvider {
@Override
public IQ parse(XmlPullParser xmlPullParser, int i) throws Exception {
k5 k5Var = new k5();
boolean z = false;
while (!z) {
int next = xmlPullParser.next();
if (next == 2) {
String name = xmlPullParser.getName();
if ("result".equals(name)) {
k5Var.parseResults(xmlPullParser);
} else if (Group.VERSION_CODE.equals(name)) {
k5Var.a(xmlPullParser);
} else if (Group.LIST_VERSION_CODE.equals(name)) {
k5Var.b(xmlPullParser);
}
} else if (next == 3 && xmlPullParser.getName().equals("mucroom")) {
z = true;
}
}
return k5Var;
}
}
public k5(String str, String str2) {
super("mucroom", "http://akey.im/protocol/xmpp/iq/mucroom#nickname");
this.f4455b = "nickname";
this.f4456c = "mucroom";
this.i = -1L;
this.j = -1L;
this.f4457d = str;
this.f4458e = str2;
setType(IQ.Type.set);
setTo(ye.getInstance().getServer().getXmppDomain());
}
protected void a(XmlPullParser xmlPullParser) throws Exception {
try {
this.i = Long.parseLong(xmlPullParser.nextText());
} catch (Exception e2) {
String str = a;
Log.w(str, "encounter excp in parse g-v-c:" + e2.getMessage());
}
}
protected void b(XmlPullParser xmlPullParser) throws Exception {
try {
this.j = Long.parseLong(xmlPullParser.nextText());
} catch (Exception e2) {
String str = a;
Log.w(str, "encounter excp in parse m-l-v-c:" + e2.getMessage());
}
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.append(">");
if (this.f4457d != null) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put(this.f4456c, this.f4457d);
jSONObject.put(this.f4455b, this.f4458e);
} catch (JSONException e2) {
e2.printStackTrace();
}
iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, jSONObject.toString());
} else {
long j = this.i;
if (j != -1) {
iQChildElementXmlStringBuilder.optElement(Group.VERSION_CODE, Long.valueOf(j));
}
long j2 = this.j;
if (j2 != -1) {
iQChildElementXmlStringBuilder.optElement(Group.LIST_VERSION_CODE, Long.valueOf(j2));
}
String str = this.g;
if (str != null) {
iQChildElementXmlStringBuilder.optElement("result", str);
}
}
return iQChildElementXmlStringBuilder;
}
public long getmGroupVersionCode() {
return this.i;
}
public long getmListVersionCode() {
return this.j;
}
public String getmResult() {
return this.g;
}
public boolean isSuccess() {
return this.f;
}
protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
try {
this.g = xmlPullParser.nextText();
} catch (Exception e2) {
String str = a;
Log.w(str, "encounter excp in parse results" + e2.getMessage());
}
}
public void setmGroupVersionCode(long j) {
this.i = j;
}
public void setmListVersionCode(long j) {
this.j = j;
}
public k5() {
super("mucroom", "http://akey.im/protocol/xmpp/iq/mucroom#nickname");
this.f4455b = "nickname";
this.f4456c = "mucroom";
this.i = -1L;
this.j = -1L;
}
}