CarrotChat v2.8.80.240429版本的 MD5 值为:fdf98761f01e715a89df24b85b0d206e
以下内容为反编译后的 DelSession.java 源代码,内容仅作参考
package ak.im.module;
import android.text.TextUtils;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.provider.ExtensionElementProvider;
import org.xmlpull.v1.XmlPullParser;
public class DelSession implements ExtensionElement {
public static String ELEMENT = "x";
public static String NAME_SPACE = "http://akey.im/protocol/xmpp/presence/session#delete";
private static final String TAG = "DelSession";
private String protobuf;
public static class Provider extends ExtensionElementProvider<DelSession> {
@Override
public DelSession parse(XmlPullParser xmlPullParser, int i10) throws Exception {
DelSession delSession = new DelSession();
boolean z10 = false;
while (!z10) {
int next = xmlPullParser.next();
if (next == 4) {
delSession.parseResults(xmlPullParser);
} else if (next == 3 && xmlPullParser.getName().equals(DelSession.ELEMENT)) {
z10 = true;
}
}
return delSession;
}
}
@Override
public String getElementName() {
return ELEMENT;
}
@Override
public String getNamespace() {
return NAME_SPACE;
}
public String getProtobuf() {
return this.protobuf;
}
protected void parseResults(XmlPullParser xmlPullParser) throws Exception {
try {
this.protobuf = xmlPullParser.getText();
} catch (Exception unused) {
}
}
@Override
public String toXML() {
StringBuilder sb2 = new StringBuilder();
sb2.append("<");
sb2.append(getElementName());
sb2.append(" xmlns=\"");
sb2.append(getNamespace());
sb2.append("\">");
if (!TextUtils.isEmpty(this.protobuf)) {
sb2.append(this.protobuf);
}
sb2.append("</");
sb2.append(getElementName());
sb2.append(">");
return sb2.toString();
}
}