mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
fix for #61845. remove all NS_DEFINE_IID and replaces the consts with NS_GET_IID macros.
thanks to rods@netscape.com for the patch. also, some other NS_DEFINE_IID/CID cleanup. sr=bienvenu.
This commit is contained in:
parent
be9d3e6e3a
commit
4fa551beb6
@ -49,8 +49,8 @@
|
||||
|
||||
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
static NS_DEFINE_IID(kCookieServiceCID, NS_COOKIESERVICE_CID);
|
||||
static NS_DEFINE_IID(kCAbSyncMojoCID, NS_AB_SYNC_MOJO_CID);
|
||||
static NS_DEFINE_CID(kCookieServiceCID, NS_COOKIESERVICE_CID);
|
||||
static NS_DEFINE_CID(kCAbSyncMojoCID, NS_AB_SYNC_MOJO_CID);
|
||||
static NS_DEFINE_CID(kAbSync, NS_ABSYNC_SERVICE_CID);
|
||||
|
||||
/*
|
||||
|
@ -58,9 +58,8 @@ static NS_DEFINE_CID(kCMorkFactory, NS_MORK_CID);
|
||||
static NS_DEFINE_CID(kAddrBookSessionCID, NS_ADDRBOOKSESSION_CID);
|
||||
static NS_DEFINE_CID(kLocaleServiceCID, NS_LOCALESERVICE_CID);
|
||||
static NS_DEFINE_CID(kCollationFactoryCID, NS_COLLATIONFACTORY_CID);
|
||||
static NS_DEFINE_IID(kICollationFactoryIID, NS_ICOLLATIONFACTORY_IID);
|
||||
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
|
||||
static NS_DEFINE_IID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
|
||||
static NS_DEFINE_CID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
|
||||
|
||||
/* The definition is nsAddressBook.cpp */
|
||||
extern const char *kCardDataSourceRoot;
|
||||
@ -3939,7 +3938,7 @@ nsresult nsAddrDatabase::GetCollationKeyGenerator()
|
||||
nsCOMPtr <nsICollationFactory> factory;
|
||||
|
||||
rv = nsComponentManager::CreateInstance(kCollationFactoryCID, NULL,
|
||||
kICollationFactoryIID, getter_AddRefs(factory));
|
||||
NS_GET_IID(nsICollationFactory), getter_AddRefs(factory));
|
||||
if (NS_SUCCEEDED(rv) && factory)
|
||||
{
|
||||
rv = factory->CreateCollation(locale, getter_AddRefs(m_collationKeyGenerator));
|
||||
|
@ -56,7 +56,7 @@
|
||||
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
|
||||
static NS_DEFINE_IID(kAppShellServiceCID, NS_APPSHELL_SERVICE_CID);
|
||||
static NS_DEFINE_CID(kAppShellServiceCID, NS_APPSHELL_SERVICE_CID);
|
||||
static NS_DEFINE_CID(kAddressBookDBCID, NS_ADDRDATABASE_CID);
|
||||
static NS_DEFINE_CID(kAddrBookSessionCID, NS_ADDRBOOKSESSION_CID);
|
||||
static NS_DEFINE_CID(kAbDirectoryCID, NS_ABDIRECTORY_CID);
|
||||
|
@ -115,6 +115,7 @@ static NS_DEFINE_CID(kMsgCopyServiceCID, NS_MSGCOPYSERVICE_CID);
|
||||
static NS_DEFINE_CID(kMsgPrintEngineCID, NS_MSG_PRINTENGINE_CID);
|
||||
static NS_DEFINE_CID(kNetSupportDialogCID, NS_NETSUPPORTDIALOG_CID);
|
||||
|
||||
|
||||
/* This is the next generation string retrieval call */
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
|
||||
@ -133,6 +134,8 @@ static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
#include "nsIContentSink.h"
|
||||
#include "nsIHTMLToTextSink.h"
|
||||
|
||||
static NS_DEFINE_CID(kCParserCID, NS_PARSER_IID);
|
||||
|
||||
static nsresult
|
||||
ConvertBufToPlainText(nsString &aConBuf)
|
||||
{
|
||||
@ -143,11 +146,8 @@ ConvertBufToPlainText(nsString &aConBuf)
|
||||
if (aConBuf.IsEmpty())
|
||||
return NS_OK;
|
||||
|
||||
static NS_DEFINE_IID(kCParserIID, NS_IPARSER_IID);
|
||||
static NS_DEFINE_IID(kCParserCID, NS_PARSER_IID);
|
||||
|
||||
rv = nsComponentManager::CreateInstance(kCParserCID, nsnull,
|
||||
kCParserIID, getter_AddRefs(parser));
|
||||
NS_GET_IID(nsIParser), getter_AddRefs(parser));
|
||||
if (NS_SUCCEEDED(rv) && parser)
|
||||
{
|
||||
nsCOMPtr<nsIContentSink> sink;
|
||||
|
@ -37,7 +37,6 @@
|
||||
#include "nsIMsgFolder.h" // TO include biffState enum. Change to bool later...
|
||||
|
||||
static NS_DEFINE_CID(kMsgAccountManagerCID, NS_MSGACCOUNTMANAGER_CID);
|
||||
static NS_DEFINE_IID(kIWindowMediatorIID, NS_IWINDOWMEDIATOR_IID);
|
||||
static NS_DEFINE_CID(kWindowMediatorCID, NS_WINDOWMEDIATOR_CID);
|
||||
static NS_DEFINE_CID(kMsgMailSessionCID, NS_MSGMAILSESSION_CID);
|
||||
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
#include "nsMsgTxn.h"
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kITransactionIID, NS_ITRANSACTION_IID);
|
||||
|
||||
NS_IMPL_THREADSAFE_ADDREF(nsMsgTxn)
|
||||
NS_IMPL_THREADSAFE_RELEASE(nsMsgTxn)
|
||||
|
@ -1960,6 +1960,8 @@ ERROR_OUT:
|
||||
#include "nsIContentSink.h"
|
||||
#include "nsICharsetConverterManager.h"
|
||||
|
||||
static NS_DEFINE_CID(kCParserCID, NS_PARSER_IID);
|
||||
|
||||
/**
|
||||
* Converts a buffer to plain text. Some conversions may
|
||||
* or may not work with certain end charsets which is why we
|
||||
@ -1976,11 +1978,8 @@ ConvertBufToPlainText(nsString &aConBuf, PRBool formatflowed /* = PR_FALSE */)
|
||||
if (aConBuf.IsEmpty())
|
||||
return NS_OK;
|
||||
|
||||
static NS_DEFINE_IID(kCParserIID, NS_IPARSER_IID);
|
||||
static NS_DEFINE_IID(kCParserCID, NS_PARSER_IID);
|
||||
|
||||
rv = nsComponentManager::CreateInstance(kCParserCID, nsnull,
|
||||
kCParserIID, getter_AddRefs(parser));
|
||||
NS_GET_IID(nsIParser), getter_AddRefs(parser));
|
||||
if (NS_SUCCEEDED(rv) && parser)
|
||||
{
|
||||
PRUint32 converterFlags = 0;
|
||||
|
@ -57,7 +57,6 @@
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
static NS_DEFINE_CID(kCMsgMailSessionCID, NS_MSGMAILSESSION_CID);
|
||||
static NS_DEFINE_CID(kSmtpServiceCID, NS_SMTPSERVICE_CID);
|
||||
static NS_DEFINE_IID(kIMsgSendLater, NS_IMSGSENDLATER_IID);
|
||||
static NS_DEFINE_CID(kMsgCompFieldsCID, NS_MSGCOMPFIELDS_CID);
|
||||
static NS_DEFINE_CID(kMsgSendCID, NS_MSGSEND_CID);
|
||||
static NS_DEFINE_CID(kISupportsArrayCID, NS_SUPPORTSARRAY_CID);
|
||||
@ -74,7 +73,7 @@ nsresult NS_NewMsgSendLater(const nsIID &aIID, void ** aInstancePtrResult)
|
||||
{
|
||||
nsMsgSendLater *pSendLater = new nsMsgSendLater();
|
||||
if (pSendLater)
|
||||
return pSendLater->QueryInterface(kIMsgSendLater, aInstancePtrResult);
|
||||
return pSendLater->QueryInterface(NS_GET_IID(nsIMsgSendLater), aInstancePtrResult);
|
||||
else
|
||||
return NS_ERROR_OUT_OF_MEMORY; /* we couldn't allocate the object */
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ static NS_DEFINE_CID(kAppShellServiceCID, NS_APPSHELL_SERVICE_CID);
|
||||
static NS_DEFINE_CID(kGenericFactoryCID, NS_GENERICFACTORY_CID);
|
||||
static NS_DEFINE_CID(kMemoryCID, NS_MEMORY_CID);
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
static NS_DEFINE_IID(kICharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_IID);
|
||||
static NS_DEFINE_CID(kICharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_IID);
|
||||
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||
|
||||
PRBool keepOnRunning = PR_TRUE;
|
||||
|
@ -86,9 +86,7 @@ static NS_DEFINE_CID(kSmtpServiceCID, NS_SMTPSERVICE_CID);
|
||||
static NS_DEFINE_CID(kFileLocatorCID, NS_FILELOCATOR_CID);
|
||||
static NS_DEFINE_CID(kEventQueueCID, NS_EVENTQUEUE_CID);
|
||||
static NS_DEFINE_CID(kMsgComposeCID, NS_MSGCOMPOSE_CID);
|
||||
static NS_DEFINE_IID(kIMsgCompFieldsIID, NS_IMSGCOMPFIELDS_IID);
|
||||
static NS_DEFINE_CID(kMsgCompFieldsCID, NS_MSGCOMPFIELDS_CID);
|
||||
static NS_DEFINE_IID(kIMsgSendIID, NS_IMSGSEND_IID);
|
||||
static NS_DEFINE_CID(kMsgSendCID, NS_MSGSEND_CID);
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
|
||||
@ -411,11 +409,11 @@ int main(int argc, char *argv[])
|
||||
if (!mailIFile)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
rv = nsComponentManager::CreateInstance(kMsgSendCID, NULL, kIMsgSendIID, (void **) &pMsgSend);
|
||||
rv = nsComponentManager::CreateInstance(kMsgSendCID, NULL, NS_GET_IID(nsIMsgSend), (void **) &pMsgSend);
|
||||
if (NS_SUCCEEDED(rv) && pMsgSend)
|
||||
{
|
||||
printf("We succesfully obtained a nsIMsgSend interface....\n");
|
||||
rv = nsComponentManager::CreateInstance(kMsgCompFieldsCID, NULL, kIMsgCompFieldsIID,
|
||||
rv = nsComponentManager::CreateInstance(kMsgCompFieldsCID, NULL, NS_GET_IID(nsIMsgCompFields),
|
||||
(void **) &pMsgCompFields);
|
||||
if (NS_SUCCEEDED(rv) && pMsgCompFields)
|
||||
{
|
||||
|
@ -88,7 +88,6 @@ static NS_DEFINE_CID(kGenericFactoryCID, NS_GENERICFACTORY_CID);
|
||||
// netlib definitions....
|
||||
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
static NS_DEFINE_IID(kICharsetConverterManagerIID, NS_ICHARSETCONVERTERMANAGER_IID);
|
||||
|
||||
nsICharsetConverterManager *ccMan = nsnull;
|
||||
|
||||
|
@ -81,7 +81,6 @@ static NS_DEFINE_CID(kFileLocatorCID, NS_FILELOCATOR_CID);
|
||||
static NS_DEFINE_CID(kEventQueueCID, NS_EVENTQUEUE_CID);
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
static NS_DEFINE_CID(kNetSupportDialogCID, NS_NETSUPPORTDIALOG_CID);
|
||||
static NS_DEFINE_IID(kIMsgSendLaterIID, NS_IMSGSENDLATER_IID);
|
||||
static NS_DEFINE_CID(kMsgSendLaterCID, NS_MSGSENDLATER_CID);
|
||||
|
||||
|
||||
@ -153,7 +152,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIMsgSendLater> pMsgSendLater;
|
||||
rv = nsComponentManager::CreateInstance(kMsgSendLaterCID, NULL, kIMsgSendLaterIID,
|
||||
rv = nsComponentManager::CreateInstance(kMsgSendLaterCID, NULL, NS_GET_IID(nsIMsgSendLater),
|
||||
(void **) getter_AddRefs(pMsgSendLater));
|
||||
if (NS_SUCCEEDED(rv) && pMsgSendLater)
|
||||
{
|
||||
|
@ -76,8 +76,8 @@
|
||||
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||
static NS_DEFINE_CID(kSmtpServiceCID, NS_SMTPSERVICE_CID);
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
static NS_DEFINE_IID(kFileLocatorCID, NS_FILELOCATOR_CID);
|
||||
static NS_DEFINE_IID(kEventQueueCID, NS_EVENTQUEUE_CID);
|
||||
static NS_DEFINE_CID(kFileLocatorCID, NS_FILELOCATOR_CID);
|
||||
static NS_DEFINE_CID(kEventQueueCID, NS_EVENTQUEUE_CID);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// Define default values to be used to drive the test
|
||||
|
@ -70,12 +70,9 @@ static NS_DEFINE_CID(kCMorkFactory, NS_MORK_CID);
|
||||
#include <stdlib.h>
|
||||
#endif /* ENABLE_TESTING_HACK */
|
||||
|
||||
static NS_DEFINE_IID(kIPrefIID, NS_IPREF_IID);
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
static NS_DEFINE_CID(kCMimeConverterCID, NS_MIME_CONVERTER_CID);
|
||||
static NS_DEFINE_CID(kCollationFactoryCID, NS_COLLATIONFACTORY_CID);
|
||||
static NS_DEFINE_IID(kICollationIID, NS_ICOLLATION_IID);
|
||||
static NS_DEFINE_IID(kICollationFactoryIID, NS_ICOLLATIONFACTORY_IID);
|
||||
static NS_DEFINE_CID(kMsgHeaderParserCID, NS_MSGHEADERPARSER_CID);
|
||||
|
||||
#define MSG_HASH_SIZE 512
|
||||
@ -2627,7 +2624,7 @@ nsresult nsMsgDatabase::GetCollationKeyGenerator()
|
||||
nsCOMPtr <nsICollationFactory> f;
|
||||
|
||||
err = nsComponentManager::CreateInstance(kCollationFactoryCID, NULL,
|
||||
kICollationFactoryIID, getter_AddRefs(f));
|
||||
NS_GET_IID(nsICollationFactory), getter_AddRefs(f));
|
||||
if (NS_SUCCEEDED(err) && f)
|
||||
{
|
||||
// get a collation interface instance
|
||||
|
@ -122,8 +122,7 @@ nsImapExtensionSinkProxy::~nsImapExtensionSinkProxy()
|
||||
NS_IF_RELEASE (m_realImapExtensionSink);
|
||||
}
|
||||
|
||||
static NS_DEFINE_IID(kIImapExtensionSinkIID, NS_IIMAPEXTENSIONSINK_IID);
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS(nsImapExtensionSinkProxy, kIImapExtensionSinkIID);
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS(nsImapExtensionSinkProxy, NS_GET_IID(nsIImapExtensionSink));
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsImapExtensionSinkProxy::ClearFolderRights(nsIImapProtocol* aProtocol,
|
||||
@ -353,8 +352,7 @@ nsImapMiscellaneousSinkProxy::~nsImapMiscellaneousSinkProxy()
|
||||
NS_IF_RELEASE (m_realImapMiscellaneousSink);
|
||||
}
|
||||
|
||||
static NS_DEFINE_IID(kIImapMiscellaneousSinkIID, NS_IIMAPMISCELLANEOUSSINK_IID);
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS(nsImapMiscellaneousSinkProxy, kIImapMiscellaneousSinkIID);
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS(nsImapMiscellaneousSinkProxy, NS_GET_IID(nsIImapMiscellaneousSink));
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsImapMiscellaneousSinkProxy::GetArbitraryHeaders(nsIImapProtocol* aProtocol,
|
||||
|
@ -113,11 +113,11 @@
|
||||
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||
static NS_DEFINE_IID(kEventQueueCID, NS_EVENTQUEUE_CID);
|
||||
static NS_DEFINE_CID(kEventQueueCID, NS_EVENTQUEUE_CID);
|
||||
static NS_DEFINE_CID(kImapUrlCID, NS_IMAPURL_CID);
|
||||
static NS_DEFINE_CID(kImapProtocolCID, NS_IMAPPROTOCOL_CID);
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
static NS_DEFINE_IID(kFileLocatorCID, NS_FILELOCATOR_CID);
|
||||
static NS_DEFINE_CID(kFileLocatorCID, NS_FILELOCATOR_CID);
|
||||
|
||||
static NS_DEFINE_CID(kCImapService, NS_IMAPSERVICE_CID);
|
||||
static NS_DEFINE_CID(kCImapDB, NS_IMAPDB_CID);
|
||||
|
@ -50,7 +50,7 @@ static NS_DEFINE_CID( kMsgCompFieldsCID, NS_MSGCOMPFIELDS_CID);
|
||||
static NS_DEFINE_CID( kMsgMailSessionCID, NS_MSGMAILSESSION_CID);
|
||||
static NS_DEFINE_CID( kIOServiceCID, NS_IOSERVICE_CID);
|
||||
static NS_DEFINE_CID( kMsgAccountMgrCID, NS_MSGACCOUNTMANAGER_CID);
|
||||
static NS_DEFINE_IID( kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
|
||||
static NS_DEFINE_CID( kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
|
||||
static NS_DEFINE_CID( kImportServiceCID, NS_IMPORTSERVICE_CID);
|
||||
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
/* This is the next generation string retrieval call */
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
static NS_DEFINE_IID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
|
||||
static NS_DEFINE_CID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
|
||||
|
||||
#define EUDORA_MSGS_URL "chrome://messenger/locale/eudoraImportMsgs.properties"
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
/* This is the next generation string retrieval call */
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
static NS_DEFINE_IID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
|
||||
static NS_DEFINE_CID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
|
||||
|
||||
#define OE_MSGS_URL "chrome://messenger/locale/oeImportMsgs.properties"
|
||||
|
||||
|
@ -49,7 +49,7 @@ static NS_DEFINE_CID( kMsgCompFieldsCID, NS_MSGCOMPFIELDS_CID);
|
||||
static NS_DEFINE_CID( kMsgMailSessionCID, NS_MSGMAILSESSION_CID);
|
||||
static NS_DEFINE_CID( kIOServiceCID, NS_IOSERVICE_CID);
|
||||
static NS_DEFINE_CID( kMsgAccountMgrCID, NS_MSGACCOUNTMANAGER_CID);
|
||||
static NS_DEFINE_IID( kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
|
||||
static NS_DEFINE_CID( kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
|
||||
|
||||
|
||||
// We need to do some calculations to set these numbers to something reasonable!
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
/* This is the next generation string retrieval call */
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
static NS_DEFINE_IID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
|
||||
static NS_DEFINE_CID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
|
||||
|
||||
#define OUTLOOK_MSGS_URL "chrome://messenger/locale/outlookImportMsgs.properties"
|
||||
|
||||
|
@ -57,13 +57,10 @@ static NS_DEFINE_CID(kAddressBookDBCID, NS_ADDRDATABASE_CID);
|
||||
static NS_DEFINE_CID(kProfileCID, NS_PROFILE_CID);
|
||||
static NS_DEFINE_CID(kAbDirectoryCID, NS_ABDIRECTORY_CID);
|
||||
static NS_DEFINE_CID(kStandardUrlCID, NS_STANDARDURL_CID);
|
||||
static NS_DEFINE_IID(kIStandardUrlIID, NS_IURL_IID);
|
||||
static NS_DEFINE_CID(kAddrBookSessionCID, NS_ADDRBOOKSESSION_CID);
|
||||
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
|
||||
static NS_DEFINE_IID(kIImportFieldMapIID, NS_IIMPORTFIELDMAP_IID);
|
||||
static NS_DEFINE_CID(kSupportsWStringCID, NS_SUPPORTS_WSTRING_CID);
|
||||
static NS_DEFINE_IID(kISupportsWStringIID, NS_ISUPPORTSWSTRING_IID);
|
||||
static NS_DEFINE_IID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
|
||||
static NS_DEFINE_CID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
|
||||
|
||||
|
||||
static const char *kDirectoryDataSourceRoot = "abdirectory://";
|
||||
@ -255,7 +252,7 @@ NS_IMETHODIMP nsImportGenericAddressBooks::GetData(const char *dataId, nsISuppor
|
||||
if (!nsCRT::strcasecmp( dataId, "addressDestination")) {
|
||||
if (m_pDestinationUri) {
|
||||
nsCOMPtr<nsIURL> url;
|
||||
rv = nsComponentManager::CreateInstance( kStandardUrlCID, nsnull, kIStandardUrlIID, getter_AddRefs( url));
|
||||
rv = nsComponentManager::CreateInstance( kStandardUrlCID, nsnull, NS_GET_IID(nsIURL), getter_AddRefs( url));
|
||||
if (NS_SUCCEEDED( rv)) {
|
||||
url->SetSpec( m_pDestinationUri);
|
||||
*_retval = url;
|
||||
@ -296,7 +293,7 @@ NS_IMETHODIMP nsImportGenericAddressBooks::GetData(const char *dataId, nsISuppor
|
||||
IMPORT_LOG1( "Requesting sample data #: %ld\n", (long)rNum);
|
||||
if (m_pInterface) {
|
||||
nsCOMPtr<nsISupportsWString> data;
|
||||
rv = nsComponentManager::CreateInstance( kSupportsWStringCID, nsnull, kISupportsWStringIID, getter_AddRefs( data));
|
||||
rv = nsComponentManager::CreateInstance( kSupportsWStringCID, nsnull, NS_GET_IID(nsISupportsWString), getter_AddRefs( data));
|
||||
if (NS_FAILED( rv))
|
||||
return( rv);
|
||||
PRUnichar * pData = nsnull;
|
||||
@ -345,7 +342,7 @@ NS_IMETHODIMP nsImportGenericAddressBooks::SetData( const char *dataId, nsISuppo
|
||||
if (!nsCRT::strcasecmp( dataId, "addressDestination")) {
|
||||
if (item) {
|
||||
nsCOMPtr<nsIURL> url;
|
||||
item->QueryInterface( kIStandardUrlIID, getter_AddRefs( url));
|
||||
item->QueryInterface( NS_GET_IID(nsIURL), getter_AddRefs( url));
|
||||
if (url) {
|
||||
if (m_pDestinationUri)
|
||||
nsCRT::free( m_pDestinationUri);
|
||||
|
@ -55,10 +55,9 @@ static NS_DEFINE_CID(kMsgAccountCID, NS_MSGACCOUNT_CID);
|
||||
static NS_DEFINE_CID(kMsgIdentityCID, NS_MSGIDENTITY_CID);
|
||||
static NS_DEFINE_CID(kMsgBiffManagerCID, NS_MSGBIFFMANAGER_CID);
|
||||
static NS_DEFINE_CID(kProfileCID, NS_PROFILE_CID);
|
||||
static NS_DEFINE_IID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
|
||||
static NS_DEFINE_CID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
|
||||
static NS_DEFINE_CID(kMsgAccountMgrCID, NS_MSGACCOUNTMANAGER_CID);
|
||||
static NS_DEFINE_CID(kSupportsWStringCID, NS_SUPPORTS_WSTRING_CID);
|
||||
static NS_DEFINE_IID(kISupportsWStringIID, NS_ISUPPORTSWSTRING_IID);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@ -257,7 +256,7 @@ NS_IMETHODIMP nsImportGenericMail::GetData(const char *dataId, nsISupports **_re
|
||||
// create an nsISupportsWString, get the current mailbox
|
||||
// name being imported and put it in the string
|
||||
nsCOMPtr<nsISupportsWString> data;
|
||||
rv = nsComponentManager::CreateInstance( kSupportsWStringCID, nsnull, kISupportsWStringIID, getter_AddRefs( data));
|
||||
rv = nsComponentManager::CreateInstance( kSupportsWStringCID, nsnull, NS_GET_IID(nsISupportsWString), getter_AddRefs( data));
|
||||
if (NS_FAILED( rv))
|
||||
return( rv);
|
||||
if (m_pThreadData) {
|
||||
|
@ -51,7 +51,6 @@
|
||||
|
||||
static NS_DEFINE_CID(kComponentManagerCID, NS_COMPONENTMANAGER_CID);
|
||||
static NS_DEFINE_CID(kImportServiceCID, NS_IMPORTSERVICE_CID);
|
||||
static NS_DEFINE_IID(kImportModuleIID, NS_IIMPORTMODULE_IID);
|
||||
static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
|
||||
|
||||
|
||||
@ -582,7 +581,7 @@ nsresult nsImportService::LoadModuleInfo( const char *pClsId, const char *pSuppo
|
||||
nsCID clsId;
|
||||
clsId.Parse( pClsId);
|
||||
nsIImportModule * module;
|
||||
rv = compMgr->CreateInstance( clsId, nsnull, kImportModuleIID, (void **) &module);
|
||||
rv = compMgr->CreateInstance( clsId, nsnull, NS_GET_IID(nsIImportModule), (void **) &module);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsString theTitle;
|
||||
@ -624,7 +623,7 @@ nsIImportModule *ImportModuleDesc::GetModule( PRBool keepLoaded)
|
||||
NS_WITH_SERVICE( nsIComponentManager, compMgr, kComponentManagerCID, &rv);
|
||||
if (NS_FAILED(rv)) return nsnull;
|
||||
|
||||
rv = compMgr->CreateInstance( m_cid, nsnull, kImportModuleIID, (void **) &m_pModule);
|
||||
rv = compMgr->CreateInstance( m_cid, nsnull, NS_GET_IID(nsIImportModule), (void **) &m_pModule);
|
||||
if (NS_FAILED(rv)) {
|
||||
m_pModule = nsnull;
|
||||
return nsnull;
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
/* This is the next generation string retrieval call */
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
static NS_DEFINE_IID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
|
||||
static NS_DEFINE_CID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
|
||||
|
||||
#define IMPORT_MSGS_URL "chrome://messenger/locale/importMsgs.properties"
|
||||
|
||||
|
@ -51,7 +51,6 @@
|
||||
|
||||
static NS_DEFINE_CID(kImportServiceCID, NS_IMPORTSERVICE_CID);
|
||||
static NS_DEFINE_IID(kISupportsIID, NS_ISUPPORTS_IID);
|
||||
static NS_DEFINE_IID(kISupportsArrayIID, NS_ISUPPORTSARRAY_IID);
|
||||
static NS_DEFINE_CID(kPrefServiceCID, NS_PREF_CID);
|
||||
|
||||
|
||||
@ -383,7 +382,7 @@ NS_IMETHODIMP ImportAddressImpl::FindAddressBooks(nsIFileSpec *pLoc, nsISupports
|
||||
IMPORT_LOG0( "*** Error creating address book descriptor for text import\n");
|
||||
}
|
||||
else {
|
||||
rv = array->QueryInterface( kISupportsArrayIID, (void **) ppArray);
|
||||
rv = array->QueryInterface( NS_GET_IID(nsISupportsArray), (void **) ppArray);
|
||||
}
|
||||
|
||||
return( rv);
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
/* This is the next generation string retrieval call */
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
static NS_DEFINE_IID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
|
||||
static NS_DEFINE_CID(kProxyObjectManagerCID, NS_PROXYEVENT_MANAGER_CID);
|
||||
|
||||
nsIStringBundle * nsTextStringBundle::m_pBundle = nsnull;
|
||||
|
||||
|
@ -60,7 +60,6 @@
|
||||
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
static NS_DEFINE_CID(kMsgMailSessionCID, NS_MSGMAILSESSION_CID);
|
||||
static NS_DEFINE_IID(kIFileLocatorIID, NS_IFILELOCATOR_IID);
|
||||
static NS_DEFINE_CID(kFileLocatorCID, NS_FILELOCATOR_CID);
|
||||
|
||||
nsMovemailService::nsMovemailService()
|
||||
|
@ -108,11 +108,10 @@ static NS_DEFINE_CID(kCUrlListenerManagerCID, NS_URLLISTENERMANAGER_CID);
|
||||
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||
|
||||
static NS_DEFINE_CID(kCMailboxServiceCID, NS_MAILBOXSERVICE_CID);
|
||||
static NS_DEFINE_IID(kIEventQueueServiceIID, NS_IEVENTQUEUESERVICE_IID);
|
||||
static NS_DEFINE_CID(kCMailboxParser, NS_MAILBOXPARSER_CID);
|
||||
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
static NS_DEFINE_IID(kFileLocatorCID, NS_FILELOCATOR_CID);
|
||||
static NS_DEFINE_CID(kFileLocatorCID, NS_FILELOCATOR_CID);
|
||||
static NS_DEFINE_CID(kCMailDB, NS_MAILDB_CID);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -66,8 +66,7 @@ nsMsgMailboxParserStub::nsMsgMailboxParserStub()
|
||||
nsMsgMailboxParserStub::~nsMsgMailboxParserStub()
|
||||
{}
|
||||
|
||||
NS_DEFINE_IID(kIStreamListenerIID, NS_ISTREAMLISTENER_IID);
|
||||
NS_IMPL_ISUPPORTS(nsMsgMailboxParserStub,kIStreamListenerIID);
|
||||
NS_IMPL_ISUPPORTS(nsMsgMailboxParserStub,NS_GET_IID(nsIStreamListener));
|
||||
|
||||
NS_IMETHODIMP nsMsgMailboxParserStub::GetBindInfo(nsIURI* aURL, nsStreamBindingInfo* info)
|
||||
{
|
||||
@ -150,7 +149,7 @@ nsresult NS_NewMsgParser(nsIStreamListener ** aInstancePtr)
|
||||
{
|
||||
nsMsgMailboxParserStub * parser = new nsMsgMailboxParserStub();
|
||||
if (parser)
|
||||
rv =parser->QueryInterface(kIStreamListenerIID, (void **) aInstancePtr);
|
||||
rv =parser->QueryInterface(NS_GET_IID(nsIStreamListener), (void **) aInstancePtr);
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
@ -64,10 +64,9 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// Define keys for all of the interfaces we are going to require for this test
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
static NS_DEFINE_IID(kNetServiceCID, NS_NETSERVICE_CID);
|
||||
static NS_DEFINE_IID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||
static NS_DEFINE_CID(kNetServiceCID, NS_NETSERVICE_CID);
|
||||
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||
|
||||
static NS_DEFINE_IID(kIInputStreamIID, NS_IINPUTSTREAM_IID);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// Define default values to be used to drive the test
|
||||
|
@ -77,8 +77,8 @@
|
||||
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||
static NS_DEFINE_CID(kPop3ServiceCID, NS_POP3SERVICE_CID);
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
static NS_DEFINE_IID(kFileLocatorCID, NS_FILELOCATOR_CID);
|
||||
static NS_DEFINE_IID(kEventQueueCID, NS_EVENTQUEUE_CID);
|
||||
static NS_DEFINE_CID(kFileLocatorCID, NS_FILELOCATOR_CID);
|
||||
static NS_DEFINE_CID(kEventQueueCID, NS_EVENTQUEUE_CID);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// Define default values to be used to drive the test
|
||||
|
@ -93,9 +93,8 @@ static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||
|
||||
|
||||
/* This is the next generation string retrieval call */
|
||||
static NS_DEFINE_IID(kIPrefIID, NS_IPREF_IID);
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
static NS_DEFINE_IID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
|
||||
#define VCARD_URL "chrome://messenger/locale/vcard.properties"
|
||||
|
||||
|
@ -82,7 +82,6 @@
|
||||
#include "nsMimeTypes.h"
|
||||
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
static NS_DEFINE_IID(kIMimeContentTypeHandlerIID, NS_IMIME_CONTENT_TYPE_HANDLER_IID);
|
||||
|
||||
/* ==========================================================================
|
||||
Allocation and destruction
|
||||
@ -202,7 +201,7 @@ mime_locate_external_content_handler(const char *content_type,
|
||||
if (nsComponentManager::ContractIDToClassID(lookupID, &classID) != NS_OK)
|
||||
return NULL;
|
||||
|
||||
rv = nsComponentManager::CreateInstance(classID, (nsISupports *)nsnull, kIMimeContentTypeHandlerIID,
|
||||
rv = nsComponentManager::CreateInstance(classID, (nsISupports *)nsnull, NS_GET_IID(nsIMimeContentTypeHandler),
|
||||
(void **) getter_AddRefs(ctHandler));
|
||||
if (NS_FAILED(rv) || !ctHandler)
|
||||
return nsnull;
|
||||
|
@ -73,7 +73,6 @@
|
||||
|
||||
#include "mimeebod.h"
|
||||
|
||||
static NS_DEFINE_IID(kIPrefIID, NS_IPREF_IID);
|
||||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||
|
||||
@ -1459,7 +1458,7 @@ mime_bridge_create_display_stream(
|
||||
// memset(msd->options, 0, sizeof(*msd->options));
|
||||
msd->options->format_out = format_out; // output format
|
||||
|
||||
rv = nsServiceManager::GetService(kPrefCID, kIPrefIID, (nsISupports**)&(msd->options->prefs));
|
||||
rv = nsServiceManager::GetService(kPrefCID, NS_GET_IID(nsIPref), (nsISupports**)&(msd->options->prefs));
|
||||
if (! (msd->options->prefs && NS_SUCCEEDED(rv)))
|
||||
{
|
||||
PR_FREEIF(msd);
|
||||
@ -1896,7 +1895,7 @@ mimeSetNewURL(nsMIMESession *stream, char *url)
|
||||
}
|
||||
|
||||
/* This is the next generation string retrieval call */
|
||||
static NS_DEFINE_IID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
|
||||
|
||||
#define MIME_URL "chrome://messenger/locale/mime.properties"
|
||||
|
||||
|
@ -92,7 +92,6 @@
|
||||
|
||||
// I18N
|
||||
static NS_DEFINE_CID(charsetCID, CONV_CID);
|
||||
NS_DEFINE_IID(kConvMeIID, CONV_IID);
|
||||
static NS_DEFINE_CID(kAppShellServiceCID, NS_APPSHELL_SERVICE_CID);
|
||||
|
||||
// prefs
|
||||
@ -126,7 +125,7 @@ SetupRegistry(void)
|
||||
|
||||
// i18n
|
||||
nsComponentManager::RegisterComponent(charsetCID, NULL, NULL, UNICHAR_DLL, PR_FALSE, PR_FALSE);
|
||||
nsresult res = nsServiceManager::GetService(charsetCID, kConvMeIID, (nsISupports **)&ccMan);
|
||||
nsresult res = nsServiceManager::GetService(charsetCID, NS_GET_IID(nsIConvMe), (nsISupports **)&ccMan);
|
||||
if (NS_FAILED(res))
|
||||
{
|
||||
printf("ERROR at GetService() code=0x%x.\n",res);
|
||||
|
Loading…
Reference in New Issue
Block a user