Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/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 412 : class NS_NO_VTABLE nsIFactory : public nsISupports {
26 : public:
27 :
28 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IFACTORY_IID)
29 :
30 : /* void createInstance (in nsISupports aOuter, in nsIIDRef iid, [iid_is (iid), retval] out nsQIResult result); */
31 : NS_IMETHOD CreateInstance(nsISupports *aOuter, const nsIID & iid, void **result) = 0;
32 :
33 : /* void lockFactory (in boolean lock); */
34 : NS_IMETHOD LockFactory(bool lock) = 0;
35 :
36 : };
37 :
38 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIFactory, NS_IFACTORY_IID)
39 :
40 : /* Use this macro when declaring classes that implement this interface. */
41 : #define NS_DECL_NSIFACTORY \
42 : NS_IMETHOD CreateInstance(nsISupports *aOuter, const nsIID & iid, void **result) override; \
43 : NS_IMETHOD LockFactory(bool lock) override;
44 :
45 : /* Use this macro when declaring the members of this interface when the
46 : class doesn't implement the interface. This is useful for forwarding. */
47 : #define NS_DECL_NON_VIRTUAL_NSIFACTORY \
48 : nsresult CreateInstance(nsISupports *aOuter, const nsIID & iid, void **result); \
49 : nsresult LockFactory(bool lock);
50 :
51 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
52 : #define NS_FORWARD_NSIFACTORY(_to) \
53 : NS_IMETHOD CreateInstance(nsISupports *aOuter, const nsIID & iid, void **result) override { return _to CreateInstance(aOuter, iid, result); } \
54 : NS_IMETHOD LockFactory(bool lock) override { return _to LockFactory(lock); }
55 :
56 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
57 : #define NS_FORWARD_SAFE_NSIFACTORY(_to) \
58 : NS_IMETHOD CreateInstance(nsISupports *aOuter, const nsIID & iid, void **result) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateInstance(aOuter, iid, result); } \
59 : NS_IMETHOD LockFactory(bool lock) override { return !_to ? NS_ERROR_NULL_POINTER : _to->LockFactory(lock); }
60 :
61 : #if 0
62 : /* Use the code below as a template for the implementation class for this interface. */
63 :
64 : /* Header file */
65 : class nsFactory : public nsIFactory
66 : {
67 : public:
68 : NS_DECL_ISUPPORTS
69 : NS_DECL_NSIFACTORY
70 :
71 : nsFactory();
72 :
73 : private:
74 : ~nsFactory();
75 :
76 : protected:
77 : /* additional members */
78 : };
79 :
80 : /* Implementation file */
81 : NS_IMPL_ISUPPORTS(nsFactory, nsIFactory)
82 :
83 : nsFactory::nsFactory()
84 : {
85 : /* member initializers and constructor code */
86 : }
87 :
88 : nsFactory::~nsFactory()
89 : {
90 : /* destructor code */
91 : }
92 :
93 : /* void createInstance (in nsISupports aOuter, in nsIIDRef iid, [iid_is (iid), retval] out nsQIResult result); */
94 : NS_IMETHODIMP nsFactory::CreateInstance(nsISupports *aOuter, const nsIID & iid, void **result)
95 : {
96 : return NS_ERROR_NOT_IMPLEMENTED;
97 : }
98 :
99 : /* void lockFactory (in boolean lock); */
100 : NS_IMETHODIMP nsFactory::LockFactory(bool lock)
101 : {
102 : return NS_ERROR_NOT_IMPLEMENTED;
103 : }
104 :
105 : /* End of implementation class template. */
106 : #endif
107 :
108 :
109 : #endif /* __gen_nsIFactory_h__ */
|