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
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsISupports.idl"
interface IExchangeClient;
interface IExchangeSimpleOperationListener;
interface nsIMsgWindow;
/**
* IEwsIncomingServer is intended as a workaround for limitations in the folder
* lookup service.
*
* EWS folders require an EWS 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 IEwsIncomingServer : 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 EWS Server */
attribute AUTF8String ewsUrl;
/** Whether or not to override default OAuth issuer details. */
attribute boolean ewsOverrideOAuthDetails;
/** Override value for the application (client) ID. */
attribute AUTF8String ewsApplicationId;
/** Override value for the tenant ID. */
attribute AUTF8String ewsTenantId;
/** Override value for the redirect URI. */
attribute AUTF8String ewsRedirectUri;
/** Override value for the endpoint host. */
attribute AUTF8String ewsEndpointHost;
/** Override value for OAuth scopes. */
attribute AUTF8String ewsOAuthScopes;
/**
* 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 IEwsIncomingServer_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);
};