SmsReaderController.java :  » SMS » smsselector » com » rudolfheszele » smsselector » controller » Android Open Source

Android Open Source » SMS » smsselector 
smsselector » com » rudolfheszele » smsselector » controller » SmsReaderController.java
package com.rudolfheszele.smsselector.controller;

/**
 * This interface is for Controllers who want to read the messages
 * @author erudhes
 * @version 0.2
 */
public interface SmsReaderController extends Controller
{
  /**
   * These are the possible states of the message reading. The reader controller
   * will be informed about the state of the reading by this enumeration
   * @author erudhes
   */
  public enum ProgressState
  {
    READING_STARTED_STATE,
    NEW_PROGRESS_STATE,
    DIRECTORY_CHANGED_STATE,
    READING_FINISHED_STATE
  }
  
  /**
   * This method is invoked when the service starts to read the messages
   * @param smsReaderService The service, controlling the reading
   */
  void smsReadingStarted(SmsSelectorSmsReaderService smsReaderService);
  
  /**
   * This method is called, when the service finishes reading the messages
   */
  void smsReadingFinished();
  
  /**
   * This method is used to report progress to the reader controller
   * @param progressState Represents the state of the reading
   * @param additionalInfo In DIRECTORY_CHANGED_STATE stores the directory name as a String
   *                       In NEW_PROGRESS_STATE stores the percent as an Integer
   */
  void reportProgress(ProgressState progressState, Object additionalInfo);
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.