mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
Phase 1 of large refactoring. Removing dead code, bug fixes, updates to JDK 1.5.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@4511 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
1a08715f67
commit
bbbfe09c31
62 changed files with 291 additions and 3524 deletions
|
@ -47,7 +47,7 @@ public class DeafOccupantInterceptor implements PacketInterceptor {
|
|||
public void interceptPacket(Packet packet) {
|
||||
Presence presence = (Presence) packet;
|
||||
// Check if user is joining a room
|
||||
if (Presence.Type.AVAILABLE == presence.getType() &&
|
||||
if (Presence.Type.available == presence.getType() &&
|
||||
presence.getExtension("x", "http://jabber.org/protocol/muc") != null) {
|
||||
// Add extension that indicates that user wants to be a deaf occupant
|
||||
packet.addExtension(new DeafExtension());
|
||||
|
|
|
@ -291,7 +291,7 @@ public class MultiUserChat {
|
|||
}
|
||||
// We create a room by sending a presence packet to room@service/nick
|
||||
// and signal support for MUC. The owner will be automatically logged into the room.
|
||||
Presence joinPresence = new Presence(Presence.Type.AVAILABLE);
|
||||
Presence joinPresence = new Presence(Presence.Type.available);
|
||||
joinPresence.setTo(room + "/" + nickname);
|
||||
// Indicate the the client supports MUC
|
||||
joinPresence.addExtension(new MUCInitialPresence());
|
||||
|
@ -422,7 +422,7 @@ public class MultiUserChat {
|
|||
}
|
||||
// We join a room by sending a presence packet where the "to"
|
||||
// field is in the form "roomName@service/nickname"
|
||||
Presence joinPresence = new Presence(Presence.Type.AVAILABLE);
|
||||
Presence joinPresence = new Presence(Presence.Type.available);
|
||||
joinPresence.setTo(room + "/" + nickname);
|
||||
|
||||
// Indicate the the client supports MUC
|
||||
|
@ -484,7 +484,7 @@ public class MultiUserChat {
|
|||
}
|
||||
// We leave a room by sending a presence packet where the "to"
|
||||
// field is in the form "roomName@service/nickname"
|
||||
Presence leavePresence = new Presence(Presence.Type.UNAVAILABLE);
|
||||
Presence leavePresence = new Presence(Presence.Type.unavailable);
|
||||
leavePresence.setTo(room + "/" + nickname);
|
||||
// Invoke presence interceptors so that extra information can be dynamically added
|
||||
for (Iterator it = presenceInterceptors.iterator(); it.hasNext();) {
|
||||
|
@ -944,7 +944,7 @@ public class MultiUserChat {
|
|||
// We change the nickname by sending a presence packet where the "to"
|
||||
// field is in the form "roomName@service/nickname"
|
||||
// We don't have to signal the MUC support again
|
||||
Presence joinPresence = new Presence(Presence.Type.AVAILABLE);
|
||||
Presence joinPresence = new Presence(Presence.Type.available);
|
||||
joinPresence.setTo(room + "/" + nickname);
|
||||
// Invoke presence interceptors so that extra information can be dynamically added
|
||||
for (Iterator it = presenceInterceptors.iterator(); it.hasNext();) {
|
||||
|
@ -995,7 +995,7 @@ public class MultiUserChat {
|
|||
}
|
||||
// We change the availability status by sending a presence packet to the room with the
|
||||
// new presence status and mode
|
||||
Presence joinPresence = new Presence(Presence.Type.AVAILABLE);
|
||||
Presence joinPresence = new Presence(Presence.Type.available);
|
||||
joinPresence.setStatus(status);
|
||||
joinPresence.setMode(mode);
|
||||
joinPresence.setTo(room + "/" + nickname);
|
||||
|
@ -2112,7 +2112,7 @@ public class MultiUserChat {
|
|||
String from = presence.getFrom();
|
||||
String myRoomJID = room + "/" + nickname;
|
||||
boolean isUserStatusModification = presence.getFrom().equals(myRoomJID);
|
||||
if (presence.getType() == Presence.Type.AVAILABLE) {
|
||||
if (presence.getType() == Presence.Type.available) {
|
||||
Presence oldPresence;
|
||||
synchronized (occupantsMap) {
|
||||
oldPresence = (Presence)occupantsMap.get(from);
|
||||
|
@ -2145,7 +2145,7 @@ public class MultiUserChat {
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (presence.getType() == Presence.Type.UNAVAILABLE) {
|
||||
else if (presence.getType() == Presence.Type.unavailable) {
|
||||
synchronized (occupantsMap) {
|
||||
occupantsMap.remove(from);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue