CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05
以下内容为反编译后的 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 i) throws Exception {
DelSession delSession = new DelSession();
boolean z = false;
while (!z) {
int next = xmlPullParser.next();
if (next == 4) {
delSession.parseResults(xmlPullParser);
} else if (next == 3 && xmlPullParser.getName().equals(DelSession.ELEMENT)) {
z = 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 sb = new StringBuilder();
sb.append("<");
sb.append(getElementName());
sb.append(" xmlns=\"");
sb.append(getNamespace());
sb.append("\">");
if (!TextUtils.isEmpty(this.protobuf)) {
sb.append(this.protobuf);
}
sb.append("</");
sb.append(getElementName());
sb.append(">");
return sb.toString();
}
}