VirtualBox

source: vbox/trunk/src/libs/xpcom18a4/xpcom/components/nsIComponentLoader.idl@ 66250

Last change on this file since 66250 was 1, checked in by vboxsync, 55 years ago

import

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.9 KB
Line 
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 *
3 * ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 *
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
10 *
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
14 * License.
15 *
16 * The Original Code is mozilla.org Code.
17 *
18 * The Initial Developer of the Original Code is
19 * Netscape Communications Corporation.
20 * Portions created by the Initial Developer are Copyright (C) 1998
21 * the Initial Developer. All Rights Reserved.
22 *
23 * Contributor(s):
24 *
25 * Alternatively, the contents of this file may be used under the terms of
26 * either of the GNU General Public License Version 2 or later (the "GPL"),
27 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
36 *
37 * ***** END LICENSE BLOCK ***** */
38
39#include "nsISupports.idl"
40#include "nsIFactory.idl"
41#include "nsIFile.idl"
42#include "nsIComponentManager.idl"
43
44[object, uuid(c073cfc0-567c-11d3-aec1-0000f8e25c06)]
45interface nsIComponentLoader : nsISupports {
46
47 /**
48 * Get the factory for a given component.
49 */
50 nsIFactory getFactory(in nsIIDRef aCID, in string aLocation,
51 in string aType);
52
53 /**
54 * Initialize the loader.
55 *
56 * We use nsISupports here because nsIRegistry isn't IDLized yet.
57 */
58 void init(in nsIComponentManager aCompMgr, in nsISupports aRegistry);
59
60 /**
61 * Called when a component of the appropriate type is registered,
62 * to give the component loader an opportunity to do things like
63 * annotate the registry and such.
64 */
65 void onRegister(in nsIIDRef aCID, in string aType,
66 in string aClassName, in string aContractID,
67 in string aLocation, in boolean aReplace,
68 in boolean aPersist);
69
70 /**
71 * When is AutoRegistration occuring?
72 */
73 const long Startup = 0;
74 const long Component = 1;
75 const long Timer = 2;
76
77 /**
78 * AutoRegister components in the given directory.
79 */
80 void autoRegisterComponents(in long aWhen, in nsIFile aDirectory);
81
82 /**
83 * AutoRegister the given component.
84 *
85 * Returns true if the component was registered, false if it couldn't
86 * attempt to register the component (wrong type) and ``throws'' an
87 * NS_FAILED code if there was an error during registration.
88 */
89 boolean autoRegisterComponent(in long aWhen, in nsIFile aComponent);
90
91 /**
92 * AutoUnregister the given component.
93 * Returns true if the component was unregistered, false if it coudln't
94 * attempt to unregister the component (not found, wrong type).
95 */
96 boolean autoUnregisterComponent(in long aWhen, in nsIFile aComponent);
97
98 /**
99 * Register any deferred (NS_ERROR_FACTORY_REGISTER_AGAIN) components.
100 * Return registered-any-components?
101 */
102 boolean registerDeferredComponents(in long aWhen);
103
104 /**
105 * Unload all components that are willing.
106 */
107 void unloadAll(in long aWhen);
108
109};
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette