blob: 34c915ddd0be478afb5d6056a57ae9bcae9e88ff [file] [log] [blame]
Shuyi Chend7955ce2013-05-22 14:51:55 -07001/**
2 * $RCSfile$
3 * $Revision$
4 * $Date$
5 *
6 * Copyright 2003-2007 Jive Software.
7 *
8 * All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20
21package org.jivesoftware.smackx.muc;
22
23import org.jivesoftware.smack.Connection;
24import org.jivesoftware.smack.packet.Message;
25
26/**
27 * A listener that is fired anytime an invitation to join a MUC room is received.
28 *
29 * @author Gaston Dombiak
30 */
31public interface InvitationListener {
32
33 /**
34 * Called when the an invitation to join a MUC room is received.<p>
35 *
36 * If the room is password-protected, the invitee will receive a password to use to join
37 * the room. If the room is members-only, the the invitee may be added to the member list.
38 *
39 * @param conn the Connection that received the invitation.
40 * @param room the room that invitation refers to.
41 * @param inviter the inviter that sent the invitation. (e.g. crone1@shakespeare.lit).
42 * @param reason the reason why the inviter sent the invitation.
43 * @param password the password to use when joining the room.
44 * @param message the message used by the inviter to send the invitation.
45 */
46 public abstract void invitationReceived(Connection conn, String room, String inviter, String reason,
47 String password, Message message);
48
49}