1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-12 22:11:07 +01:00

Change IQ.Type to enum

This commit is contained in:
Júlio Cesar Bueno Cotta 2014-06-05 21:20:45 -03:00
parent 944ac37fc3
commit 9be0c480e3
90 changed files with 284 additions and 299 deletions

View file

@ -29,7 +29,7 @@ import org.jivesoftware.smack.util.StringUtils;
* <pre>
* // Request the version from the server.
* Version versionRequest = new Version();
* timeRequest.setType(IQ.Type.GET);
* timeRequest.setType(IQ.Type.get);
* timeRequest.setTo("example.com");
*
* // Create a packet collector to listen for a response.
@ -40,7 +40,7 @@ import org.jivesoftware.smack.util.StringUtils;
*
* // Wait up to 5 seconds for a result.
* IQ result = (IQ)collector.nextResult(5000);
* if (result != null && result.getType() == IQ.Type.RESULT) {
* if (result != null && result.getType() == IQ.Type.result) {
* Version versionResult = (Version)result;
* // Do something with result...
* }</pre><p>
@ -62,7 +62,7 @@ public class Version extends IQ {
* @param os The operating system of the queried entity. This element is OPTIONAL.
*/
public Version(String name, String version, String os) {
this.setType(IQ.Type.RESULT);
this.setType(IQ.Type.result);
this.name = name;
this.version = version;
this.os = os;