Revision control
Copy as Markdown
Other Tools
/* 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"
interface IExchangeClient;
interface IExchangeSimpleOperationListener;
interface nsIMsgWindow;
/**
* IExchangeIncomingServer is intended as a workaround for limitations in the folder
* lookup service.
*
* Exchange folders require an Exchange client object in order to fetch new messages. The
* folder itself, however, does not have access to all of the details needed to
* create such a client. This information is part of the incoming server.
*
* Due to depending on the folder lookup service to create new folders, it is
* not possible to give the folder a direct handle to its associated server, so
* we are forced to go through XPCOM.
*/
[scriptable, uuid(3b22cadc-da49-11ee-99b2-b42e99ed15ca)]
interface IExchangeIncomingServer : nsISupports
{
/**
* Whether the protocol client is currently running.
*
* This will be false if no protocol client has been initialized (via
* `getProtocolClient()`) yet. If the server is in the process of shutting
* down, this will return false only once the protocol client has fully shut
* down.
*/
readonly attribute boolean protocolClientRunning;
/**
* Whether the protocol client is currently idle, i.e. fully waiting for new
* operations to happen.
*
* This is `false` if `protocolClientRunning` is `false`.
*/
readonly attribute boolean protocolClientIdle;
/**
* Get the client for interacting with the remote server protocol, creating a
* new one if one hasn't already been created.
*/
IExchangeClient getProtocolClient();
/** The URL for the Exchange Server */
attribute AUTF8String exchangeUrl;
/** Whether or not to override default OAuth issuer details. */
attribute boolean exchangeOverrideOAuthDetails;
/** Override value for the application (client) ID. */
attribute AUTF8String exchangeApplicationId;
/** Override value for the tenant ID. */
attribute AUTF8String exchangeTenantId;
/** Override value for the redirect URI. */
attribute AUTF8String exchangeRedirectUri;
/** Override value for the endpoint host. */
attribute AUTF8String exchangeEndpointHost;
/** Override value for OAuth scopes. */
attribute AUTF8String exchangeOAuthScopes;
/**
* An enumeration of what to do when we delete an item.
*
* For a value of 0, we permanently remove the item.
* For a value of 1, we move the item to the trash folder.
*
* The value of 1 is used for move to trash to align defaults with
* nsIImapIncomingServer.
*/
cenum DeleteModel : 8 {
PERMANENTLY_DELETE,
MOVE_TO_TRASH,
};
/** The action to be taken upon message delete. */
attribute IExchangeIncomingServer_DeleteModel deleteModel;
/** The server path to use as the trash folder. */
attribute AUTF8String trashFolderPath;
/**
* Perform a sync for the full folder hierarchy.
*
* The specified `listener` will be notified when the sync operation has
* completed. The `window` provides the window context (if available) for
* updates.
*/
void syncFolderHierarchy(in IExchangeSimpleOperationListener listener, in nsIMsgWindow window);
};