/*
 * BEGIN FLOCK GPL
 *
 * Copyright Flock Inc. 2005-2009
 * http://flock.com
 *
 * This file may be used under the terms of the
 * GNU General Public License Version 2 or later (the "GPL"),
 * http://www.gnu.org/licenses/gpl.html
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * END FLOCK GPL
 */

#include "flockIListener.idl"
#include "flockIWebServiceAPI.idl"
#include "flockIMailWebService.idl"

[scriptable, uuid(19C925D6-51D7-4422-9498-012650E86C19)]
interface flockIAOLMailAPI : flockITokenAPI {

  /**
   * Request the number of new mail messages.
   * @param aUid (in) UserID of the user.
   * @param aAccount (in) An associated AOLMailAccount (may be null).
   * @param aFlockListener (in) a flockIListener to use to return the
   *        mailFolderCount element via #onSuccess, or any errors via #onError.
   */
  void getNewMailCount(in AString aUid,
                       in flockIWebmailAccount aAccount,
                       in flockIListener aFlockListener);
  /**
   * Request a list of new mail.
   * @param aUid (in) UserID of the user.
   * @param aFolder (in) Folder name, either Inbox or Voicemail. If null, then
   *        defaults to Inbox and Voicemail.
   * @param aNumItems (in) The number of items to retrieve. If null, 10 items
   *        will be retrieved. This value cannot be greater than 75.
   * @param aGetNewMailCount (in) If true, then the number of new mail messages
   *        will be included in the "totalCount" element of the response.
   * @param aLang (in) Language value. Default is "en".
   * @param aLocale (in) Locale value. Default is "us".
   * @param aAccount (in) An associated AOLMailAccount (may be null).
   * @param aFlockListener (in) a flockIListener to use to return the mailList
   *        element via #onSuccess, or any errors via #onError.
   */
  void getNewMailList(in AString aUid,
                      in AString aFolder,
                      in AString aNumItems,
                      in boolean aGetNewMailCount,
                      in AString aLang,
                      in AString aLocale,
                      in flockIWebmailAccount aAccount,
                      in flockIListener aFlockListener);
};
