/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 *
 * The contents of this file are subject to the Netscape Public
 * License Version 1.1 (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.mozilla.org/NPL/
 *
 * 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.
 *
 * The Original Code is mozilla.org code.
 *
 * The Initial Developer of the Original Code is Netscape
 * Communications Corporation.  Portions created by Netscape are
 * Copyright (C) 2001 Netscape Communications Corporation. All
 * Rights Reserved.
 *
 * Contributor(s): 
 */

#include "nsISupports.idl"
#include "MailNewsTypes2.idl"
// #include "nsIImapUrl.idl" // for imapMessageFlagsType

typedef unsigned short imapMessageFlagsType;

typedef long nsOfflineImapOperationType;

[scriptable, uuid(7cc7dec6-ea50-11d4-a5b7-0060b0fc04b7)]

interface nsIMsgOfflineImapOperation : nsISupports
{
// type of stored imap operations
  const long kFlagsChanged		= 0x1;
  const long kMsgMoved			= 0x2;
  const long kMsgCopy			= 0x4;
  const long kMoveResult			= 0x8;
  const long kAppendDraft        = 0x10;
  const long kAddedHeader		= 0x20;
  const long kDeletedMsg			= 0x40;
  const long kMsgMarkedDeleted	= 0x80;
  const long kAppendTemplate     = 0x100;
  const long kDeleteAllMsgs		= 0x200;

  attribute nsOfflineImapOperationType operation;
  void clearOperation(in nsOfflineImapOperationType operation);
  attribute nsMsgKey messageKey;
  attribute imapMessageFlagsType flagOperation;
  attribute imapMessageFlagsType newFlags; // for kFlagsChanged
  attribute string destinationFolderURI; // for move or copy
  attribute string sourceFolderURI;
  readonly attribute long numberOfCopies;
  void addMessageCopyOperation(in string destinationBox);
  string getCopyDestination(in long copyIndex);
};

