/* MIT ICT4DLab SMS Lab framework
 * 
 * Copyright (C) 2008, Massachusetts Institute of Technology
 * 
 * ICT4DLab SMS is distributed under the terms of the Apache License version 2.0
 * 
 * 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.
 * 
 * original author: Luis F. G. Sarmenta ( lfgs @ mit . edu ) 
 * v0.1.0: 20080228
 * 
 * This particular file is partly based on an original design from ADMUCMP, 
 * copyright 2003 by Ateneo Java Wireless Competency Center, 
 * Ateneo de Manila University, Philippines
 * Used with permission.
 * 
 * Last modified by:
 * date:
 * comment:
 */
package org.ict4dlab.sms.core;

import java.util.HashMap;

public interface SMSApplication {

    /**
     * The method invoked by the framework adapter upon receiving an SMS
     * message.
     * 
     * @param message
     *                the incoming SMS message
     * @return outgoing SMS message response, or null if no response
     */
    public SMSMessage onSMSMessageReceived(SMSMessage incomingMsg);

    /**
     * During application initialization time, this method will be invoked by
     * the framework adapter with a reference to an <tt>SMSSender</tt>. The
     * <tt>SMSSender</tt> may be used to asynchronously send SMS messages,
     * separately or in addition to the return value of
     * <tt>onSMSMessageReceived</tt>.
     * 
     * @param sender
     *                <tt>SMSSender</tt> provided by the framework adapter
     * @see <tt>SMSSender</tt>
     */
    public void setSMSSender(SMSSender sender);

}
