зеркало из https://github.com/mozilla/gecko-dev.git
**NOT Part of the build yet**
Here's a fully scriptable version of nsIImapUrl. We used to only have a .h file for this interface. When this file is part of the build,nsIImapUrl.h will become obsolete.
This commit is contained in:
Родитель
3df62b94ad
Коммит
3a07f7ef36
|
@ -0,0 +1,153 @@
|
|||
/* -*- 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) 2000 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
interface nsIImapMailFolderSink;
|
||||
interface nsIImapMessageSink;
|
||||
interface nsIImapExtensionSink;
|
||||
interface nsIImapMiscellaneousSink;
|
||||
interface nsIImapServerSink;
|
||||
interface nsIImapMockChannel;
|
||||
interface nsIFileSpec;
|
||||
|
||||
typedef long nsImapAction;
|
||||
typedef long nsImapState;
|
||||
typedef unsigned short imapMessageFlagsType;
|
||||
|
||||
[scriptable, uuid(AEAA246D-F9E2-11d3-98BA-001083010E9B)]
|
||||
interface nsIImapUrl : nsISupports
|
||||
{
|
||||
// Initialization method used to initialize the url...
|
||||
void Initialize();
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Getters and Setters for the imap specific event sinks to bind to to your url
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
attribute nsIImapMailFolderSink imapMailFolderSink;
|
||||
attribute nsIImapMessageSink imapMessageSink;
|
||||
[noscript] attribute nsIImapExtensionSink imapExtensionSink;
|
||||
[noscript] attribute nsIImapMiscellaneousSink imapMiscellaneousSink;
|
||||
attribute nsIImapServerSink imapServerSink;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Getters and Setters for the imap url state
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
attribute nsImapAction imapAction;
|
||||
readonly attribute nsImapState requiredImapState;
|
||||
readonly attribute string imapPartToFetch;
|
||||
void allocateCanonicalPath(in string aServerPath, in char aOnlineDelimiter, out string aAllocatedPath);
|
||||
void allocateServerPath(in string aCanonicalPath, in char aOnlineDelimiter, out string aAllocatedPath);
|
||||
string createServerSourceFolderPathString();
|
||||
string createCanonicalSourceFolderPathString();
|
||||
string createServerDestinationFolderPathString();
|
||||
|
||||
string addOnlineDirectoryIfNecessary(in string onlineMailboxName);
|
||||
void createSearchCriteriaString (out string aResult);
|
||||
void createListOfMessageIdsString (out string aResult);
|
||||
|
||||
boolean messageIdsAreUids();
|
||||
readonly attribute imapMessageFlagsType msgFlags; // kAddMsgFlags or kSubtractMsgFlags only
|
||||
readonly attribute long childDiscoveryDepth;
|
||||
|
||||
attribute char onlineSubDirSeparator;
|
||||
attribute boolean allowContentChange;
|
||||
attribute nsISupports copyState;
|
||||
attribute nsIFileSpec msgFileSpec;
|
||||
attribute nsIImapMockChannel mockChannel;
|
||||
|
||||
void addChannelToLoadGroup();
|
||||
void removeChannel(in nsresult aStatus);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Enumerated types specific to imap urls...
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// the following are nsImapState enums.
|
||||
// we have a basic set of imap url actions. These actions are nsImapActions.
|
||||
// Certain actions require us to be in the authenticated state and others require us to
|
||||
// be in the selected state. nsImapState is used to store the state the url needs to
|
||||
// be in. You'll later see us refer to the imap url state in the imap protocol when we
|
||||
// are processing the current url. Don't confuse nsImapState with the generic url state
|
||||
// used to keep track of whether the url is running or not...
|
||||
const long nsImapAuthenticatedState = 0;
|
||||
const long nsImapSelectedState = 1;
|
||||
|
||||
const long nsImapActionSendText = 0; // a state used for testing purposes to send raw url text straight to the server....
|
||||
// nsImapAuthenticatedStateUrl urls
|
||||
// since the following url actions require us to be in the authenticated
|
||||
// state, the high bit is left blank....
|
||||
const long nsImapTest = 0x00000001;
|
||||
const long nsImapCreateFolder = 0x00000005;
|
||||
const long nsImapDeleteFolder = 0x00000006;
|
||||
const long nsImapRenameFolder = 0x00000007;
|
||||
const long nsImapMoveFolderHierarchy = 0x00000008;
|
||||
const long nsImapLsubFolders = 0x00000009;
|
||||
const long nsImapGetMailAccountUrl = 0x0000000A;
|
||||
const long nsImapDiscoverChildrenUrl = 0x0000000B;
|
||||
const long nsImapDiscoverLevelChildrenUrl = 0x0000000C;
|
||||
const long nsImapDiscoverAllBoxesUrl = 0x0000000D;
|
||||
const long nsImapDiscoverAllAndSubscribedBoxesUrl = 0x0000000E;
|
||||
const long nsImapAppendMsgFromFile = 0x0000000F;
|
||||
const long nsImapSubscribe = 0x00000010;
|
||||
const long nsImapUnsubscribe = 0x00000011;
|
||||
const long nsImapRefreshACL = 0x00000012;
|
||||
const long nsImapRefreshAllACLs = 0x00000013;
|
||||
const long nsImapListFolder = 0x00000014;
|
||||
const long nsImapUpgradeToSubscription = 0x00000015;
|
||||
const long nsImapFolderStatus = 0x00000016;
|
||||
const long nsImapRefreshFolderUrls = 0x00000017;
|
||||
// it's okay to add more imap actions that require us to
|
||||
// be in the authenticated state here without renumbering
|
||||
// the imap selected state url actions. just make sure you don't
|
||||
// set the high bit...
|
||||
|
||||
// nsImapSelectedState urls. Note, the high bit is always set for
|
||||
// imap actions which require us to be in the selected state
|
||||
const long nsImapSelectFolder = 0x10000002;
|
||||
const long nsImapLiteSelectFolder = 0x10000003;
|
||||
const long nsImapExpungeFolder = 0x10000004;
|
||||
const long nsImapMsgFetch = 0x10000018;
|
||||
const long nsImapMsgHeader = 0x10000019;
|
||||
const long nsImapSearch = 0x1000001A;
|
||||
const long nsImapDeleteMsg = 0x1000001B;
|
||||
const long nsImapDeleteAllMsgs = 0x1000001C;
|
||||
const long nsImapAddMsgFlags = 0x1000001D;
|
||||
const long nsImapSubtractMsgFlags = 0x1000001E;
|
||||
const long nsImapSetMsgFlags = 0x1000001F;
|
||||
const long nsImapOnlineCopy = 0x10000020;
|
||||
const long nsImapOnlineMove = 0x10000021;
|
||||
const long nsImapOnlineToOfflineCopy = 0x10000022;
|
||||
const long nsImapOnlineToOfflineMove = 0x10000023;
|
||||
const long nsImapOfflineToOnlineCopy = 0x10000024;
|
||||
const long nsImapOfflineToOnlineMove = 0x10000025;
|
||||
const long nsImapBiff = 0x10000026;
|
||||
const long nsImapSelectNoopFolder = 0x10000027;
|
||||
const long nsImapAppendDraftFromFile = 0x10000028;
|
||||
const long nsImapUidExpunge = 0x10000029;
|
||||
const long nsImapSaveMessageToDisk = 0x10000030;
|
||||
};
|
||||
|
||||
%{C++
|
||||
#define IMAP_PORT 143
|
||||
#define SECURE_IMAP_PORT 993
|
||||
%}
|
Загрузка…
Ссылка в новой задаче