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

Side by Side Diff: gecko-sdk/include/nsIFactory.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/nsIEmbeddingSiteWindow.h ('k') | gecko-sdk/include/nsIFile.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/nsIFactory.idl
3 */
4
5 #ifndef __gen_nsIFactory_h__
6 #define __gen_nsIFactory_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: nsIFactory */
19 #define NS_IFACTORY_IID_STR "00000001-0000-0000-c000-000000000046"
20
21 #define NS_IFACTORY_IID \
22 {0x00000001, 0x0000, 0x0000, \
23 { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }}
24
25 /**
26 * A class factory allows the creation of nsISupports derived
27 * components without specifying a concrete base class.
28 *
29 * @status FROZEN
30 */
31 class NS_NO_VTABLE nsIFactory : public nsISupports {
32 public:
33
34 NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFACTORY_IID)
35
36 /**
37 * Creates an instance of a component.
38 *
39 * @param aOuter Pointer to a component that wishes to be aggregated
40 * in the resulting instance. This will be nsnull if no
41 * aggregation is requested.
42 * @param iid The IID of the interface being requested in
43 * the component which is being currently created.
44 * @param result [out] Pointer to the newly created instance, if successful.
45 * @return NS_OK - Component successfully created and the interface
46 * being requested was successfully returned in result.
47 * NS_NOINTERFACE - Interface not accessible.
48 * NS_ERROR_NO_AGGREGATION - if an 'outer' object is supplied, but th e
49 * component is not aggregatable.
50 * NS_ERROR* - Method failure.
51 */
52 /* void createInstance (in nsISupports aOuter, in nsIIDRef iid, [iid_is (iid), retval] out nsQIResult result); */
53 NS_IMETHOD CreateInstance(nsISupports *aOuter, const nsIID & iid, void * *resu lt) = 0;
54
55 /**
56 * LockFactory provides the client a way to keep the component
57 * in memory until it is finished with it. The client can call
58 * LockFactory(PR_TRUE) to lock the factory and LockFactory(PR_FALSE)
59 * to release the factory.
60 *
61 * @param lock - Must be PR_TRUE or PR_FALSE
62 * @return NS_OK - If the lock operation was successful.
63 * NS_ERROR* - Method failure.
64 */
65 /* void lockFactory (in PRBool lock); */
66 NS_IMETHOD LockFactory(PRBool lock) = 0;
67
68 };
69
70 /* Use this macro when declaring classes that implement this interface. */
71 #define NS_DECL_NSIFACTORY \
72 NS_IMETHOD CreateInstance(nsISupports *aOuter, const nsIID & iid, void * *resu lt); \
73 NS_IMETHOD LockFactory(PRBool lock);
74
75 /* Use this macro to declare functions that forward the behavior of this interfa ce to another object. */
76 #define NS_FORWARD_NSIFACTORY(_to) \
77 NS_IMETHOD CreateInstance(nsISupports *aOuter, const nsIID & iid, void * *resu lt) { return _to CreateInstance(aOuter, iid, result); } \
78 NS_IMETHOD LockFactory(PRBool lock) { return _to LockFactory(lock); }
79
80 /* Use this macro to declare functions that forward the behavior of this interfa ce to another object in a safe way. */
81 #define NS_FORWARD_SAFE_NSIFACTORY(_to) \
82 NS_IMETHOD CreateInstance(nsISupports *aOuter, const nsIID & iid, void * *resu lt) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateInstance(aOuter, iid, res ult); } \
83 NS_IMETHOD LockFactory(PRBool lock) { return !_to ? NS_ERROR_NULL_POINTER : _t o->LockFactory(lock); }
84
85 #if 0
86 /* Use the code below as a template for the implementation class for this interf ace. */
87
88 /* Header file */
89 class nsFactory : public nsIFactory
90 {
91 public:
92 NS_DECL_ISUPPORTS
93 NS_DECL_NSIFACTORY
94
95 nsFactory();
96
97 private:
98 ~nsFactory();
99
100 protected:
101 /* additional members */
102 };
103
104 /* Implementation file */
105 NS_IMPL_ISUPPORTS1(nsFactory, nsIFactory)
106
107 nsFactory::nsFactory()
108 {
109 /* member initializers and constructor code */
110 }
111
112 nsFactory::~nsFactory()
113 {
114 /* destructor code */
115 }
116
117 /* void createInstance (in nsISupports aOuter, in nsIIDRef iid, [iid_is (iid), r etval] out nsQIResult result); */
118 NS_IMETHODIMP nsFactory::CreateInstance(nsISupports *aOuter, const nsIID & iid, void * *result)
119 {
120 return NS_ERROR_NOT_IMPLEMENTED;
121 }
122
123 /* void lockFactory (in PRBool lock); */
124 NS_IMETHODIMP nsFactory::LockFactory(PRBool lock)
125 {
126 return NS_ERROR_NOT_IMPLEMENTED;
127 }
128
129 /* End of implementation class template. */
130 #endif
131
132
133 #endif /* __gen_nsIFactory_h__ */
OLDNEW
« no previous file with comments | « gecko-sdk/include/nsIEmbeddingSiteWindow.h ('k') | gecko-sdk/include/nsIFile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698