1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/xpcom/ds/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 1419 : class NS_NO_VTABLE NS_SCRIPTABLE 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, in boolean ownsWeak); */
35 : NS_SCRIPTABLE NS_IMETHOD AddObserver(nsIObserver *anObserver, const char * aTopic, bool ownsWeak) = 0;
36 :
37 : /* void removeObserver (in nsIObserver anObserver, in string aTopic); */
38 : NS_SCRIPTABLE NS_IMETHOD RemoveObserver(nsIObserver *anObserver, const char * aTopic) = 0;
39 :
40 : /* void notifyObservers (in nsISupports aSubject, in string aTopic, in wstring someData); */
41 : NS_SCRIPTABLE NS_IMETHOD NotifyObservers(nsISupports *aSubject, const char * aTopic, const PRUnichar * someData) = 0;
42 :
43 : /* nsISimpleEnumerator enumerateObservers (in string aTopic); */
44 : NS_SCRIPTABLE NS_IMETHOD EnumerateObservers(const char * aTopic, nsISimpleEnumerator * *_retval NS_OUTPARAM) = 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_SCRIPTABLE NS_IMETHOD AddObserver(nsIObserver *anObserver, const char * aTopic, bool ownsWeak); \
53 : NS_SCRIPTABLE NS_IMETHOD RemoveObserver(nsIObserver *anObserver, const char * aTopic); \
54 : NS_SCRIPTABLE NS_IMETHOD NotifyObservers(nsISupports *aSubject, const char * aTopic, const PRUnichar * someData); \
55 : NS_SCRIPTABLE NS_IMETHOD EnumerateObservers(const char * aTopic, nsISimpleEnumerator * *_retval NS_OUTPARAM);
56 :
57 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
58 : #define NS_FORWARD_NSIOBSERVERSERVICE(_to) \
59 : NS_SCRIPTABLE NS_IMETHOD AddObserver(nsIObserver *anObserver, const char * aTopic, bool ownsWeak) { return _to AddObserver(anObserver, aTopic, ownsWeak); } \
60 : NS_SCRIPTABLE NS_IMETHOD RemoveObserver(nsIObserver *anObserver, const char * aTopic) { return _to RemoveObserver(anObserver, aTopic); } \
61 : NS_SCRIPTABLE NS_IMETHOD NotifyObservers(nsISupports *aSubject, const char * aTopic, const PRUnichar * someData) { return _to NotifyObservers(aSubject, aTopic, someData); } \
62 : NS_SCRIPTABLE NS_IMETHOD EnumerateObservers(const char * aTopic, nsISimpleEnumerator * *_retval NS_OUTPARAM) { return _to EnumerateObservers(aTopic, _retval); }
63 :
64 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
65 : #define NS_FORWARD_SAFE_NSIOBSERVERSERVICE(_to) \
66 : NS_SCRIPTABLE NS_IMETHOD AddObserver(nsIObserver *anObserver, const char * aTopic, bool ownsWeak) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddObserver(anObserver, aTopic, ownsWeak); } \
67 : NS_SCRIPTABLE NS_IMETHOD RemoveObserver(nsIObserver *anObserver, const char * aTopic) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveObserver(anObserver, aTopic); } \
68 : NS_SCRIPTABLE NS_IMETHOD NotifyObservers(nsISupports *aSubject, const char * aTopic, const PRUnichar * someData) { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyObservers(aSubject, aTopic, someData); } \
69 : NS_SCRIPTABLE NS_IMETHOD EnumerateObservers(const char * aTopic, nsISimpleEnumerator * *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateObservers(aTopic, _retval); }
70 :
71 : #if 0
72 : /* Use the code below as a template for the implementation class for this interface. */
73 :
74 : /* Header file */
75 : class nsObserverService : public nsIObserverService
76 : {
77 : public:
78 : NS_DECL_ISUPPORTS
79 : NS_DECL_NSIOBSERVERSERVICE
80 :
81 : nsObserverService();
82 :
83 : private:
84 : ~nsObserverService();
85 :
86 : protected:
87 : /* additional members */
88 : };
89 :
90 : /* Implementation file */
91 : NS_IMPL_ISUPPORTS1(nsObserverService, nsIObserverService)
92 :
93 : nsObserverService::nsObserverService()
94 : {
95 : /* member initializers and constructor code */
96 : }
97 :
98 : nsObserverService::~nsObserverService()
99 : {
100 : /* destructor code */
101 : }
102 :
103 : /* void addObserver (in nsIObserver anObserver, in string aTopic, in boolean ownsWeak); */
104 : NS_IMETHODIMP nsObserverService::AddObserver(nsIObserver *anObserver, const char * aTopic, bool ownsWeak)
105 : {
106 : return NS_ERROR_NOT_IMPLEMENTED;
107 : }
108 :
109 : /* void removeObserver (in nsIObserver anObserver, in string aTopic); */
110 : NS_IMETHODIMP nsObserverService::RemoveObserver(nsIObserver *anObserver, const char * aTopic)
111 : {
112 : return NS_ERROR_NOT_IMPLEMENTED;
113 : }
114 :
115 : /* void notifyObservers (in nsISupports aSubject, in string aTopic, in wstring someData); */
116 : NS_IMETHODIMP nsObserverService::NotifyObservers(nsISupports *aSubject, const char * aTopic, const PRUnichar * someData)
117 : {
118 : return NS_ERROR_NOT_IMPLEMENTED;
119 : }
120 :
121 : /* nsISimpleEnumerator enumerateObservers (in string aTopic); */
122 : NS_IMETHODIMP nsObserverService::EnumerateObservers(const char * aTopic, nsISimpleEnumerator * *_retval NS_OUTPARAM)
123 : {
124 : return NS_ERROR_NOT_IMPLEMENTED;
125 : }
126 :
127 : /* End of implementation class template. */
128 : #endif
129 :
130 :
131 : #endif /* __gen_nsIObserverService_h__ */
|