diff options
author | Shuyi Chen <shuyichen@google.com> | 2013-05-22 14:51:55 -0700 |
---|---|---|
committer | Shuyi Chen <shuyichen@google.com> | 2013-05-22 17:19:30 -0700 |
commit | d7955ce24d294fb2014c59d11fca184471056f44 (patch) | |
tree | e260500b0b7639127038495d46a0ad6dcbb6d96c /src/org/jivesoftware/smackx/muc/ParticipantStatusListener.java | |
parent | 8f4ce9ea0de51fee918bffe19c434612d6bbb2d7 (diff) | |
download | smack-kitkat-cts-dev.tar.gz |
Add android smack source.HEADandroid-wear-5.0.0_r1android-sdk-4.4.2_r1.0.1android-sdk-4.4.2_r1android-l-preview_r2android-cts-5.1_r9android-cts-5.1_r8android-cts-5.1_r7android-cts-5.1_r6android-cts-5.1_r5android-cts-5.1_r4android-cts-5.1_r3android-cts-5.1_r28android-cts-5.1_r27android-cts-5.1_r26android-cts-5.1_r25android-cts-5.1_r24android-cts-5.1_r23android-cts-5.1_r22android-cts-5.1_r21android-cts-5.1_r20android-cts-5.1_r2android-cts-5.1_r19android-cts-5.1_r18android-cts-5.1_r17android-cts-5.1_r16android-cts-5.1_r15android-cts-5.1_r14android-cts-5.1_r13android-cts-5.1_r10android-cts-5.1_r1android-cts-5.0_r9android-cts-5.0_r8android-cts-5.0_r7android-cts-5.0_r6android-cts-5.0_r5android-cts-5.0_r4android-cts-5.0_r3android-cts-4.4_r4android-cts-4.4_r1android-5.1.1_r9android-5.1.1_r8android-5.1.1_r7android-5.1.1_r6android-5.1.1_r5android-5.1.1_r4android-5.1.1_r38android-5.1.1_r37android-5.1.1_r36android-5.1.1_r35android-5.1.1_r34android-5.1.1_r33android-5.1.1_r30android-5.1.1_r3android-5.1.1_r29android-5.1.1_r28android-5.1.1_r26android-5.1.1_r25android-5.1.1_r24android-5.1.1_r23android-5.1.1_r22android-5.1.1_r20android-5.1.1_r2android-5.1.1_r19android-5.1.1_r18android-5.1.1_r17android-5.1.1_r16android-5.1.1_r15android-5.1.1_r14android-5.1.1_r13android-5.1.1_r12android-5.1.1_r10android-5.1.1_r1android-5.1.0_r5android-5.1.0_r4android-5.1.0_r3android-5.1.0_r1android-5.0.2_r3android-5.0.2_r1android-5.0.1_r1android-5.0.0_r7android-5.0.0_r6android-5.0.0_r5.1android-5.0.0_r5android-5.0.0_r4android-5.0.0_r3android-5.0.0_r2android-5.0.0_r1android-4.4w_r1android-4.4_r1.2.0.1android-4.4_r1.2android-4.4_r1.1.0.1android-4.4_r1.1android-4.4_r1.0.1android-4.4_r1android-4.4_r0.9android-4.4_r0.8android-4.4_r0.7android-4.4.4_r2.0.1android-4.4.4_r2android-4.4.4_r1.0.1android-4.4.4_r1android-4.4.3_r1.1.0.1android-4.4.3_r1.1android-4.4.3_r1.0.1android-4.4.3_r1android-4.4.2_r2.0.1android-4.4.2_r2android-4.4.2_r1.0.1android-4.4.2_r1android-4.4.1_r1.0.1android-4.4.1_r1android-4.3_r3.1android-4.3_r3android-4.3_r2.3android-4.3_r2.2android-4.3_r2.1android-4.3_r2android-4.3_r1.1android-4.3_r1android-4.3_r0.9.1android-4.3_r0.9android-4.3.1_r1tools_r22.2mastermainlollipop-wear-releaselollipop-releaselollipop-mr1-wfc-releaselollipop-mr1-releaselollipop-mr1-fi-releaselollipop-mr1-devlollipop-mr1-cts-releaselollipop-devlollipop-cts-releasel-previewkitkat-wearkitkat-releasekitkat-mr2.2-releasekitkat-mr2.1-releasekitkat-mr2-releasekitkat-mr1.1-releasekitkat-mr1-releasekitkat-devkitkat-cts-releasekitkat-cts-devjb-mr2.0.0-releasejb-mr2.0-releasejb-mr2-releasejb-mr2-devidea133-weekly-releaseidea133
Change-Id: I49ce97136c17173c4ae3965c694af6e7bc49897d
Diffstat (limited to 'src/org/jivesoftware/smackx/muc/ParticipantStatusListener.java')
-rw-r--r-- | src/org/jivesoftware/smackx/muc/ParticipantStatusListener.java | 179 |
1 files changed, 179 insertions, 0 deletions
diff --git a/src/org/jivesoftware/smackx/muc/ParticipantStatusListener.java b/src/org/jivesoftware/smackx/muc/ParticipantStatusListener.java new file mode 100644 index 0000000..c3e248d --- /dev/null +++ b/src/org/jivesoftware/smackx/muc/ParticipantStatusListener.java @@ -0,0 +1,179 @@ +/** + * $RCSfile$ + * $Revision$ + * $Date$ + * + * Copyright 2003-2007 Jive Software. + * + * All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.jivesoftware.smackx.muc; + +/** + * A listener that is fired anytime a participant's status in a room is changed, such as the + * user being kicked, banned, or granted admin permissions. + * + * @author Gaston Dombiak + */ +public interface ParticipantStatusListener { + + /** + * Called when a new room occupant has joined the room. Note: Take in consideration that when + * you join a room you will receive the list of current occupants in the room. This message will + * be sent for each occupant. + * + * @param participant the participant that has just joined the room + * (e.g. room@conference.jabber.org/nick). + */ + public abstract void joined(String participant); + + /** + * Called when a room occupant has left the room on its own. This means that the occupant was + * neither kicked nor banned from the room. + * + * @param participant the participant that has left the room on its own. + * (e.g. room@conference.jabber.org/nick). + */ + public abstract void left(String participant); + + /** + * Called when a room participant has been kicked from the room. This means that the kicked + * participant is no longer participating in the room. + * + * @param participant the participant that was kicked from the room + * (e.g. room@conference.jabber.org/nick). + * @param actor the moderator that kicked the occupant from the room (e.g. user@host.org). + * @param reason the reason provided by the actor to kick the occupant from the room. + */ + public abstract void kicked(String participant, String actor, String reason); + + /** + * Called when a moderator grants voice to a visitor. This means that the visitor + * can now participate in the moderated room sending messages to all occupants. + * + * @param participant the participant that was granted voice in the room + * (e.g. room@conference.jabber.org/nick). + */ + public abstract void voiceGranted(String participant); + + /** + * Called when a moderator revokes voice from a participant. This means that the participant + * in the room was able to speak and now is a visitor that can't send messages to the room + * occupants. + * + * @param participant the participant that was revoked voice from the room + * (e.g. room@conference.jabber.org/nick). + */ + public abstract void voiceRevoked(String participant); + + /** + * Called when an administrator or owner banned a participant from the room. This means that + * banned participant will no longer be able to join the room unless the ban has been removed. + * + * @param participant the participant that was banned from the room + * (e.g. room@conference.jabber.org/nick). + * @param actor the administrator that banned the occupant (e.g. user@host.org). + * @param reason the reason provided by the administrator to ban the occupant. + */ + public abstract void banned(String participant, String actor, String reason); + + /** + * Called when an administrator grants a user membership to the room. This means that the user + * will be able to join the members-only room. + * + * @param participant the participant that was granted membership in the room + * (e.g. room@conference.jabber.org/nick). + */ + public abstract void membershipGranted(String participant); + + /** + * Called when an administrator revokes a user membership to the room. This means that the + * user will not be able to join the members-only room. + * + * @param participant the participant that was revoked membership from the room + * (e.g. room@conference.jabber.org/nick). + */ + public abstract void membershipRevoked(String participant); + + /** + * Called when an administrator grants moderator privileges to a user. This means that the user + * will be able to kick users, grant and revoke voice, invite other users, modify room's + * subject plus all the partcipants privileges. + * + * @param participant the participant that was granted moderator privileges in the room + * (e.g. room@conference.jabber.org/nick). + */ + public abstract void moderatorGranted(String participant); + + /** + * Called when an administrator revokes moderator privileges from a user. This means that the + * user will no longer be able to kick users, grant and revoke voice, invite other users, + * modify room's subject plus all the partcipants privileges. + * + * @param participant the participant that was revoked moderator privileges in the room + * (e.g. room@conference.jabber.org/nick). + */ + public abstract void moderatorRevoked(String participant); + + /** + * Called when an owner grants a user ownership on the room. This means that the user + * will be able to change defining room features as well as perform all administrative + * functions. + * + * @param participant the participant that was granted ownership on the room + * (e.g. room@conference.jabber.org/nick). + */ + public abstract void ownershipGranted(String participant); + + /** + * Called when an owner revokes a user ownership on the room. This means that the user + * will no longer be able to change defining room features as well as perform all + * administrative functions. + * + * @param participant the participant that was revoked ownership on the room + * (e.g. room@conference.jabber.org/nick). + */ + public abstract void ownershipRevoked(String participant); + + /** + * Called when an owner grants administrator privileges to a user. This means that the user + * will be able to perform administrative functions such as banning users and edit moderator + * list. + * + * @param participant the participant that was granted administrator privileges + * (e.g. room@conference.jabber.org/nick). + */ + public abstract void adminGranted(String participant); + + /** + * Called when an owner revokes administrator privileges from a user. This means that the user + * will no longer be able to perform administrative functions such as banning users and edit + * moderator list. + * + * @param participant the participant that was revoked administrator privileges + * (e.g. room@conference.jabber.org/nick). + */ + public abstract void adminRevoked(String participant); + + /** + * Called when a participant changed his/her nickname in the room. The new participant's + * nickname will be informed with the next available presence. + * + * @param participant the participant that was revoked administrator privileges + * (e.g. room@conference.jabber.org/nick). + * @param newNickname the new nickname that the participant decided to use. + */ + public abstract void nicknameChanged(String participant, String newNickname); + +} |