01: /**
02: * Copyright (C) 2004-2007 Jive Software. All rights reserved.
03: *
04: * This software is published under the terms of the GNU Public License (GPL),
05: * a copy of which is included in this distribution.
06: */package org.xmpp.muc;
07:
08: import org.xmpp.packet.Presence;
09:
10: /**
11: * Initial presence sent when joining an existing room or creating a new room. The JoinRoom presence
12: * indicates the posibility of the sender to speak MUC.<p>
13: *
14: * Code example:
15: * <pre>
16: * // Join an existing room or create a new one.
17: * JoinRoom joinRoom = new JoinRoom("john@jabber.org/notebook", "room@conference.jabber.org/nick");
18: *
19: * component.sendPacket(joinRoom);
20: * </pre>
21: *
22: * @author Gaston Dombiak
23: */
24: public class LeaveRoom extends Presence {
25:
26: /**
27: * Creates a new Presence packet that could be sent to a MUC service in order to leave the room.
28: *
29: * @param from the full JID of the user that wants to leave the room.
30: * @param to the room JID. That is the room address plus the nickname of the user as a resource.
31: */
32: public LeaveRoom(String from, String to) {
33: super();
34: setFrom(from);
35: setTo(to);
36: setType(Type.unavailable);
37: }
38: }
|