+ * will be verified against the active list. * * @return the name of the active list. */ @@ -167,7 +184,7 @@ public class Privacy extends IQ { /** * Sets the name associated with the active list set for the session. Communications - * will be verified against the active list.
+ * will be verified against the active list. * * @param activeName is the name of the active list. */ @@ -303,4 +320,4 @@ public class Privacy extends IQ { return buf.toString(); } -} +} \ No newline at end of file diff --git a/source/org/jivesoftware/smack/packet/RosterPacket.java b/source/org/jivesoftware/smack/packet/RosterPacket.java index fff1c9946..b15289ee7 100644 --- a/source/org/jivesoftware/smack/packet/RosterPacket.java +++ b/source/org/jivesoftware/smack/packet/RosterPacket.java @@ -265,74 +265,31 @@ public class RosterPacket extends IQ { } } - /** - * The subscription type of a roster item. - */ - public static class ItemType { + public static enum ItemType { /** * The user and subscriber have no interest in each other's presence. */ - public static final ItemType NONE = new ItemType("none"); + none, /** * The user is interested in receiving presence updates from the subscriber. */ - public static final ItemType TO = new ItemType("to"); + to, /** * The subscriber is interested in receiving presence updates from the user. */ - public static final ItemType FROM = new ItemType("from"); + from, /** * The user and subscriber have a mutual interest in each other's presence. */ - public static final ItemType BOTH = new ItemType("both"); + both, /** * The user wishes to stop receiving presence updates from the subscriber. */ - public static final ItemType REMOVE = new ItemType("remove"); - - public static ItemType fromString(String value) { - if (value == null) { - return null; - } - value = value.toLowerCase(); - if ("none".equals(value)) { - return NONE; - } - else if ("to".equals(value)) { - return TO; - } - else if ("from".equals(value)) { - return FROM; - } - else if ("both".equals(value)) { - return BOTH; - } - else if ("remove".equals(value)) { - return REMOVE; - } - else { - return null; - } - } - - private String value; - - /** - * Returns the item type associated with the specified string. - * - * @param value the item type. - */ - public ItemType(String value) { - this.value = value; - } - - public String toString() { - return value; - } + remove } } \ No newline at end of file diff --git a/source/org/jivesoftware/smack/provider/PrivacyProvider.java b/source/org/jivesoftware/smack/provider/PrivacyProvider.java index b8e8be4be..a99539959 100644 --- a/source/org/jivesoftware/smack/provider/PrivacyProvider.java +++ b/source/org/jivesoftware/smack/provider/PrivacyProvider.java @@ -12,7 +12,7 @@ import java.util.ArrayList; * The PrivacyProvider parses {@link Privacy} packets. {@link Privacy} * Parses the query sub-document and creates an instance of {@link Privacy}. * For each item in the list element, it creates an instance - * of {@link PrivacyItem} and {@link PrivacyRule}. + * of {@link PrivacyItem} and {@link org.jivesoftware.smack.packet.PrivacyItem.PrivacyRule}. * * @author Francisco Vives */