nsIMsgIncomingServer 编辑

nsIMsgIncomingServer

mailnews/base/public/nsIMsgIncomingServer.idlScriptable ??? Add brief description of Interface ??? Inherits from: nsISupports Last changed in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0)

Method overview

void clearAllValues();
void clearTemporaryReturnReceiptsFilter();
void closeCachedConnections();
void configureTemporaryFilters(in nsIMsgFilterList filterList);
void configureTemporaryReturnReceiptsFilter(in nsIMsgFilterList filterList); Obsolete since Gecko 1.8
void displayOfflineMsg(in nsIMsgWindow aWindow);
boolean equals(in nsIMsgIncomingServer server);
void forgetPassword();
void forgetSessionPassword();
AString generatePrettyNameForMigration();
boolean getBoolAttribute(in string name);
boolean getBoolValue(in string attr);
ACString getCharAttribute(in string name);
ACString getCharValue(in string attr);
nsILocalFile getFileValue(in string relpref, in string abspref);
nsIMsgFilterList getFilterList(in nsIMsgWindow aMsgWindow);
long getIntAttribute(in string name);
long getIntValue(in string attr);
nsIMsgFolder getMsgFolderFromURI(in nsIMsgFolder aFolderResource, in ACString aURI);
void getNewMessages(in nsIMsgFolder aFolder, in nsIMsgWindow aMsgWindow, in nsIUrlListener aUrlListener);
ACString getPasswordWithUI(in AString aPromptString, in AString aPromptTitle, in nsIMsgWindow aMsgWindow, out boolean okayValue);
AString getUnicharAttribute(in string name);
AString getUnicharValue(in string attr);
boolean isNewHdrDuplicate(in nsIMsgDBHdr aNewHdr);
void onUserOrHostNameChanged(in ACString oldName, in ACString newName);
void performBiff(in nsIMsgWindow aMsgWindow);
void performExpand(in nsIMsgWindow aMsgWindow);
void removeFiles();
void setBoolAttribute(in string name, in boolean value);
void setBoolValue(in string attr, in boolean value);
void setCharAttribute(in string name, in ACString value);
void setCharValue(in string attr, in ACString value);
void setDefaultLocalPath(in nsILocalFile aDefaultLocalPath);
void setFileValue(in string relpref, in string abspref, in nsILocalFile aValue);
void setFilterList(in nsIMsgFilterList aFilterList);
void setIntAttribute(in string name, in long value);
void setIntValue(in string attr, in long value);
void setUnicharAttribute(in string name, in AString value);
void setUnicharValue(in string attr, in AString value);
void shutdown();
void storePassword();
AString toString();
void writeToFolderCache(in nsIMsgFolderCache folderCache);

Attributes

AttributeTypeDescription
accountManagerChromeAStringRead only.
biffMinuteslong 
biffStateunsigned long 
canBeDefaultServerbooleanRead only.
canCompactFoldersOnServerbooleanRead only.
canCreateFoldersOnServerboolean 
canDeletebooleancan this server be removed from the account manager? for instance, local mail is not removable, but an imported folder is.
canEmptyTrashOnExitbooleanRead only.
canFileMessagesOnServerboolean 
canHaveFiltersbooleanRead only.
canSearchMessagesbooleanRead only.
canUndoDeleteOnServerbooleanRead only.
constructedPrettyNameAStringhelper function to construct the pretty name in a server type specific way - for example, mail for foo@test.com, news on news.mozilla.org. Read only.
defaultCopiesAndFoldersPrefsToServerboolean

If the server supports Fcc/Sent/etc, default prefs can point to the server. Otherwise, copies and folders prefs should point to Local Folders.

By default this value is set to true via global pref 'allows_specialfolders_usage' (mailnews.js). For Nntp, the value is overridden to be false. If ISPs want to modify this value, they should do that in their rdf file by using this attribute. Please look at mozilla/mailnews/base/ispdata/aol.rdf for usage example.
displayStartupPageboolean 
doBiffboolean 
downloadMessagesAtStartupbooleanRead only.
downloadOnBiffboolean 
downloadSettingsnsIMsgDownloadSettings 
emptyTrashOnExitboolean 
filterScopensMsgSearchScopeValueRead only.
hostNameACStringhostname of the server.
incomingDuplicateActionlong
isDeferredTobooleanRead only.
isSecureboolean 
isSecureServerbooleanRead only.
keyACStringinternal pref key - guaranteed to be unique across all servers.
limitOfflineMessageSizeboolean 
localPathnsILocalFile 
localStoreTypeACStringthe schema for the local mail store, such as "mailbox", "imap", or "news" used to construct URIs. Read only.
loginAtStartUpboolean 
logonFallbackboolean
maxMessageSizelong 
offlineSupportLevellong 
passwordACString 
passwordPromptRequiredbooleanIf the password for the server is available either via authentication in the current session or from password manager stored entries, return false. Otherwise, return true. If password is obtained from password manager, set the password member variable. Read only.
performingBiffboolean 
portlong 
prettyNameAStringpretty name - should be "userid on hostname" if the pref is not set.
realHostNameACStringreal hostname of the server (if server name is changed it is stored here)
realUsernameACStringreal username of the server (if username is changed it is stored here)
redirectorTypestringObsolete since Gecko 1.9
rememberPasswordboolean 
retentionSettingsnsIMsgRetentionSettings 
rootFoldernsIMsgFolder 
rootMsgFoldernsIMsgFolderRead only.
searchScopensMsgSearchScopeValueRead only.
serverBusyboolean 
serverRequiresPasswordForBiffbooleanRead only.
serverURIACStringRead only.
socketTypelong
spamFilterPluginnsIMsgFilterPluginRead only.
spamSettingsnsISpamSettingsspam settings. Read only.
supportsDiskSpacebooleanRead only.
typeACStringprotocol type, that is "pop3", "imap", "nntp", "none", and so on. used to construct URLs.
usernameACStringuserid to log into the server.
useSecAuthboolean 
validboolean 

Constants

ConstantValueDescription
defaultSocket0
tryTLS1
alwaysUseTLS2
useSSL3
keepDups0
deleteDups1
moveDupsToTrash2
markDupsRead3

Methods

clearAllValues()

this is really dangerous. this destroys all pref values do not call this unless you know what you're doing!

void clearAllValues();
Parameters

None.

Exceptions thrown
Missing Exception
Missing Description

clearTemporaryReturnReceiptsFilter()

If Sent folder pref is changed we need to clear the temporary return receipt filter so that the new return receipt filter can be recreated (by ConfigureTemporaryReturnReceiptsFilter()).

void clearTemporaryReturnReceiptsFilter();
Parameters

None.

Exceptions thrown
Missing Exception
Missing Description

closeCachedConnections()

void closeCachedConnections();
Parameters

None.

Exceptions thrown
Missing Exception
Missing Description

configureTemporaryFilters()

for mail, this configures both the MDN filter, and the server-side spam filter filters, if needed.

If we have set up to filter return receipts into our Sent folder, this utility method creates a filter to do that, and adds it to our filterList if it doesn't exist. If it does, it will enable it.

this is not used by news filters (yet).

void configureTemporaryFilters(
  in nsIMsgFilterList filterList
);
Parameters
filterList
Missing Description
Exceptions thrown
Missing Exception
Missing Description

configureTemporaryReturnReceiptsFilter()

Obsolete since Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0)

If we have set up to filter return receipts into our Sent folder, this utility method creates a filter to do that, and adds it to our filterList if it doesn't exist. If it does, it will enable it.

If the user changes their prefs, to leave the return receipt in the inbox, this will disable the existing return receipts filter, if it exists.

void configureTemporaryReturnReceiptsFilter(
  in nsIMsgFilterList filterList
);
Parameters
filterList
Missing Description
Exceptions thrown
Missing Exception
Missing Description

displayOfflineMsg()

void displayOfflineMsg(
  in nsIMsgWindow aWindow
);
Parameters
aWindow
Missing Description
Exceptions thrown
Missing Exception
Missing Description

equals()

boolean equals(
  in nsIMsgIncomingServer server
);
Parameters
server
Missing Description
Return value

Missing Description

Exceptions thrown
Missing Exception
Missing Description

forgetPassword()

void forgetPassword();
Parameters

None.

Exceptions thrown
Missing Exception
Missing Description

forgetSessionPassword()

void forgetSessionPassword();
Parameters

None.

Exceptions thrown
Missing Exception
Missing Description

generatePrettyNameForMigration()

AString generatePrettyNameForMigration();
Parameters

None.

Return value

Missing Description

Exceptions thrown
Missing Exception
Missing Description

getBoolAttribute()

boolean getBoolAttribute(
  in string name
);
Parameters
name
Missing Description
Return value

Missing Description

Exceptions thrown
Missing Exception
Missing Description

getBoolValue()

boolean getBoolValue(
  in string attr
);
Parameters
attr
Missing Description
Return value

Missing Description

Exceptions thrown
Missing Exception
Missing Description

getCharAttribute()

ACString getCharAttribute(
  in string name
);
Parameters
name
Missing Description
Return value

Missing Description

Exceptions thrown
Missing Exception
Missing Description

getCharValue()

ACString getCharValue(
  in string attr
);
Parameters
attr
Missing Description
Return value

Missing Description

Exceptions thrown
Missing Exception
Missing Description

getFileValue()

nsILocalFile getFileValue(
  in string relpref,
  in string abspref
);
Parameters
relpref
Missing Description
abspref
Missing Description
Return value

Missing Description

Exceptions thrown
Missing Exception
Missing Description

getFilterList()

nsIMsgFilterList getFilterList(
  in nsIMsgWindow aMsgWindow
);
Parameters
aMsgWindow
Missing Description
Return value

Missing Description

Exceptions thrown
Missing Exception
Missing Description

getIntAttribute()

long getIntAttribute(
  in string name
);
Parameters
name
Missing Description
Return value

Missing Description

Exceptions thrown
Missing Exception
Missing Description

getIntValue()

long getIntValue(
  in string attr
);
Parameters
attr
Missing Description
Return value

Missing Description

Exceptions thrown
Missing Exception
Missing Description

getMsgFolderFromURI()

nsIMsgFolder getMsgFolderFromURI(
  in nsIMsgFolder aFolderResource,
  in ACString aURI
);
Parameters
aFolderResource
Missing Description
aURI
Missing Description
Return value

Missing Description

Exceptions thrown
Missing Exception
Missing Description

getNewMessages()

void getNewMessages(
  in nsIMsgFolder aFolder,
  in nsIMsgWindow aMsgWindow,
  in nsIUrlListener aUrlListener
);
Parameters
aFolder
Missing Description
aMsgWindow
Missing Description
aUrlListener
Missing Description
Exceptions thrown
Missing Exception
Missing Description

getPasswordWithUI()

ACString getPasswordWithUI(
  in AString aPromptString,
  in AString aPromptTitle,
  in nsIMsgWindow aMsgWindow,
  out boolean okayValue
);
Parameters
aPromptString
Missing Description
aPromptTitle
Missing Description
aMsgWindow
Missing Description
okayValue
Missing Description
Return value

Missing Description

Exceptions thrown
Missing Exception
Missing Description

getUnicharAttribute()

these generic getter / setters, useful for extending mailnews note, these attributes persist across sessions.

AString getUnicharAttribute(
  in string name
);
Parameters
name
Missing Description
Return value

Missing Description

Exceptions thrown
Missing Exception
Missing Description

getUnicharValue()

AString getUnicharValue(
  in string attr
);
Parameters
attr
Missing Description
Return value

Missing Description

Exceptions thrown
Missing Exception
Missing Description

isNewHdrDuplicate()

boolean isNewHdrDuplicate(
  in nsIMsgDBHdr aNewHdr
);
Parameters
aNewHdr
Missing Description
Return value

Missing Description

Exceptions thrown
Missing Exception
Missing Description

onUserOrHostNameChanged()

void onUserOrHostNameChanged(
  in ACString oldName,
  in ACString newName
);
Parameters
oldName
Missing Description
newName
Missing Description
Exceptions thrown
Missing Exception
Missing Description

performBiff()

void performBiff(
  in nsIMsgWindow aMsgWindow
);
Parameters
aMsgWindow
Missing Description
Exceptions thrown
Missing Exception
Missing Description

performExpand()

void performExpand(
  in nsIMsgWindow aMsgWindow
);
Parameters
aMsgWindow
Missing Description
Exceptions thrown
Missing Exception
Missing Description

removeFiles()

this is also very dangerous. this will remove the files associated with this server on disk.

void removeFiles();
Parameters

None.

Exceptions thrown
Missing Exception
Missing Description

setBoolAttribute()

void setBoolAttribute(
  in string name,
  in boolean value
);
Parameters
name
Missing Description
value
Missing Description
Exceptions thrown
Missing Exception
Missing Description

setBoolValue()

void setBoolValue(
  in string attr,
  in boolean value
);
Parameters
attr
Missing Description
value
Missing Description
Exceptions thrown
Missing Exception
Missing Description

setCharAttribute()

void setCharAttribute(
  in string name,
  in ACString value
);
Parameters
name
Missing Description
value
Missing Description
Exceptions thrown
Missing Exception
Missing Description

setCharValue()

void setCharValue(
  in string attr,
  in ACString value
);
Parameters
attr
Missing Description
value
Missing Description
Exceptions thrown
Missing Exception
Missing Description

setDefaultLocalPath()

void setDefaultLocalPath(
  in nsILocalFile aDefaultLocalPath
);
Parameters
aDefaultLocalPath
Missing Description
Exceptions thrown
Missing Exception
Missing Description

setFileValue()

void setFileValue(
  in string relpref,
  in string abspref,
  in nsILocalFile aValue
);
Parameters
relpref
Missing Description
abspref
Missing Description
aValue
Missing Description
Exceptions thrown
Missing Exception
Missing Description

setFilterList()

void setFilterList(
  in nsIMsgFilterList aFilterList
);
Parameters
aFilterList
Missing Description
Exceptions thrown
Missing Exception
Missing Description

setIntAttribute()

void setIntAttribute(
  in string name,
  in long value
);
Parameters
name
Missing Description
value
Missing Description
Exceptions thrown
Missing Exception
Missing Description

setIntValue()

void setIntValue(
  in string attr,
  in long value
);
Parameters
attr
Missing Description
value
Missing Description
Exceptions thrown
Missing Exception
Missing Description

setUnicharAttribute()

void setUnicharAttribute(
  in string name,
  in AString value
);
Parameters
name
Missing Description
value
Missing Description
Exceptions thrown
Missing Exception
Missing Description

setUnicharValue()

void setUnicharValue(
  in string attr,
  in AString value
);
Parameters
attr
Missing Description
value
Missing Description
Exceptions thrown
Missing Exception
Missing Description

shutdown()

void shutdown();
Parameters

None.

Exceptions thrown
Missing Exception
Missing Description

storePassword()

logon succeeded - persist password, if user chooses.

void storePassword();
Parameters

None.

Exceptions thrown
Missing Exception
Missing Description

toString()

AString toString();
Parameters

None.

Return value

Missing Description

Exceptions thrown
Missing Exception
Missing Description

writeToFolderCache()

void writeToFolderCache(
  in nsIMsgFolderCache folderCache
);
Parameters
folderCache
Missing Description
Exceptions thrown
Missing Exception
Missing Description

Remarks

 

See also

    如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

    扫码二维码加入Web技术交流群

    发布评论

    需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
    列表为空,暂无数据

    词条统计

    浏览:59 次

    字数:41848

    最后编辑:6 年前

    编辑次数:0 次

      我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
      原文