Line data Source code
1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIObserverService.idl
3 : */
4 :
5 : #ifndef __gen_nsIObserverService_h__
6 : #define __gen_nsIObserverService_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 : class nsIObserver; /* forward declaration */
18 :
19 : class nsISimpleEnumerator; /* forward declaration */
20 :
21 :
22 : /* starting interface: nsIObserverService */
23 : #define NS_IOBSERVERSERVICE_IID_STR "d07f5192-e3d1-11d2-8acd-00105a1b8860"
24 :
25 : #define NS_IOBSERVERSERVICE_IID \
26 : {0xd07f5192, 0xe3d1, 0x11d2, \
27 : { 0x8a, 0xcd, 0x00, 0x10, 0x5a, 0x1b, 0x88, 0x60 }}
28 :
29 3 : class NS_NO_VTABLE nsIObserverService : public nsISupports {
30 : public:
31 :
32 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IOBSERVERSERVICE_IID)
33 :
34 : /* void addObserver (in nsIObserver anObserver, in string aTopic, [optional] in boolean ownsWeak); */
35 : NS_IMETHOD AddObserver(nsIObserver *anObserver, const char * aTopic, bool ownsWeak) = 0;
36 :
37 : /* void removeObserver (in nsIObserver anObserver, in string aTopic); */
38 : NS_IMETHOD RemoveObserver(nsIObserver *anObserver, const char * aTopic) = 0;
39 :
40 : /* void notifyObservers (in nsISupports aSubject, in string aTopic, [optional] in wstring someData); */
41 : NS_IMETHOD NotifyObservers(nsISupports *aSubject, const char * aTopic, const char16_t * someData) = 0;
42 :
43 : /* nsISimpleEnumerator enumerateObservers (in string aTopic); */
44 : NS_IMETHOD EnumerateObservers(const char * aTopic, nsISimpleEnumerator * *_retval) = 0;
45 :
46 : };
47 :
48 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIObserverService, NS_IOBSERVERSERVICE_IID)
49 :
50 : /* Use this macro when declaring classes that implement this interface. */
51 : #define NS_DECL_NSIOBSERVERSERVICE \
52 : NS_IMETHOD AddObserver(nsIObserver *anObserver, const char * aTopic, bool ownsWeak) override; \
53 : NS_IMETHOD RemoveObserver(nsIObserver *anObserver, const char * aTopic) override; \
54 : NS_IMETHOD NotifyObservers(nsISupports *aSubject, const char * aTopic, const char16_t * someData) override; \
55 : NS_IMETHOD EnumerateObservers(const char * aTopic, nsISimpleEnumerator * *_retval) override;
56 :
57 : /* Use this macro when declaring the members of this interface when the
58 : class doesn't implement the interface. This is useful for forwarding. */
59 : #define NS_DECL_NON_VIRTUAL_NSIOBSERVERSERVICE \
60 : nsresult AddObserver(nsIObserver *anObserver, const char * aTopic, bool ownsWeak); \
61 : nsresult RemoveObserver(nsIObserver *anObserver, const char * aTopic); \
62 : nsresult NotifyObservers(nsISupports *aSubject, const char * aTopic, const char16_t * someData); \
63 : nsresult EnumerateObservers(const char * aTopic, nsISimpleEnumerator * *_retval);
64 :
65 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
66 : #define NS_FORWARD_NSIOBSERVERSERVICE(_to) \
67 : NS_IMETHOD AddObserver(nsIObserver *anObserver, const char * aTopic, bool ownsWeak) override { return _to AddObserver(anObserver, aTopic, ownsWeak); } \
68 : NS_IMETHOD RemoveObserver(nsIObserver *anObserver, const char * aTopic) override { return _to RemoveObserver(anObserver, aTopic); } \
69 : NS_IMETHOD NotifyObservers(nsISupports *aSubject, const char * aTopic, const char16_t * someData) override { return _to NotifyObservers(aSubject, aTopic, someData); } \
70 : NS_IMETHOD EnumerateObservers(const char * aTopic, nsISimpleEnumerator * *_retval) override { return _to EnumerateObservers(aTopic, _retval); }
71 :
72 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
73 : #define NS_FORWARD_SAFE_NSIOBSERVERSERVICE(_to) \
74 : NS_IMETHOD AddObserver(nsIObserver *anObserver, const char * aTopic, bool ownsWeak) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddObserver(anObserver, aTopic, ownsWeak); } \
75 : NS_IMETHOD RemoveObserver(nsIObserver *anObserver, const char * aTopic) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveObserver(anObserver, aTopic); } \
76 : NS_IMETHOD NotifyObservers(nsISupports *aSubject, const char * aTopic, const char16_t * someData) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyObservers(aSubject, aTopic, someData); } \
77 : NS_IMETHOD EnumerateObservers(const char * aTopic, nsISimpleEnumerator * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateObservers(aTopic, _retval); }
78 :
79 : #if 0
80 : /* Use the code below as a template for the implementation class for this interface. */
81 :
82 : /* Header file */
83 : class nsObserverService : public nsIObserverService
84 : {
85 : public:
86 : NS_DECL_ISUPPORTS
87 : NS_DECL_NSIOBSERVERSERVICE
88 :
89 : nsObserverService();
90 :
91 : private:
92 : ~nsObserverService();
93 :
94 : protected:
95 : /* additional members */
96 : };
97 :
98 : /* Implementation file */
99 : NS_IMPL_ISUPPORTS(nsObserverService, nsIObserverService)
100 :
101 : nsObserverService::nsObserverService()
102 : {
103 : /* member initializers and constructor code */
104 : }
105 :
106 : nsObserverService::~nsObserverService()
107 : {
108 : /* destructor code */
109 : }
110 :
111 : /* void addObserver (in nsIObserver anObserver, in string aTopic, [optional] in boolean ownsWeak); */
112 : NS_IMETHODIMP nsObserverService::AddObserver(nsIObserver *anObserver, const char * aTopic, bool ownsWeak)
113 : {
114 : return NS_ERROR_NOT_IMPLEMENTED;
115 : }
116 :
117 : /* void removeObserver (in nsIObserver anObserver, in string aTopic); */
118 : NS_IMETHODIMP nsObserverService::RemoveObserver(nsIObserver *anObserver, const char * aTopic)
119 : {
120 : return NS_ERROR_NOT_IMPLEMENTED;
121 : }
122 :
123 : /* void notifyObservers (in nsISupports aSubject, in string aTopic, [optional] in wstring someData); */
124 : NS_IMETHODIMP nsObserverService::NotifyObservers(nsISupports *aSubject, const char * aTopic, const char16_t * someData)
125 : {
126 : return NS_ERROR_NOT_IMPLEMENTED;
127 : }
128 :
129 : /* nsISimpleEnumerator enumerateObservers (in string aTopic); */
130 : NS_IMETHODIMP nsObserverService::EnumerateObservers(const char * aTopic, nsISimpleEnumerator * *_retval)
131 : {
132 : return NS_ERROR_NOT_IMPLEMENTED;
133 : }
134 :
135 : /* End of implementation class template. */
136 : #endif
137 :
138 :
139 : #endif /* __gen_nsIObserverService_h__ */
|