Example #1
0
 private static RosterItem.SubType getSubType(org.xmpp.packet.Roster.Item item) {
   if (item.getSubscription() == org.xmpp.packet.Roster.Subscription.to) {
     return RosterItem.SUB_TO;
   } else if (item.getSubscription() == org.xmpp.packet.Roster.Subscription.from) {
     return RosterItem.SUB_FROM;
   } else if (item.getSubscription() == org.xmpp.packet.Roster.Subscription.both) {
     return RosterItem.SUB_BOTH;
   } else if (item.getSubscription() == org.xmpp.packet.Roster.Subscription.remove) {
     return RosterItem.SUB_REMOVE;
   } else {
     return RosterItem.SUB_NONE;
   }
 }