Bug 846687 - Set the transport as non-seekable if the server sends Accept-Ranges...
[gecko.git] / xpcom / components / nsIServiceManager.idl
blob2195aea78a921c1c3dd744a2209cf899a0f63ba1
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsISupports.idl"
8 /**
9 * The nsIServiceManager manager interface provides a means to obtain
10 * global services in an application. The service manager depends on the
11 * repository to find and instantiate factories to obtain services.
13 * Users of the service manager must first obtain a pointer to the global
14 * service manager by calling NS_GetServiceManager. After that,
15 * they can request specific services by calling GetService. When they are
16 * finished they can NS_RELEASE() the service as usual.
18 * A user of a service may keep references to particular services indefinitely
19 * and only must call Release when it shuts down.
22 [scriptable, uuid(8bb35ed9-e332-462d-9155-4a002ab5c958)]
23 interface nsIServiceManager : nsISupports
25 /**
26 * getServiceByContractID
28 * Returns the instance that implements aClass or aContractID and the
29 * interface aIID. This may result in the instance being created.
31 * @param aClass or aContractID : aClass or aContractID of object
32 * instance requested
33 * @param aIID : IID of interface requested
34 * @param result : resulting service
36 void getService(in nsCIDRef aClass,
37 in nsIIDRef aIID,
38 [iid_is(aIID),retval] out nsQIResult result);
40 void getServiceByContractID(in string aContractID,
41 in nsIIDRef aIID,
42 [iid_is(aIID),retval] out nsQIResult result);
44 /**
45 * isServiceInstantiated
47 * isServiceInstantiated will return a true if the service has already
48 * been created, otherwise false
50 * @param aClass or aContractID : aClass or aContractID of object
51 * instance requested
52 * @param aIID : IID of interface requested
53 * @param aIID : IID of interface requested
55 boolean isServiceInstantiated(in nsCIDRef aClass, in nsIIDRef aIID);
56 boolean isServiceInstantiatedByContractID(in string aContractID, in nsIIDRef aIID);
60 %{C++
61 // Observing xpcom autoregistration. Topics will be 'start' and 'stop'.
62 #define NS_XPCOM_AUTOREGISTRATION_OBSERVER_ID "xpcom-autoregistration"
64 #ifdef MOZILLA_INTERNAL_API
65 #include "nsXPCOM.h"
66 #include "nsComponentManagerUtils.h"
67 #include "nsServiceManagerUtils.h"
68 #endif