1 /** 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 21 package org.jivesoftware.smackx; 22 23 /** 24 * 25 * A listener that is fired anytime a message event notification is received. 26 * Message event notifications are received as a consequence of the request 27 * to receive notifications when sending a message. 28 * 29 * @author Gaston Dombiak 30 */ 31 public interface MessageEventNotificationListener { 32 33 /** 34 * Called when a notification of message delivered is received. 35 * 36 * @param from the user that sent the notification. 37 * @param packetID the id of the message that was sent. 38 */ 39 public void deliveredNotification(String from, String packetID); 40 41 /** 42 * Called when a notification of message displayed is received. 43 * 44 * @param from the user that sent the notification. 45 * @param packetID the id of the message that was sent. 46 */ 47 public void displayedNotification(String from, String packetID); 48 49 /** 50 * Called when a notification that the receiver of the message is composing a reply is 51 * received. 52 * 53 * @param from the user that sent the notification. 54 * @param packetID the id of the message that was sent. 55 */ 56 public void composingNotification(String from, String packetID); 57 58 /** 59 * Called when a notification that the receiver of the message is offline is received. 60 * 61 * @param from the user that sent the notification. 62 * @param packetID the id of the message that was sent. 63 */ 64 public void offlineNotification(String from, String packetID); 65 66 /** 67 * Called when a notification that the receiver of the message cancelled the reply 68 * is received. 69 * 70 * @param from the user that sent the notification. 71 * @param packetID the id of the message that was sent. 72 */ 73 public void cancelledNotification(String from, String packetID); 74 } 75