Revision control

Copy as Markdown

Other Tools

/* -*- Mode: C++; 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
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsISupports.idl"
#include "MailNewsTypes2.idl"
interface nsICopyMessageListener;
interface nsIURI;
/**
* A wrapper around `nsICopyMessageListener` to help with reading messages being
* copied/moved. Each instance is specific to a single move/copy operation, but
* a single operation can span multiple messages.
*
* @note Implementors should also implement `nsIStreamListener`.
*/
[scriptable, uuid(7741DAEC-2125-11d3-8A90-0060B0FC04D2)]
interface nsICopyMessageStreamListener: nsISupports
{
/**
* Initializes the listener.
*
* @param destination The listener to forward calls to.
* @param isMove Whether the operation is about moving a message, as
* opposed to only copying it.
*/
void init(in nsICopyMessageListener destination, in boolean isMove);
/**
* Calls `StartMessage` on the wrapped listener.
*/
void startMessage();
/**
* Calls `EndMessage` on the wrapped listener.
*
* @param key The message's key in the source folder.
*/
void endMessage(in nsMsgKey key);
/**
* Calls `EndCopy` on the wrapped listener, as well as `EndMove` if the
* operation is a move.
*
* Also called through `nsIStreamListener::OnStopRequest`.
*
* @param status The end status for the whole operation.
*/
void endCopy(in nsresult status);
};