Change nsComponentManager::ProgIDToCLSID to nsComponentManager::ProgIDToClassID as per bug #3579. Checking in for sford. r=scc,r=blizzard

This commit is contained in:
blizzard%redhat.com 1999-12-30 22:03:58 +00:00
Родитель ae2161d9ed
Коммит d6cf22aa5c
16 изменённых файлов: 23 добавлений и 23 удалений

Просмотреть файл

@ -88,7 +88,7 @@ nsTransformMediator::Init(const nsString& aMimeType)
if (NS_SUCCEEDED(rv)) {
nsCID cid;
char* progIDStr = (char*)progID.ToNewCString();
rv = nsComponentManager::ProgIDToCLSID((const char*)progIDStr, &cid);
rv = nsComponentManager::ProgIDToClassID((const char*)progIDStr, &cid);
if (NS_SUCCEEDED(rv)) {
// Try to find a component that implements the nsIDocumentTransformer interface
rv = nsComponentManager::CreateInstance(cid, nsnull,

Просмотреть файл

@ -1763,7 +1763,7 @@ nsresult nsWebShell::CreateViewer(nsIChannel* aChannel,
aCommand ? aCommand : "view",/* XXX bug! shouldn't b needed!*/
aContentType);
rv = nsComponentManager::ProgIDToCLSID(id, &cid);
rv = nsComponentManager::ProgIDToClassID(id, &cid);
if (NS_SUCCEEDED(rv)) {
// Create an instance of the document-loader-factory object
nsIDocumentLoaderFactory* factory;

Просмотреть файл

@ -283,7 +283,7 @@ NS_IMETHODIMP mozXMLTermStream::Open(nsIDOMWindow* aDOMWindow,
progID += "/";
progID += contentType;
result = nsComponentManager::ProgIDToCLSID(progID.GetBuffer(),
result = nsComponentManager::ProgIDToClassID(progID.GetBuffer(),
&classID);
if (NS_FAILED(result))
return result;

Просмотреть файл

@ -949,7 +949,7 @@ nsJSCID::NewID(const char* str)
else
{
nsCID cid;
if(NS_SUCCEEDED(nsComponentManager::ProgIDToCLSID(str, &cid)))
if(NS_SUCCEEDED(nsComponentManager::ProgIDToClassID(str, &cid)))
{
success = idObj->mDetails.InitWithName(cid, str);
}

Просмотреть файл

@ -88,7 +88,7 @@ nsTransformMediator::Init(const nsString& aMimeType)
if (NS_SUCCEEDED(rv)) {
nsCID cid;
char* progIDStr = (char*)progID.ToNewCString();
rv = nsComponentManager::ProgIDToCLSID((const char*)progIDStr, &cid);
rv = nsComponentManager::ProgIDToClassID((const char*)progIDStr, &cid);
if (NS_SUCCEEDED(rv)) {
// Try to find a component that implements the nsIDocumentTransformer interface
rv = nsComponentManager::CreateInstance(cid, nsnull,

Просмотреть файл

@ -227,7 +227,7 @@ nsMimeXULEmitter::GetStatusObjForProgID(nsCString aProgID)
return nsnull;
nsCID cid;
rv = comMgr->ProgIDToCLSID(aProgID, &cid);
rv = comMgr->ProgIDToClassID(aProgID, &cid);
if (NS_FAILED(rv))
return nsnull;

Просмотреть файл

@ -193,7 +193,7 @@ mime_locate_external_content_handler(const char *content_type,
nsresult rv = NS_OK;
PR_snprintf(lookupID, sizeof(lookupID), "mimecth:%s", content_type);
if (nsComponentManager::ProgIDToCLSID(lookupID, &classID) != NS_OK)
if (nsComponentManager::ProgIDToClassID(lookupID, &classID) != NS_OK)
return NULL;
rv = nsComponentManager::CreateInstance(classID, (nsISupports *)nsnull, kIMimeContentTypeHandlerIID,

Просмотреть файл

@ -625,7 +625,7 @@ RDFServiceImpl::GetResource(const char* aURI, nsIRDFResource** aResource)
progID[len] = '\0';
nsCID cid;
rv = nsComponentManager::ProgIDToCLSID(progID, &cid);
rv = nsComponentManager::ProgIDToClassID(progID, &cid);
if (progID != buf)
nsCRT::free(progID);

Просмотреть файл

@ -347,7 +347,7 @@ GtkMozillaContainer::CreateContentViewer(const char *aCommand,
PR_snprintf(id, sizeof(id),
NS_DOCUMENT_LOADER_FACTORY_PROGID_PREFIX "%s/%s",
aCommand, aContentType);
nsresult rv = nsComponentManager::ProgIDToCLSID(id, &cid);
nsresult rv = nsComponentManager::ProgIDToClassID(id, &cid);
if (NS_FAILED(rv)) {
return rv;
}

Просмотреть файл

@ -1763,7 +1763,7 @@ nsresult nsWebShell::CreateViewer(nsIChannel* aChannel,
aCommand ? aCommand : "view",/* XXX bug! shouldn't b needed!*/
aContentType);
rv = nsComponentManager::ProgIDToCLSID(id, &cid);
rv = nsComponentManager::ProgIDToClassID(id, &cid);
if (NS_SUCCEEDED(rv)) {
// Create an instance of the document-loader-factory object
nsIDocumentLoaderFactory* factory;

Просмотреть файл

@ -1114,13 +1114,13 @@ nsComponentManagerImpl::GetClassObject(const nsCID &aClass, const nsIID &aIID,
}
/**
* ProgIDToCLSID()
* ProgIDToClassID()
*
* Mapping function from a ProgID to a classID. Directly talks to the registry.
*
*/
nsresult
nsComponentManagerImpl::ProgIDToCLSID(const char *aProgID, nsCID *aClass)
nsComponentManagerImpl::ProgIDToClassID(const char *aProgID, nsCID *aClass)
{
NS_PRECONDITION(aProgID != NULL, "null ptr");
if (! aProgID)
@ -1178,7 +1178,7 @@ nsComponentManagerImpl::ProgIDToCLSID(const char *aProgID, nsCID *aClass)
if (NS_SUCCEEDED(res))
buf = aClass->ToString();
PR_LOG(nsComponentManagerLog, PR_LOG_ALWAYS,
("nsComponentManager: ProgIDToCLSID(%s)->%s", aProgID,
("nsComponentManager: ProgIDToClassID(%s)->%s", aProgID,
NS_SUCCEEDED(res) ? buf : "[FAILED]"));
if (NS_SUCCEEDED(res))
delete [] buf;
@ -1271,7 +1271,7 @@ nsComponentManagerImpl::CreateInstanceByProgID(const char *aProgID,
void **aResult)
{
nsCID clsid;
nsresult rv = ProgIDToCLSID(aProgID, &clsid);
nsresult rv = ProgIDToClassID(aProgID, &clsid);
if (NS_FAILED(rv)) return rv;
return CreateInstance(clsid, aDelegate, aIID, aResult);
}

Просмотреть файл

@ -78,7 +78,7 @@ public:
void **aResult);
// Finds a class ID for a specific Program ID
static nsresult ProgIDToCLSID(const char *aProgID,
static nsresult ProgIDToClassID(const char *aProgID,
nsCID *aClass);
// Finds a Program ID for a specific class ID

Просмотреть файл

@ -30,7 +30,7 @@ interface nsIComponentManager : nsISupports
nsIFactory findFactory(in nsCIDRef aClass);
[noscript] voidStar getClassObject(in nsCIDRef aClass, in nsIIDRef aIID);
[noscript] void progIDToCLSID(in string aProgID, out nsCID aClass);
[noscript] void progIDToClassID(in string aProgID, out nsCID aClass);
string CLSIDToProgID(in nsCIDRef aClass, out string aClassName);
[noscript] voidStar createInstance(in nsCIDRef aClass,

Просмотреть файл

@ -49,13 +49,13 @@ nsComponentManager::GetClassObject(const nsCID &aClass, const nsIID &aIID,
}
nsresult
nsComponentManager::ProgIDToCLSID(const char *aProgID,
nsComponentManager::ProgIDToClassID(const char *aProgID,
nsCID *aClass)
{
nsIComponentManager* cm;
nsresult rv = NS_GetGlobalComponentManager(&cm);
if (NS_FAILED(rv)) return rv;
return cm->ProgIDToCLSID(aProgID, aClass);
return cm->ProgIDToClassID(aProgID, aClass);
}
nsresult

Просмотреть файл

@ -411,7 +411,7 @@ nsServiceManagerImpl::RegisterService(const char* aProgID, nsISupports* aService
{
nsCID aClass;
nsresult rv;
rv = nsComponentManager::ProgIDToCLSID(aProgID, &aClass);
rv = nsComponentManager::ProgIDToClassID(aProgID, &aClass);
if (NS_FAILED(rv)) return rv;
return RegisterService(aClass, aService);
}
@ -421,7 +421,7 @@ nsServiceManagerImpl::UnregisterService(const char* aProgID)
{
nsCID aClass;
nsresult rv;
rv = nsComponentManager::ProgIDToCLSID(aProgID, &aClass);
rv = nsComponentManager::ProgIDToClassID(aProgID, &aClass);
if (NS_FAILED(rv)) return rv;
return UnregisterService(aClass);
}
@ -433,7 +433,7 @@ nsServiceManagerImpl::GetService(const char* aProgID, const nsIID& aIID,
{
nsCID aClass;
nsresult rv;
rv = nsComponentManager::ProgIDToCLSID(aProgID, &aClass);
rv = nsComponentManager::ProgIDToClassID(aProgID, &aClass);
if (NS_FAILED(rv)) return rv;
return GetService(aClass, aIID, result, shutdownListener);
}
@ -444,7 +444,7 @@ nsServiceManagerImpl::ReleaseService(const char* aProgID, nsISupports* service,
{
nsCID aClass;
nsresult rv;
rv = nsComponentManager::ProgIDToCLSID(aProgID, &aClass);
rv = nsComponentManager::ProgIDToClassID(aProgID, &aClass);
if (NS_FAILED(rv)) return rv;
return ReleaseService(aClass, service, shutdownListener);
}

Просмотреть файл

@ -78,7 +78,7 @@ public:
void **aResult);
// Finds a class ID for a specific Program ID
static nsresult ProgIDToCLSID(const char *aProgID,
static nsresult ProgIDToClassID(const char *aProgID,
nsCID *aClass);
// Finds a Program ID for a specific class ID