Revision control
Copy as Markdown
Other Tools
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
#include "nsISupports.idl"
#include "MailNewsTypes2.idl"
#include "nsIImapUrl.idl" // for imapMessageFlagsType
typedef long nsOfflineImapOperationType;
[scriptable, uuid(b5229a55-22bb-444b-be92-13d719353828)]
interface nsIMsgOfflineImapOperation : nsISupports
{
// type of stored imap operations
const long kFlagsChanged = 0x1; // Set IMAP flags on msg.
/**
* For Move operations, a pair of operations is used: kMsgMoved and kMoveResult.
* A kMsgMoved op is added to the source folder.
* A kMsgMoveResult is attached to the destination folder.
* The kMsgMoveResult op also holds the key(/UID) of the source message
* (in the source DB). This is because the message in the src DB might
* already be removed by the time the move operation is actually executed
* against the server, so we have to keep track of it.
*/
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;
/** Delete all msgs in folder (eg empty trash). */
const long kDeleteAllMsgs = 0x200;
const long kAddKeywords = 0x400;
const long kRemoveKeywords = 0x800;
// Bitflags indicating which operation(s) this represents.
attribute nsOfflineImapOperationType operation;
void clearOperation(in nsOfflineImapOperationType operation);
attribute nsMsgKey messageKey;
// For move/copy operations, the msg key of the source msg (in source DB).
attribute nsMsgKey srcMessageKey;
attribute imapMessageFlagsType flagOperation;
attribute imapMessageFlagsType newFlags; // for kFlagsChanged
attribute AUTF8String destinationFolderURI; // for move or copy
// Setting this sets the kMoveResult bitflag in .operation.
attribute AUTF8String sourceFolderURI;
// Calling this sets the kAddKeywords bitflag in .operation.
void addKeywordToAdd(in string aKeyword);
// Calling this sets the kRemoveKeywords bitflag in .operation.
void addKeywordToRemove(in string aKeyword);
readonly attribute string keywordsToAdd;
readonly attribute string keywordsToRemove;
readonly attribute long numberOfCopies;
// Calling this sets the kMsgCopy bitflag in .operation.
// Can be called multiple times to copy to multiple destinations.
// NOTE: No code ever seems to use this. There's only ever one destination.
void addMessageCopyOperation(in AUTF8String destinationBox);
string getCopyDestination(in long copyIndex);
attribute unsigned long msgSize;
attribute boolean playingBack;
};