001/** 002 * 003 * Copyright 2003-2007 Jive Software. 004 * 005 * Licensed under the Apache License, Version 2.0 (the "License"); 006 * you may not use this file except in compliance with the License. 007 * You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 018package org.jivesoftware.smackx.muc; 019 020/** 021 * A listener that is fired anytime your participant's status in a room is changed, such as the 022 * user being kicked, banned, or granted admin permissions. 023 * 024 * @author Gaston Dombiak 025 */ 026public interface UserStatusListener { 027 028 /** 029 * Called when a moderator kicked your user from the room. This means that you are no longer 030 * participanting in the room. 031 * 032 * @param actor the moderator that kicked your user from the room (e.g. user@host.org). 033 * @param reason the reason provided by the actor to kick you from the room. 034 */ 035 public abstract void kicked(String actor, String reason); 036 037 /** 038 * Called when a moderator grants voice to your user. This means that you were a visitor in 039 * the moderated room before and now you can participate in the room by sending messages to 040 * all occupants. 041 * 042 */ 043 public abstract void voiceGranted(); 044 045 /** 046 * Called when a moderator revokes voice from your user. This means that you were a 047 * participant in the room able to speak and now you are a visitor that can't send 048 * messages to the room occupants. 049 * 050 */ 051 public abstract void voiceRevoked(); 052 053 /** 054 * Called when an administrator or owner banned your user from the room. This means that you 055 * will no longer be able to join the room unless the ban has been removed. 056 * 057 * @param actor the administrator that banned your user (e.g. user@host.org). 058 * @param reason the reason provided by the administrator to banned you. 059 */ 060 public abstract void banned(String actor, String reason); 061 062 /** 063 * Called when an administrator grants your user membership to the room. This means that you 064 * will be able to join the members-only room. 065 * 066 */ 067 public abstract void membershipGranted(); 068 069 /** 070 * Called when an administrator revokes your user membership to the room. This means that you 071 * will not be able to join the members-only room. 072 * 073 */ 074 public abstract void membershipRevoked(); 075 076 /** 077 * Called when an administrator grants moderator privileges to your user. This means that you 078 * will be able to kick users, grant and revoke voice, invite other users, modify room's 079 * subject plus all the partcipants privileges. 080 * 081 */ 082 public abstract void moderatorGranted(); 083 084 /** 085 * Called when an administrator revokes moderator privileges from your user. This means that 086 * you will no longer be able to kick users, grant and revoke voice, invite other users, 087 * modify room's subject plus all the partcipants privileges. 088 * 089 */ 090 public abstract void moderatorRevoked(); 091 092 /** 093 * Called when an owner grants to your user ownership on the room. This means that you 094 * will be able to change defining room features as well as perform all administrative 095 * functions. 096 * 097 */ 098 public abstract void ownershipGranted(); 099 100 /** 101 * Called when an owner revokes from your user ownership on the room. This means that you 102 * will no longer be able to change defining room features as well as perform all 103 * administrative functions. 104 * 105 */ 106 public abstract void ownershipRevoked(); 107 108 /** 109 * Called when an owner grants administrator privileges to your user. This means that you 110 * will be able to perform administrative functions such as banning users and edit moderator 111 * list. 112 * 113 */ 114 public abstract void adminGranted(); 115 116 /** 117 * Called when an owner revokes administrator privileges from your user. This means that you 118 * will no longer be able to perform administrative functions such as banning users and edit 119 * moderator list. 120 * 121 */ 122 public abstract void adminRevoked(); 123 124}