CarrotChat v2.8.60.240131版本的 MD5 值为:2baf8b9f31830b86b5c5a85ae6b47e05
以下内容为反编译后的 CapsExtension.java 源代码,内容仅作参考
package org.jivesoftware.smackx.caps.packet;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.roster.packet.RosterVer;
import org.jivesoftware.smack.util.XmlStringBuilder;
public class CapsExtension implements ExtensionElement {
public static final String ELEMENT = "c";
public static final String NAMESPACE = "http://jabber.org/protocol/caps";
private final String hash;
private final String node;
private final String ver;
public CapsExtension(String str, String str2, String str3) {
this.node = str;
this.ver = str2;
this.hash = str3;
}
public static CapsExtension from(Stanza stanza) {
return (CapsExtension) stanza.getExtension("c", "http://jabber.org/protocol/caps");
}
@Override
public String getElementName() {
return "c";
}
public String getHash() {
return this.hash;
}
@Override
public String getNamespace() {
return "http://jabber.org/protocol/caps";
}
public String getNode() {
return this.node;
}
public String getVer() {
return this.ver;
}
@Override
public XmlStringBuilder toXML() {
XmlStringBuilder xmlStringBuilder = new XmlStringBuilder((ExtensionElement) this);
xmlStringBuilder.attribute("hash", this.hash).attribute("node", this.node).attribute(RosterVer.ELEMENT, this.ver);
xmlStringBuilder.closeEmptyElement();
return xmlStringBuilder;
}
}