use of org.jxmpp.jid.Jid in project Smack by igniterealtime.
the class MultiUserChatLightManager method getRoomsBlocked.
/**
* Get rooms blocked.
*
* @param mucLightService
* @return the list of rooms blocked
* @throws NoResponseException
* @throws XMPPErrorException
* @throws NotConnectedException
* @throws InterruptedException
*/
public List<Jid> getRoomsBlocked(DomainBareJid mucLightService) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
MUCLightBlockingIQ muclIghtBlockingIQResult = getBlockingList(mucLightService);
List<Jid> jids = new ArrayList<>();
if (muclIghtBlockingIQResult.getRooms() != null) {
jids.addAll(muclIghtBlockingIQResult.getRooms().keySet());
}
return jids;
}
use of org.jxmpp.jid.Jid in project Smack by igniterealtime.
the class MultiUserChatLightManager method unblockUsers.
/**
* Unblock users.
*
* @param mucLightService
* @param usersJids
* @throws NoResponseException
* @throws XMPPErrorException
* @throws NotConnectedException
* @throws InterruptedException
*/
public void unblockUsers(DomainBareJid mucLightService, List<Jid> usersJids) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
HashMap<Jid, Boolean> users = new HashMap<>();
for (Jid jid : usersJids) {
users.put(jid, true);
}
sendUnblockUsers(mucLightService, users);
}
use of org.jxmpp.jid.Jid in project Smack by igniterealtime.
the class MUCLightAffiliationsIQ method getIQChildElementBuilder.
@Override
protected IQChildElementXmlStringBuilder getIQChildElementBuilder(IQChildElementXmlStringBuilder xml) {
xml.rightAngleBracket();
xml.optElement("version", version);
Iterator<Map.Entry<Jid, MUCLightAffiliation>> it = affiliations.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<Jid, MUCLightAffiliation> pair = it.next();
xml.element(new UserWithAffiliationElement(pair.getKey(), pair.getValue()));
}
return xml;
}
use of org.jxmpp.jid.Jid in project Smack by igniterealtime.
the class MUCLightBlockingIQ method parseBlocking.
private void parseBlocking(IQChildElementXmlStringBuilder xml, HashMap<Jid, Boolean> map, boolean isRoom) {
Iterator<Map.Entry<Jid, Boolean>> it = map.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<Jid, Boolean> pair = it.next();
xml.element(new BlockingElement(pair.getKey(), pair.getValue(), isRoom));
}
}
use of org.jxmpp.jid.Jid in project Smack by igniterealtime.
the class IoTDisownProvider method parse.
@Override
public IoTDisown parse(XmlPullParser parser, int initialDepth) throws Exception {
Jid jid = ParserUtils.getJidAttribute(parser);
NodeInfo nodeInfo = NodeInfoParser.parse(parser);
return new IoTDisown(jid, nodeInfo);
}
Aggregations