use of org.eclipse.ecf.presence.IPresence in project ecf by eclipse.
the class XMPPContainerPresenceHelper method createPresence.
protected Presence createPresence(IPresence ipresence) {
final Presence newPresence = new Presence(createPresenceType(ipresence), ipresence.getStatus(), 0, createPresenceMode(ipresence));
ECFConnection.setPropertiesInPacket(newPresence, ipresence.getProperties());
return newPresence;
}
use of org.eclipse.ecf.presence.IPresence in project ecf by eclipse.
the class XMPPContainerPresenceHelper method handlePresenceEvent.
protected void handlePresenceEvent(PresenceEvent evt) {
final Presence xmppPresence = evt.getPresence();
final String from = xmppPresence.getFrom();
final IPresence newPresence = createIPresence(xmppPresence);
final XMPPID fromID = createIDFromName(from);
if (newPresence.getType().equals(IPresence.Type.SUBSCRIBE) || newPresence.getType().equals(IPresence.Type.UNSUBSCRIBE) || newPresence.getType().equals(IPresence.Type.SUBSCRIBED) || newPresence.getType().equals(IPresence.Type.UNSUBSCRIBED)) {
rosterManager.notifySubscriptionListener(fromID, newPresence);
} else {
updatePresence(fromID, newPresence);
firePresenceListeners(fromID, newPresence);
}
}
Aggregations