pjs/xpcom/components/nsIComponentManager.idl

101 строка
4.2 KiB
Plaintext

/* -*- Mode: C++; 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 "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsISupports.idl"
#include "nsIFactory.idl"
#include "nsIEnumerator.idl"
interface nsIFile;
/* should this be in nsroot.idl? */
native nsCID(nsCID);
[scriptable, uuid(8458a740-d5dc-11d2-92fb-00e09805570f)]
interface nsIComponentManager : nsISupports
{
nsIFactory findFactory(in nsCIDRef aClass);
[noscript] voidStar getClassObject(in nsCIDRef aClass, in nsIIDRef aIID);
[noscript] void progIDToClassID(in string aProgID, out nsCID aClass);
string CLSIDToProgID(in nsCIDRef aClass, out string aClassName);
[noscript] voidStar createInstance(in nsCIDRef aClass,
in nsISupports aDelegate,
in nsIIDRef aIID);
[noscript] voidStar createInstanceByProgID(in string aProgID,
in nsISupports aDelegate,
in nsIIDRef IID);
/**
* Produce a rel: or abs: registry location for a given spec.
*/
string registryLocationForSpec(in nsIFile aSpec);
/**
* Create a full FileSpec for the rel:/abs: location provided.
*/
nsIFile specForRegistryLocation(in string aLocation);
void registerFactory(in nsCIDRef aClass, in string aClassName,
in string aProgID, in nsIFactory aFactory,
in boolean aReplace);
void registerComponentLoader(in string aType, in string aProgID,
in boolean aReplace);
void registerComponent(in nsCIDRef aClass, in string aClassName,
in string aProgID, in string aLocation,
in boolean aReplace, in boolean aPersist);
void registerComponentWithType(in nsCIDRef aClass,
in string aClassName,
in string aProgID,
in nsIFile aSpec,
in string aLocation,
in boolean aReplace,
in boolean aPersist,
in string aType);
void registerComponentSpec(in nsCIDRef aClass, in string aClassName,
in string aProgID, in nsIFile aLibrary,
in boolean aReplace, in boolean aPersist);
void registerComponentLib(in nsCIDRef aClass, in string aClassName,
in string aProgID, in string adllName,
in boolean aReplace, in boolean aPersist);
void unregisterFactory(in nsCIDRef aClass, in nsIFactory aFactory);
void unregisterComponent(in nsCIDRef aClass, in string aLibrary);
void unregisterComponentSpec(in nsCIDRef aClass,
in nsIFile aLibrarySpec);
void freeLibraries();
const long NS_Startup = 0;
const long NS_Script = 1;
const long NS_Timer = 2;
const long NS_Shutdown = 3;
void autoRegister(in long when, in nsIFile directory);
void autoRegisterComponent(in long when, in nsIFile component);
boolean isRegistered(in nsCIDRef aClass);
nsIEnumerator enumerateCLSIDs();
nsIEnumerator enumerateProgIDs();
};
%{ C++
/* include after the class def'n, because it needs to see it. */
#include "nsComponentManagerUtils.h"
%} C++