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.xevent;
019
020/**
021 *
022 * A listener that is fired anytime a message event notification is received.
023 * Message event notifications are received as a consequence of the request
024 * to receive notifications when sending a message.
025 *
026 * @author Gaston Dombiak
027 */
028public interface MessageEventNotificationListener {
029
030    /**
031     * Called when a notification of message delivered is received.
032     *  
033     * @param from the user that sent the notification.
034     * @param packetID the id of the message that was sent.
035     */
036    public void deliveredNotification(String from, String packetID);
037
038    /**
039     * Called when a notification of message displayed is received.
040     *  
041     * @param from the user that sent the notification.
042     * @param packetID the id of the message that was sent.
043     */
044    public void displayedNotification(String from, String packetID);
045
046    /**
047     * Called when a notification that the receiver of the message is composing a reply is 
048     * received.
049     *  
050     * @param from the user that sent the notification.
051     * @param packetID the id of the message that was sent.
052     */
053    public void composingNotification(String from, String packetID);
054
055    /**
056     * Called when a notification that the receiver of the message is offline is received.
057     *  
058     * @param from the user that sent the notification.
059     * @param packetID the id of the message that was sent.
060     */
061    public void offlineNotification(String from, String packetID);
062
063    /**
064     * Called when a notification that the receiver of the message cancelled the reply 
065     * is received.
066     *  
067     * @param from the user that sent the notification.
068     * @param packetID the id of the message that was sent.
069     */
070    public void cancelledNotification(String from, String packetID);
071}