mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 00:59:39 +02:00
Change Element.toXml() to toXml(String enclosingNamespace)
This commit is contained in:
parent
380f9a2b72
commit
5ab2903c32
229 changed files with 634 additions and 536 deletions
|
@ -288,7 +288,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
String responseId;
|
||||
|
||||
LOGGER.fine("Packet: " + iq.toXML());
|
||||
LOGGER.fine("Packet: " + iq.toXML(null));
|
||||
|
||||
try {
|
||||
|
||||
|
@ -718,21 +718,21 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
String sid = jin.getSid();
|
||||
if (sid == null || !sid.equals(getSid())) {
|
||||
LOGGER.fine("Ignored Jingle(SID) " + sid + "|" + getSid() + " :" + iq.toXML());
|
||||
LOGGER.fine("Ignored Jingle(SID) " + sid + "|" + getSid() + " :" + iq.toXML(null));
|
||||
return false;
|
||||
}
|
||||
Jid ini = jin.getInitiator();
|
||||
if (!ini.equals(getInitiator())) {
|
||||
LOGGER.fine("Ignored Jingle(INI): " + iq.toXML());
|
||||
LOGGER.fine("Ignored Jingle(INI): " + iq.toXML(null));
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
// We accept some non-Jingle IQ packets: ERRORs and ACKs
|
||||
if (iq.getType().equals(IQ.Type.set)) {
|
||||
LOGGER.fine("Ignored Jingle(TYPE): " + iq.toXML());
|
||||
LOGGER.fine("Ignored Jingle(TYPE): " + iq.toXML(null));
|
||||
return false;
|
||||
} else if (iq.getType().equals(IQ.Type.get)) {
|
||||
LOGGER.fine("Ignored Jingle(TYPE): " + iq.toXML());
|
||||
LOGGER.fine("Ignored Jingle(TYPE): " + iq.toXML(null));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -1062,7 +1062,7 @@ public class JingleSession extends JingleNegotiator implements MediaReceivedList
|
|||
|
||||
// NO! Let the normal state machinery do all of the sending.
|
||||
// getConnection().sendStanza(perror);
|
||||
LOGGER.severe("Error sent: " + errorPacket.toXML());
|
||||
LOGGER.severe("Error sent: " + errorPacket.toXML(null));
|
||||
}
|
||||
return errorPacket;
|
||||
}
|
||||
|
|
|
@ -363,13 +363,13 @@ public class Jingle extends IQ {
|
|||
|
||||
synchronized (contents) {
|
||||
for (JingleContent content : contents) {
|
||||
buf.append(content.toXML());
|
||||
buf.append(content.toXML(null));
|
||||
}
|
||||
}
|
||||
|
||||
// and the same for audio jmf info
|
||||
if (contentInfo != null) {
|
||||
buf.append(contentInfo.toXML());
|
||||
buf.append(contentInfo.toXML(null));
|
||||
}
|
||||
|
||||
return buf;
|
||||
|
|
|
@ -160,7 +160,7 @@ public class JingleContent implements ExtensionElement {
|
|||
* @return a string with the XML representation
|
||||
*/
|
||||
@Override
|
||||
public String toXML() {
|
||||
public String toXML(String enclosingNamespace) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
|
||||
synchronized (transports) {
|
||||
|
@ -171,12 +171,12 @@ public class JingleContent implements ExtensionElement {
|
|||
|
||||
// Add the description.
|
||||
if (description != null) {
|
||||
buf.append(description.toXML());
|
||||
buf.append(description.toXML(null));
|
||||
}
|
||||
|
||||
// Add all of the transports.
|
||||
for (JingleTransport transport : transports) {
|
||||
buf.append(transport.toXML());
|
||||
buf.append(transport.toXML(null));
|
||||
}
|
||||
buf.append("</").append(getElementName()).append('>');
|
||||
}
|
||||
|
|
|
@ -148,7 +148,7 @@ public abstract class JingleContentDescription implements ExtensionElement {
|
|||
* @return a string with the XML representation
|
||||
*/
|
||||
@Override
|
||||
public String toXML() {
|
||||
public String toXML(String enclosingNamespace) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
|
||||
synchronized (payloads) {
|
||||
|
|
|
@ -84,7 +84,7 @@ public class JingleContentInfo implements ExtensionElement {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String toXML() {
|
||||
public String toXML(String enclosingNamespace) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
buf.append('<').append(getElementName()).append(" xmlns=\"");
|
||||
buf.append(getNamespace()).append("\" ");
|
||||
|
|
|
@ -155,7 +155,7 @@ public abstract class JingleDescription implements ExtensionElement {
|
|||
* @return a string with the XML representation
|
||||
*/
|
||||
@Override
|
||||
public String toXML() {
|
||||
public String toXML(String enclosingNamespace) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
|
||||
synchronized (payloads) {
|
||||
|
|
|
@ -76,7 +76,7 @@ public class JingleError implements ExtensionElement {
|
|||
* @return the error as XML.
|
||||
*/
|
||||
@Override
|
||||
public String toXML() {
|
||||
public String toXML(String enclosingNamespace) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
if (message != null) {
|
||||
buf.append("<error type=\"cancel\">");
|
||||
|
|
|
@ -152,7 +152,7 @@ public class JingleTransport implements ExtensionElement {
|
|||
* Return the XML representation for this element.
|
||||
*/
|
||||
@Override
|
||||
public String toXML() {
|
||||
public String toXML(String enclosingNamespace) {
|
||||
StringBuilder buf = new StringBuilder();
|
||||
|
||||
buf.append('<').append(getElementName()).append(" xmlns=\"");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue