mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-12 14:01: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
|
|
@ -332,7 +332,7 @@ public class AdHocCommandManager extends Manager {
|
|||
*/
|
||||
private void processAdHocCommand(AdHocCommandData requestData) throws SmackException {
|
||||
// Only process requests of type SET
|
||||
if (requestData.getType() != IQ.Type.SET) {
|
||||
if (requestData.getType() != IQ.Type.set) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -364,7 +364,7 @@ public class AdHocCommandManager extends Manager {
|
|||
// corresponding sessioid
|
||||
LocalCommand command = newInstanceOfCmd(commandNode, sessionId);
|
||||
|
||||
response.setType(IQ.Type.RESULT);
|
||||
response.setType(IQ.Type.result);
|
||||
command.setData(response);
|
||||
|
||||
// Check that the requester has enough permission.
|
||||
|
|
@ -530,7 +530,7 @@ public class AdHocCommandManager extends Manager {
|
|||
|
||||
// Since all errors were passed, the response is now a
|
||||
// result
|
||||
response.setType(IQ.Type.RESULT);
|
||||
response.setType(IQ.Type.result);
|
||||
|
||||
// Set the new data to the command.
|
||||
command.setData(response);
|
||||
|
|
@ -623,7 +623,7 @@ public class AdHocCommandManager extends Manager {
|
|||
* @throws NotConnectedException
|
||||
*/
|
||||
private void respondError(AdHocCommandData response, XMPPError error) throws NotConnectedException {
|
||||
response.setType(IQ.Type.ERROR);
|
||||
response.setType(IQ.Type.error);
|
||||
response.setError(error);
|
||||
connection().sendPacket(response);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ public class RemoteCommand extends AdHocCommand {
|
|||
// TODO: not throw the corresponding exeption. This will make a faster response,
|
||||
// TODO: since the request is stoped before it's sent.
|
||||
AdHocCommandData data = new AdHocCommandData();
|
||||
data.setType(IQ.Type.SET);
|
||||
data.setType(IQ.Type.set);
|
||||
data.setTo(getOwnerJID());
|
||||
data.setNode(getNode());
|
||||
data.setSessionID(sessionID);
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ public class AdHocCommandData extends IQ {
|
|||
}
|
||||
buf.append(">");
|
||||
|
||||
if (getType() == Type.RESULT) {
|
||||
if (getType() == Type.result) {
|
||||
buf.append("<actions");
|
||||
|
||||
if (executeAction != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue