mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-12-13 16:41:08 +01:00
Change IQ.Type to enum
This commit is contained in:
parent
944ac37fc3
commit
9be0c480e3
90 changed files with 284 additions and 299 deletions
|
|
@ -39,7 +39,7 @@ public class Close extends IQ {
|
|||
throw new IllegalArgumentException("Session ID must not be null or empty");
|
||||
}
|
||||
this.sessionID = sessionID;
|
||||
setType(Type.SET);
|
||||
setType(Type.set);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public class Data extends IQ {
|
|||
* retrieved from IQ stanza and message stanza in the same way
|
||||
*/
|
||||
addExtension(data);
|
||||
setType(IQ.Type.SET);
|
||||
setType(IQ.Type.set);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public class Open extends IQ {
|
|||
this.sessionID = sessionID;
|
||||
this.blockSize = blockSize;
|
||||
this.stanza = stanza;
|
||||
setType(Type.SET);
|
||||
setType(Type.set);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -640,7 +640,7 @@ public final class Socks5BytestreamManager implements BytestreamManager {
|
|||
*/
|
||||
private Bytestream createStreamHostRequest(String proxy) {
|
||||
Bytestream request = new Bytestream();
|
||||
request.setType(IQ.Type.GET);
|
||||
request.setType(IQ.Type.get);
|
||||
request.setTo(proxy);
|
||||
return request;
|
||||
}
|
||||
|
|
@ -695,7 +695,7 @@ public final class Socks5BytestreamManager implements BytestreamManager {
|
|||
initiation.addStreamHost(streamHost);
|
||||
}
|
||||
|
||||
initiation.setType(IQ.Type.SET);
|
||||
initiation.setType(IQ.Type.set);
|
||||
initiation.setTo(targetJID);
|
||||
|
||||
return initiation;
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ public class Socks5BytestreamRequest implements BytestreamRequest {
|
|||
private Bytestream createUsedHostResponse(StreamHost selectedHost) {
|
||||
Bytestream response = new Bytestream(this.bytestreamRequest.getSessionID());
|
||||
response.setTo(this.bytestreamRequest.getFrom());
|
||||
response.setType(IQ.Type.RESULT);
|
||||
response.setType(IQ.Type.result);
|
||||
response.setPacketID(this.bytestreamRequest.getPacketID());
|
||||
response.setUsedHost(selectedHost.getJID());
|
||||
return response;
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ class Socks5ClientForInitiator extends Socks5Client {
|
|||
private Bytestream createStreamHostActivation() {
|
||||
Bytestream activate = new Bytestream(this.sessionID);
|
||||
activate.setMode(null);
|
||||
activate.setType(IQ.Type.SET);
|
||||
activate.setType(IQ.Type.set);
|
||||
activate.setTo(this.streamHost.getJID());
|
||||
|
||||
activate.setToActivate(this.target);
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ public class Bytestream extends IQ {
|
|||
StringBuilder buf = new StringBuilder();
|
||||
|
||||
buf.append("<query xmlns=\"http://jabber.org/protocol/bytestreams\"");
|
||||
if (this.getType().equals(IQ.Type.SET)) {
|
||||
if (this.getType().equals(IQ.Type.set)) {
|
||||
if (getSessionID() != null) {
|
||||
buf.append(" sid=\"").append(getSessionID()).append("\"");
|
||||
}
|
||||
|
|
@ -234,7 +234,7 @@ public class Bytestream extends IQ {
|
|||
buf.append(getToActivate().toXML());
|
||||
}
|
||||
}
|
||||
else if (this.getType().equals(IQ.Type.RESULT)) {
|
||||
else if (this.getType().equals(IQ.Type.result)) {
|
||||
buf.append(">");
|
||||
if (getUsedHost() != null) {
|
||||
buf.append(getUsedHost().toXML());
|
||||
|
|
@ -246,7 +246,7 @@ public class Bytestream extends IQ {
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (this.getType().equals(IQ.Type.GET)) {
|
||||
else if (this.getType().equals(IQ.Type.get)) {
|
||||
return buf.append("/>").toString();
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue