зеркало из https://github.com/mozilla/gecko-dev.git
move CIDs and ProgIDs into nsMsgLocalCID.h
This commit is contained in:
Родитель
e6387cb6bb
Коммит
8cc67d0bc8
|
@ -23,6 +23,11 @@
|
|||
#include "nsIFactory.h"
|
||||
#include "nsIComponentManager.h"
|
||||
|
||||
//
|
||||
// nsLocalMailFolderResourceCID
|
||||
//
|
||||
#define NS_LOCALMAILFOLDERRESOURCE_PROGID \
|
||||
NS_RDF_RESOURCE_FACTORY_PROGID_PREFIX "mailbox"
|
||||
#define NS_LOCALMAILFOLDERRESOURCE_CID \
|
||||
{ /* e490d22c-cd67-11d2-8cca-0060b0fc14a3 */ \
|
||||
0xe490d22c, \
|
||||
|
@ -31,40 +36,109 @@
|
|||
{0x8c, 0xca, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \
|
||||
}
|
||||
|
||||
//
|
||||
// nsPop3IncomingServer
|
||||
//
|
||||
#define NS_POP3INCOMINGSERVER_PROGID \
|
||||
"component://netscape/messenger/server&type=pop3"
|
||||
|
||||
#define NS_POP3INCOMINGSERVER_CID \
|
||||
{ /* D2876E51-E62C-11d2-B7FC-00805F05FFA5 */ \
|
||||
0xd2876e51, 0xe62c, 0x11d2, \
|
||||
{0xb7, 0xfc, 0x0, 0x80, 0x5f, 0x5, 0xff, 0xa5 }}
|
||||
|
||||
|
||||
//
|
||||
// nsMailboxMessageResource
|
||||
//
|
||||
#define NS_MAILBOXMESSAGERESOURCE_PROGID \
|
||||
NS_RDF_RESOURCE_FACTORY_PROGID_PREFIX "mailbox_message"
|
||||
#define NS_MAILBOXMESSAGERESOURCE_CID \
|
||||
{ /* b0908e06-dc06-11d2-8a46-0060b0fc04d2*/ \
|
||||
0xb0908e06,0xdc06, 0x11d2, \
|
||||
{0x8a, 0x46, 0x00, 0x60, 0xb0, 0xfc, 0x4, 0xd2} }
|
||||
|
||||
|
||||
//
|
||||
// nsMsgMailboxService
|
||||
#define NS_MAILBOXSERVICE_PROGID1 \
|
||||
"component://netscape/messenger/mailboxservice"
|
||||
|
||||
#define NS_MAILBOXSERVICE_PROGID2 \
|
||||
"component://netscape/messenger/messageservice;type=mailbox"
|
||||
|
||||
#define NS_MAILBOXSERVICE_PROGID3 \
|
||||
"component://netscape/messenger/messageservice;type=mailbox_message"
|
||||
|
||||
#define NS_MAILBOXSERVICE_PROGID4 \
|
||||
NS_NETWORK_PROTOCOL_PROGID_PREFIX "mailbox"
|
||||
|
||||
#define NS_MAILBOXSERVICE_CID \
|
||||
{ /* EEF82462-CB69-11d2-8065-006008128C4E */ \
|
||||
0xeef82462, 0xcb69, 0x11d2, \
|
||||
{0x80, 0x65, 0x0, 0x60, 0x8, 0x12, 0x8c, 0x4e}}
|
||||
|
||||
|
||||
//
|
||||
// nsMailboxUrl
|
||||
//
|
||||
#define NS_MAILBOXURL_PROGID \
|
||||
"component://netscape/messenger/mailboxurl"
|
||||
|
||||
/* 46EFCB10-CB6D-11d2-8065-006008128C4E */
|
||||
#define NS_MAILBOXURL_CID \
|
||||
{ 0x46efcb10, 0xcb6d, 0x11d2, \
|
||||
{ 0x80, 0x65, 0x0, 0x60, 0x8, 0x12, 0x8c, 0x4e } }
|
||||
|
||||
|
||||
//
|
||||
// nsPop3Url
|
||||
//
|
||||
#define NS_POP3URL_PROGID \
|
||||
"component://netscape/messenger/popurl"
|
||||
|
||||
/* EA1B0A11-E6F4-11d2-8070-006008128C4E */
|
||||
#define NS_POP3URL_CID \
|
||||
{ 0xea1b0a11, 0xe6f4, 0x11d2, \
|
||||
{ 0x80, 0x70, 0x0, 0x60, 0x8, 0x12, 0x8c, 0x4e } }
|
||||
|
||||
|
||||
//
|
||||
// nsPop3Service
|
||||
//
|
||||
#define NS_POP3SERVICE_PROGID1 \
|
||||
"component://netscape/messenger/popservice"
|
||||
|
||||
#define NS_POP3SERVICE_PROGID2 \
|
||||
NS_NETWORK_PROTOCOL_PROGID_PREFIX "pop3"
|
||||
|
||||
#define NS_POP3SERVICE_CID \
|
||||
{ /* 3BB459E3-D746-11d2-806A-006008128C4E} */ \
|
||||
0x3bb459e3, 0xd746, 0x11d2, \
|
||||
{ 0x80, 0x6a, 0x0, 0x60, 0x8, 0x12, 0x8c, 0x4e }}
|
||||
|
||||
//
|
||||
// nsParseMailMsgState
|
||||
//
|
||||
#define NS_PARSEMAILMSGSTATE_PROGID \
|
||||
"component://netscape/messenger/messagestateparser"
|
||||
|
||||
#define NS_PARSEMAILMSGSTATE_CID \
|
||||
{ /* 2B79AC51-1459-11d3-8097-006008128C4E */ \
|
||||
0x2b79ac51, 0x1459, 0x11d3, \
|
||||
{0x80, 0x97, 0x0, 0x60, 0x8, 0x12, 0x8c, 0x4e} }
|
||||
|
||||
//
|
||||
// nsMsgMailboxParser
|
||||
//
|
||||
|
||||
#define NS_MAILBOXPARSER_PROGID \
|
||||
"component://netscape/messenger/mailboxparser"
|
||||
|
||||
/* 46EFCB10-CB6D-11d2-8065-006008128C4E */
|
||||
#define NS_MAILBOXPARSER_CID \
|
||||
{ 0x8597ab60, 0xd4e2, 0x11d2, \
|
||||
{ 0x80, 0x69, 0x0, 0x60, 0x8, 0x12, 0x8c, 0x4e } }
|
||||
|
||||
|
||||
|
||||
#endif // nsMsgLocalCID_h__
|
||||
|
|
|
@ -247,73 +247,84 @@ NSRegisterSelf(nsISupports* aServMgr, const char* path)
|
|||
NS_WITH_SERVICE1(nsIComponentManager, compMgr, aServMgr, kComponentManagerCID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
rv = compMgr->RegisterComponent(kMailboxUrlCID, nsnull, nsnull,
|
||||
rv = compMgr->RegisterComponent(kMailboxUrlCID,
|
||||
"Mailbox URL",
|
||||
NS_MAILBOXURL_PROGID,
|
||||
path, PR_TRUE, PR_TRUE);
|
||||
if (NS_FAILED(rv)) finalResult = rv;
|
||||
|
||||
rv = compMgr->RegisterComponent(kMailboxServiceCID, nsnull,
|
||||
"component://netscape/messenger/mailboxservice",
|
||||
rv = compMgr->RegisterComponent(kMailboxServiceCID,
|
||||
"Mailbox Service",
|
||||
NS_MAILBOXSERVICE_PROGID1,
|
||||
path, PR_TRUE, PR_TRUE);
|
||||
if (NS_FAILED(rv)) finalResult = rv;
|
||||
|
||||
rv = compMgr->RegisterComponent(kMailboxServiceCID, nsnull,
|
||||
"component://netscape/messenger/messageservice;type=mailbox",
|
||||
rv = compMgr->RegisterComponent(kMailboxServiceCID,
|
||||
"Mailbox Service",
|
||||
NS_MAILBOXSERVICE_PROGID2,
|
||||
path, PR_TRUE, PR_TRUE);
|
||||
if (NS_FAILED(rv)) finalResult = rv;
|
||||
|
||||
rv = compMgr->RegisterComponent(kMailboxServiceCID, nsnull,
|
||||
"component://netscape/messenger/messageservice;type=mailbox_message",
|
||||
rv = compMgr->RegisterComponent(kMailboxServiceCID,
|
||||
"Mailbox Service",
|
||||
NS_MAILBOXSERVICE_PROGID3,
|
||||
path, PR_TRUE, PR_TRUE);
|
||||
if (NS_FAILED(rv)) finalResult = rv;
|
||||
|
||||
rv = compMgr->RegisterComponent(kMailboxServiceCID,
|
||||
"Mailbox Protocol Handler",
|
||||
NS_NETWORK_PROTOCOL_PROGID_PREFIX "mailbox",
|
||||
path, PR_TRUE, PR_TRUE);
|
||||
if (NS_FAILED(rv)) finalResult = rv;
|
||||
|
||||
rv = compMgr->RegisterComponent(kMailboxParserCID, nsnull, nsnull,
|
||||
"Mailbox Protocol Handler",
|
||||
NS_MAILBOXSERVICE_PROGID4,
|
||||
path, PR_TRUE, PR_TRUE);
|
||||
if (NS_FAILED(rv)) finalResult = rv;
|
||||
|
||||
rv = compMgr->RegisterComponent(kPop3UrlCID, nsnull, nsnull,
|
||||
path, PR_TRUE, PR_TRUE);
|
||||
rv = compMgr->RegisterComponent(kMailboxParserCID,
|
||||
"Mailbox Parser",
|
||||
NS_MAILBOXPARSER_PROGID,
|
||||
path, PR_TRUE, PR_TRUE);
|
||||
if (NS_FAILED(rv)) finalResult = rv;
|
||||
|
||||
rv = compMgr->RegisterComponent(kPop3ServiceCID, nsnull,
|
||||
"component://netscape/messenger/popservice",
|
||||
path, PR_TRUE, PR_TRUE);
|
||||
rv = compMgr->RegisterComponent(kPop3UrlCID,
|
||||
"Pop3 URL"
|
||||
NS_POP3URL_PROGID,
|
||||
nsnull,
|
||||
path, PR_TRUE, PR_TRUE);
|
||||
if (NS_FAILED(rv)) finalResult = rv;
|
||||
|
||||
rv = compMgr->RegisterComponent(kPop3ServiceCID,
|
||||
"Pop3 Service",
|
||||
NS_POP3SERVICE_PROGID1,
|
||||
path, PR_TRUE, PR_TRUE);
|
||||
if (NS_FAILED(rv)) finalResult = rv;
|
||||
|
||||
rv = compMgr->RegisterComponent(kPop3ServiceCID,
|
||||
"POP Protocol Handler",
|
||||
NS_NETWORK_PROTOCOL_PROGID_PREFIX "pop3",
|
||||
path, PR_TRUE, PR_TRUE);
|
||||
"POP Protocol Handler",
|
||||
NS_POP3SERVICE_PROGID2,
|
||||
path, PR_TRUE, PR_TRUE);
|
||||
|
||||
if (NS_FAILED(rv)) finalResult = rv;
|
||||
|
||||
// register our RDF resource factories:
|
||||
rv = compMgr->RegisterComponent(kLocalMailFolderResourceCID,
|
||||
"Local Mail Folder Resource Factory",
|
||||
NS_RDF_RESOURCE_FACTORY_PROGID_PREFIX "mailbox",
|
||||
NS_LOCALMAILFOLDERRESOURCE_PROGID,
|
||||
path, PR_TRUE, PR_TRUE);
|
||||
if (NS_FAILED(rv)) finalResult = rv;
|
||||
|
||||
rv = compMgr->RegisterComponent(kMailboxMessageResourceCID,
|
||||
"Local Message Resource Factory",
|
||||
NS_RDF_RESOURCE_FACTORY_PROGID_PREFIX "mailbox_message",
|
||||
NS_MAILBOXMESSAGERESOURCE_PROGID,
|
||||
path, PR_TRUE, PR_TRUE);
|
||||
if (NS_FAILED(rv)) finalResult = rv;
|
||||
|
||||
rv = compMgr->RegisterComponent(kPop3IncomingServerCID,
|
||||
"Pop3 Incoming Server",
|
||||
"component://netscape/messenger/server&type=pop3",
|
||||
NS_POP3INCOMINGSERVER_PROGID,
|
||||
path, PR_TRUE, PR_TRUE);
|
||||
|
||||
if (NS_FAILED(rv)) finalResult = rv;
|
||||
rv = compMgr->RegisterComponent(kParseMailMsgStateCID,
|
||||
"Parse MailMessage State",
|
||||
"component://netscape/messenger/messagestateparser",
|
||||
NS_PARSEMAILMSGSTATE_PROGID,
|
||||
path, PR_TRUE, PR_TRUE);
|
||||
|
||||
|
||||
|
|
|
@ -150,13 +150,6 @@ inline int nsParseMailMessageState::msg_UnHex(char C)
|
|||
((C >= 'a' && C <= 'f') ? C - 'a' + 10 : 0)));
|
||||
}
|
||||
|
||||
// give the mailbox parser a CID so we can go through a factory to create an instance of the mailbox...
|
||||
/* 46EFCB10-CB6D-11d2-8065-006008128C4E */
|
||||
|
||||
#define NS_MAILBOXPARSER_CID \
|
||||
{ 0x8597ab60, 0xd4e2, 0x11d2, \
|
||||
{ 0x80, 0x69, 0x0, 0x60, 0x8, 0x12, 0x8c, 0x4e } }
|
||||
|
||||
// This class is part of the mailbox parsing state machine
|
||||
class nsMsgMailboxParser : public nsIStreamListener, public nsParseMailMessageState, public nsMsgLineBuffer, public nsMsgLineBufferHandler
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче