Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(623)

Side by Side Diff: gecko-sdk/include/nsIServiceManager.h

Issue 20346: Version 1.8 of gecko-sdk. Downloaded from here:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gecko-sdk/include/nsISelection.h ('k') | gecko-sdk/include/nsISimpleEnumerator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 /*
2 * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/builds/tinderbox/XR-Mozilla1.8.0 -Release/WINNT_5.2_Depend/mozilla/xpcom/components/nsIServiceManager.idl
3 */
4
5 #ifndef __gen_nsIServiceManager_h__
6 #define __gen_nsIServiceManager_h__
7
8
9 #ifndef __gen_nsISupports_h__
10 #include "nsISupports.h"
11 #endif
12
13 /* For IDL files that don't want to include root IDL files. */
14 #ifndef NS_NO_VTABLE
15 #define NS_NO_VTABLE
16 #endif
17
18 /* starting interface: nsIServiceManager */
19 #define NS_ISERVICEMANAGER_IID_STR "8bb35ed9-e332-462d-9155-4a002ab5c958"
20
21 #define NS_ISERVICEMANAGER_IID \
22 {0x8bb35ed9, 0xe332, 0x462d, \
23 { 0x91, 0x55, 0x4a, 0x00, 0x2a, 0xb5, 0xc9, 0x58 }}
24
25 /**
26 * The nsIServiceManager manager interface provides a means to obtain
27 * global services in an application. The service manager depends on the
28 * repository to find and instantiate factories to obtain services.
29 *
30 * Users of the service manager must first obtain a pointer to the global
31 * service manager by calling NS_GetServiceManager. After that,
32 * they can request specific services by calling GetService. When they are
33 * finished they can NS_RELEASE() the service as usual.
34 *
35 * A user of a service may keep references to particular services indefinitely
36 * and only must call Release when it shuts down.
37 *
38 * @status FROZEN
39 */
40 class NS_NO_VTABLE nsIServiceManager : public nsISupports {
41 public:
42
43 NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISERVICEMANAGER_IID)
44
45 /**
46 * getServiceByContractID
47 *
48 * Returns the instance that implements aClass or aContractID and the
49 * interface aIID. This may result in the instance being created.
50 *
51 * @param aClass or aContractID : aClass or aContractID of object
52 * instance requested
53 * @param aIID : IID of interface requested
54 * @param result : resulting service
55 */
56 /* void getService (in nsCIDRef aClass, in nsIIDRef aIID, [iid_is (aIID), retv al] out nsQIResult result); */
57 NS_IMETHOD GetService(const nsCID & aClass, const nsIID & aIID, void * *result ) = 0;
58
59 /* void getServiceByContractID (in string aContractID, in nsIIDRef aIID, [iid_ is (aIID), retval] out nsQIResult result); */
60 NS_IMETHOD GetServiceByContractID(const char *aContractID, const nsIID & aIID, void * *result) = 0;
61
62 /**
63 * isServiceInstantiated
64 *
65 * isServiceInstantiated will return a true if the service has already
66 * been created, otherwise false
67 *
68 * @param aClass or aContractID : aClass or aContractID of object
69 * instance requested
70 * @param aIID : IID of interface requested
71 * @param aIID : IID of interface requested
72 */
73 /* boolean isServiceInstantiated (in nsCIDRef aClass, in nsIIDRef aIID); */
74 NS_IMETHOD IsServiceInstantiated(const nsCID & aClass, const nsIID & aIID, PRB ool *_retval) = 0;
75
76 /* boolean isServiceInstantiatedByContractID (in string aContractID, in nsIIDR ef aIID); */
77 NS_IMETHOD IsServiceInstantiatedByContractID(const char *aContractID, const ns IID & aIID, PRBool *_retval) = 0;
78
79 };
80
81 /* Use this macro when declaring classes that implement this interface. */
82 #define NS_DECL_NSISERVICEMANAGER \
83 NS_IMETHOD GetService(const nsCID & aClass, const nsIID & aIID, void * *result ); \
84 NS_IMETHOD GetServiceByContractID(const char *aContractID, const nsIID & aIID, void * *result); \
85 NS_IMETHOD IsServiceInstantiated(const nsCID & aClass, const nsIID & aIID, PRB ool *_retval); \
86 NS_IMETHOD IsServiceInstantiatedByContractID(const char *aContractID, const ns IID & aIID, PRBool *_retval);
87
88 /* Use this macro to declare functions that forward the behavior of this interfa ce to another object. */
89 #define NS_FORWARD_NSISERVICEMANAGER(_to) \
90 NS_IMETHOD GetService(const nsCID & aClass, const nsIID & aIID, void * *result ) { return _to GetService(aClass, aIID, result); } \
91 NS_IMETHOD GetServiceByContractID(const char *aContractID, const nsIID & aIID, void * *result) { return _to GetServiceByContractID(aContractID, aIID, result); } \
92 NS_IMETHOD IsServiceInstantiated(const nsCID & aClass, const nsIID & aIID, PRB ool *_retval) { return _to IsServiceInstantiated(aClass, aIID, _retval); } \
93 NS_IMETHOD IsServiceInstantiatedByContractID(const char *aContractID, const ns IID & aIID, PRBool *_retval) { return _to IsServiceInstantiatedByContractID(aCon tractID, aIID, _retval); }
94
95 /* Use this macro to declare functions that forward the behavior of this interfa ce to another object in a safe way. */
96 #define NS_FORWARD_SAFE_NSISERVICEMANAGER(_to) \
97 NS_IMETHOD GetService(const nsCID & aClass, const nsIID & aIID, void * *result ) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetService(aClass, aIID, result); } \
98 NS_IMETHOD GetServiceByContractID(const char *aContractID, const nsIID & aIID, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetServiceByContra ctID(aContractID, aIID, result); } \
99 NS_IMETHOD IsServiceInstantiated(const nsCID & aClass, const nsIID & aIID, PRB ool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsServiceInstantiated (aClass, aIID, _retval); } \
100 NS_IMETHOD IsServiceInstantiatedByContractID(const char *aContractID, const ns IID & aIID, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsServ iceInstantiatedByContractID(aContractID, aIID, _retval); }
101
102 #if 0
103 /* Use the code below as a template for the implementation class for this interf ace. */
104
105 /* Header file */
106 class nsServiceManager : public nsIServiceManager
107 {
108 public:
109 NS_DECL_ISUPPORTS
110 NS_DECL_NSISERVICEMANAGER
111
112 nsServiceManager();
113
114 private:
115 ~nsServiceManager();
116
117 protected:
118 /* additional members */
119 };
120
121 /* Implementation file */
122 NS_IMPL_ISUPPORTS1(nsServiceManager, nsIServiceManager)
123
124 nsServiceManager::nsServiceManager()
125 {
126 /* member initializers and constructor code */
127 }
128
129 nsServiceManager::~nsServiceManager()
130 {
131 /* destructor code */
132 }
133
134 /* void getService (in nsCIDRef aClass, in nsIIDRef aIID, [iid_is (aIID), retval ] out nsQIResult result); */
135 NS_IMETHODIMP nsServiceManager::GetService(const nsCID & aClass, const nsIID & a IID, void * *result)
136 {
137 return NS_ERROR_NOT_IMPLEMENTED;
138 }
139
140 /* void getServiceByContractID (in string aContractID, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */
141 NS_IMETHODIMP nsServiceManager::GetServiceByContractID(const char *aContractID, const nsIID & aIID, void * *result)
142 {
143 return NS_ERROR_NOT_IMPLEMENTED;
144 }
145
146 /* boolean isServiceInstantiated (in nsCIDRef aClass, in nsIIDRef aIID); */
147 NS_IMETHODIMP nsServiceManager::IsServiceInstantiated(const nsCID & aClass, cons t nsIID & aIID, PRBool *_retval)
148 {
149 return NS_ERROR_NOT_IMPLEMENTED;
150 }
151
152 /* boolean isServiceInstantiatedByContractID (in string aContractID, in nsIIDRef aIID); */
153 NS_IMETHODIMP nsServiceManager::IsServiceInstantiatedByContractID(const char *aC ontractID, const nsIID & aIID, PRBool *_retval)
154 {
155 return NS_ERROR_NOT_IMPLEMENTED;
156 }
157
158 /* End of implementation class template. */
159 #endif
160
161 #define NS_ERROR_SERVICE_NOT_AVAILABLE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODUL E_XPCOM, 22)
162 /**
163 * @status DEPRECATED
164 */
165 #define NS_ERROR_SERVICE_NOT_FOUND NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODUL E_XPCOM, 22)
166 /**
167 * @status DEPRECATED
168 */
169 #define NS_ERROR_SERVICE_IN_USE NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODUL E_XPCOM, 23)
170 // Observing xpcom autoregistration. Topics will be 'start' and 'stop'.
171 #define NS_XPCOM_AUTOREGISTRATION_OBSERVER_ID "xpcom-autoregistration"
172 #ifdef MOZILLA_INTERNAL_API
173 #include "nsXPCOM.h"
174 #include "nsServiceManagerUtils.h"
175 #include "nsIServiceManagerObsolete.h"
176 #endif
177
178 #endif /* __gen_nsIServiceManager_h__ */
OLDNEW
« no previous file with comments | « gecko-sdk/include/nsISelection.h ('k') | gecko-sdk/include/nsISimpleEnumerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698