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