CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05
以下内容为反编译后的 s2.java 源代码,内容仅作参考
package ak.smack;
import ak.im.sdk.manager.ye;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import java.util.ArrayList;
import java.util.Iterator;
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 s2 extends IQ {
private static String a = "names";
private final String f4655b;
private ArrayList<String> f4656c;
private JSONArray f4657d;
boolean f4658e;
public static class a extends IQProvider {
@Override
public IQ parse(XmlPullParser xmlPullParser, int i) throws Exception {
s2 s2Var = new s2();
boolean z = false;
while (!z) {
int next = xmlPullParser.next();
if (next == 4) {
s2Var.parseResults(xmlPullParser);
} else if (next == 3 && xmlPullParser.getName().equals("multiusersearch")) {
z = true;
}
}
return s2Var;
}
}
public s2(ArrayList<String> arrayList) {
super("multiusersearch", "http://akey.im/protocol/xmpp/iq/multiusersearch");
this.f4655b = "MultiUserSearchExtension";
this.f4656c = new ArrayList<>();
setType(IQ.Type.get);
this.f4658e = true;
setTo(ye.getInstance().getServer().getXmppDomain());
setFrom(ye.getInstance().getUsername() + "@" + ye.getInstance().getServer().getXmppDomain());
this.f4656c = arrayList;
}
@Override
protected IQ.IQChildElementXmlStringBuilder getIQChildElementBuilder(IQ.IQChildElementXmlStringBuilder iQChildElementXmlStringBuilder) {
iQChildElementXmlStringBuilder.append(">");
if (this.f4658e) {
JSONObject jSONObject = new JSONObject();
JSONArray jSONArray = new JSONArray();
Iterator<String> it = this.f4656c.iterator();
while (it.hasNext()) {
jSONArray.put(it.next());
}
try {
jSONObject.put(a, jSONArray);
} catch (JSONException e2) {
e2.printStackTrace();
}
iQChildElementXmlStringBuilder.optElement(HiAnalyticsConstant.Direction.REQUEST, jSONObject);
}
return iQChildElementXmlStringBuilder;
}
public JSONArray getUsers() {
return this.f4657d;
}
protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
this.f4657d = new JSONArray();
try {
this.f4657d = new JSONArray(xmlPullParser.getText());
} catch (JSONException e2) {
e2.printStackTrace();
}
}
public s2() {
super("multiusersearch", "http://akey.im/protocol/xmpp/iq/multiusersearch");
this.f4655b = "MultiUserSearchExtension";
this.f4656c = new ArrayList<>();
}
}