/work/obj-fuzz/dist/include/nsIServerSocket.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * DO NOT EDIT. THIS FILE IS GENERATED FROM /src/mozilla-central/netwerk/base/nsIServerSocket.idl |
3 | | */ |
4 | | |
5 | | #ifndef __gen_nsIServerSocket_h__ |
6 | | #define __gen_nsIServerSocket_h__ |
7 | | |
8 | | |
9 | | #ifndef __gen_nsISupports_h__ |
10 | | #include "nsISupports.h" |
11 | | #endif |
12 | | |
13 | | #include "js/GCAnnotations.h" |
14 | | |
15 | | /* For IDL files that don't want to include root IDL files. */ |
16 | | #ifndef NS_NO_VTABLE |
17 | | #define NS_NO_VTABLE |
18 | | #endif |
19 | | class nsIFile; /* forward declaration */ |
20 | | |
21 | | class nsIServerSocketListener; /* forward declaration */ |
22 | | |
23 | | class nsISocketTransport; /* forward declaration */ |
24 | | |
25 | | typedef uint32_t nsServerSocketFlag; |
26 | | |
27 | | |
28 | | /* starting interface: nsIServerSocket */ |
29 | | #define NS_ISERVERSOCKET_IID_STR "7a9c39cb-a13f-4eef-9bdf-a74301628742" |
30 | | |
31 | | #define NS_ISERVERSOCKET_IID \ |
32 | | {0x7a9c39cb, 0xa13f, 0x4eef, \ |
33 | | { 0x9b, 0xdf, 0xa7, 0x43, 0x01, 0x62, 0x87, 0x42 }} |
34 | | |
35 | | class NS_NO_VTABLE nsIServerSocket : public nsISupports { |
36 | | public: |
37 | | |
38 | | NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISERVERSOCKET_IID) |
39 | | |
40 | | enum { |
41 | | LoopbackOnly = 1U, |
42 | | KeepWhenOffline = 2U |
43 | | }; |
44 | | |
45 | | /* void init (in long aPort, in boolean aLoopbackOnly, in long aBackLog); */ |
46 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Init(int32_t aPort, bool aLoopbackOnly, int32_t aBackLog) = 0; |
47 | | |
48 | | /* void initSpecialConnection (in long aPort, in nsServerSocketFlag aFlags, in long aBackLog); */ |
49 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD InitSpecialConnection(int32_t aPort, nsServerSocketFlag aFlags, int32_t aBackLog) = 0; |
50 | | |
51 | | /* [noscript] void initWithAddress ([const] in PRNetAddrPtr aAddr, in long aBackLog); */ |
52 | | NS_IMETHOD InitWithAddress(const union PRNetAddr * aAddr, int32_t aBackLog) = 0; |
53 | | |
54 | | /* void initWithFilename (in nsIFile aPath, in unsigned long aPermissions, in long aBacklog); */ |
55 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD InitWithFilename(nsIFile *aPath, uint32_t aPermissions, int32_t aBacklog) = 0; |
56 | | |
57 | | /* void initWithAbstractAddress (in AUTF8String aName, in long aBacklog); */ |
58 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD InitWithAbstractAddress(const nsACString& aName, int32_t aBacklog) = 0; |
59 | | |
60 | | /* void close (); */ |
61 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Close(void) = 0; |
62 | | |
63 | | /* void asyncListen (in nsIServerSocketListener aListener); */ |
64 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD AsyncListen(nsIServerSocketListener *aListener) = 0; |
65 | | |
66 | | /* readonly attribute long port; */ |
67 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetPort(int32_t *aPort) = 0; |
68 | | |
69 | | /* [noscript] PRNetAddr getAddress (); */ |
70 | | NS_IMETHOD GetAddress(union PRNetAddr * _retval) = 0; |
71 | | |
72 | | }; |
73 | | |
74 | | NS_DEFINE_STATIC_IID_ACCESSOR(nsIServerSocket, NS_ISERVERSOCKET_IID) |
75 | | |
76 | | /* Use this macro when declaring classes that implement this interface. */ |
77 | | #define NS_DECL_NSISERVERSOCKET \ |
78 | | NS_IMETHOD Init(int32_t aPort, bool aLoopbackOnly, int32_t aBackLog) override; \ |
79 | | NS_IMETHOD InitSpecialConnection(int32_t aPort, nsServerSocketFlag aFlags, int32_t aBackLog) override; \ |
80 | | NS_IMETHOD InitWithAddress(const union PRNetAddr * aAddr, int32_t aBackLog) override; \ |
81 | | NS_IMETHOD InitWithFilename(nsIFile *aPath, uint32_t aPermissions, int32_t aBacklog) override; \ |
82 | | NS_IMETHOD InitWithAbstractAddress(const nsACString& aName, int32_t aBacklog) override; \ |
83 | | NS_IMETHOD Close(void) override; \ |
84 | | NS_IMETHOD AsyncListen(nsIServerSocketListener *aListener) override; \ |
85 | | NS_IMETHOD GetPort(int32_t *aPort) override; \ |
86 | | NS_IMETHOD GetAddress(union PRNetAddr * _retval) override; |
87 | | |
88 | | /* Use this macro when declaring the members of this interface when the |
89 | | class doesn't implement the interface. This is useful for forwarding. */ |
90 | | #define NS_DECL_NON_VIRTUAL_NSISERVERSOCKET \ |
91 | | nsresult Init(int32_t aPort, bool aLoopbackOnly, int32_t aBackLog); \ |
92 | | nsresult InitSpecialConnection(int32_t aPort, nsServerSocketFlag aFlags, int32_t aBackLog); \ |
93 | | nsresult InitWithAddress(const union PRNetAddr * aAddr, int32_t aBackLog); \ |
94 | | nsresult InitWithFilename(nsIFile *aPath, uint32_t aPermissions, int32_t aBacklog); \ |
95 | | nsresult InitWithAbstractAddress(const nsACString& aName, int32_t aBacklog); \ |
96 | | nsresult Close(void); \ |
97 | | nsresult AsyncListen(nsIServerSocketListener *aListener); \ |
98 | | nsresult GetPort(int32_t *aPort); \ |
99 | | nsresult GetAddress(union PRNetAddr * _retval); |
100 | | |
101 | | /* Use this macro to declare functions that forward the behavior of this interface to another object. */ |
102 | | #define NS_FORWARD_NSISERVERSOCKET(_to) \ |
103 | 0 | NS_IMETHOD Init(int32_t aPort, bool aLoopbackOnly, int32_t aBackLog) override { return _to Init(aPort, aLoopbackOnly, aBackLog); } \ |
104 | 0 | NS_IMETHOD InitSpecialConnection(int32_t aPort, nsServerSocketFlag aFlags, int32_t aBackLog) override { return _to InitSpecialConnection(aPort, aFlags, aBackLog); } \ |
105 | 0 | NS_IMETHOD InitWithAddress(const union PRNetAddr * aAddr, int32_t aBackLog) override { return _to InitWithAddress(aAddr, aBackLog); } \ |
106 | 0 | NS_IMETHOD InitWithFilename(nsIFile *aPath, uint32_t aPermissions, int32_t aBacklog) override { return _to InitWithFilename(aPath, aPermissions, aBacklog); } \ |
107 | 0 | NS_IMETHOD InitWithAbstractAddress(const nsACString& aName, int32_t aBacklog) override { return _to InitWithAbstractAddress(aName, aBacklog); } \ |
108 | 0 | NS_IMETHOD Close(void) override { return _to Close(); } \ |
109 | 0 | NS_IMETHOD AsyncListen(nsIServerSocketListener *aListener) override { return _to AsyncListen(aListener); } \ |
110 | 0 | NS_IMETHOD GetPort(int32_t *aPort) override { return _to GetPort(aPort); } \ |
111 | 0 | NS_IMETHOD GetAddress(union PRNetAddr * _retval) override { return _to GetAddress(_retval); } |
112 | | |
113 | | /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ |
114 | | #define NS_FORWARD_SAFE_NSISERVERSOCKET(_to) \ |
115 | | NS_IMETHOD Init(int32_t aPort, bool aLoopbackOnly, int32_t aBackLog) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aPort, aLoopbackOnly, aBackLog); } \ |
116 | | NS_IMETHOD InitSpecialConnection(int32_t aPort, nsServerSocketFlag aFlags, int32_t aBackLog) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InitSpecialConnection(aPort, aFlags, aBackLog); } \ |
117 | | NS_IMETHOD InitWithAddress(const union PRNetAddr * aAddr, int32_t aBackLog) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InitWithAddress(aAddr, aBackLog); } \ |
118 | | NS_IMETHOD InitWithFilename(nsIFile *aPath, uint32_t aPermissions, int32_t aBacklog) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InitWithFilename(aPath, aPermissions, aBacklog); } \ |
119 | | NS_IMETHOD InitWithAbstractAddress(const nsACString& aName, int32_t aBacklog) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InitWithAbstractAddress(aName, aBacklog); } \ |
120 | | NS_IMETHOD Close(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); } \ |
121 | | NS_IMETHOD AsyncListen(nsIServerSocketListener *aListener) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AsyncListen(aListener); } \ |
122 | | NS_IMETHOD GetPort(int32_t *aPort) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPort(aPort); } \ |
123 | | NS_IMETHOD GetAddress(union PRNetAddr * _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAddress(_retval); } |
124 | | |
125 | | |
126 | | /* starting interface: nsIServerSocketListener */ |
127 | | #define NS_ISERVERSOCKETLISTENER_IID_STR "836d98ec-fee2-4bde-b609-abd5e966eabd" |
128 | | |
129 | | #define NS_ISERVERSOCKETLISTENER_IID \ |
130 | | {0x836d98ec, 0xfee2, 0x4bde, \ |
131 | | { 0xb6, 0x09, 0xab, 0xd5, 0xe9, 0x66, 0xea, 0xbd }} |
132 | | |
133 | | class NS_NO_VTABLE nsIServerSocketListener : public nsISupports { |
134 | | public: |
135 | | |
136 | | NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISERVERSOCKETLISTENER_IID) |
137 | | |
138 | | /* void onSocketAccepted (in nsIServerSocket aServ, in nsISocketTransport aTransport); */ |
139 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnSocketAccepted(nsIServerSocket *aServ, nsISocketTransport *aTransport) = 0; |
140 | | |
141 | | /* void onStopListening (in nsIServerSocket aServ, in nsresult aStatus); */ |
142 | | JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD OnStopListening(nsIServerSocket *aServ, nsresult aStatus) = 0; |
143 | | |
144 | | }; |
145 | | |
146 | | NS_DEFINE_STATIC_IID_ACCESSOR(nsIServerSocketListener, NS_ISERVERSOCKETLISTENER_IID) |
147 | | |
148 | | /* Use this macro when declaring classes that implement this interface. */ |
149 | | #define NS_DECL_NSISERVERSOCKETLISTENER \ |
150 | | NS_IMETHOD OnSocketAccepted(nsIServerSocket *aServ, nsISocketTransport *aTransport) override; \ |
151 | | NS_IMETHOD OnStopListening(nsIServerSocket *aServ, nsresult aStatus) override; |
152 | | |
153 | | /* Use this macro when declaring the members of this interface when the |
154 | | class doesn't implement the interface. This is useful for forwarding. */ |
155 | | #define NS_DECL_NON_VIRTUAL_NSISERVERSOCKETLISTENER \ |
156 | | nsresult OnSocketAccepted(nsIServerSocket *aServ, nsISocketTransport *aTransport); \ |
157 | | nsresult OnStopListening(nsIServerSocket *aServ, nsresult aStatus); |
158 | | |
159 | | /* Use this macro to declare functions that forward the behavior of this interface to another object. */ |
160 | | #define NS_FORWARD_NSISERVERSOCKETLISTENER(_to) \ |
161 | | NS_IMETHOD OnSocketAccepted(nsIServerSocket *aServ, nsISocketTransport *aTransport) override { return _to OnSocketAccepted(aServ, aTransport); } \ |
162 | | NS_IMETHOD OnStopListening(nsIServerSocket *aServ, nsresult aStatus) override { return _to OnStopListening(aServ, aStatus); } |
163 | | |
164 | | /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ |
165 | | #define NS_FORWARD_SAFE_NSISERVERSOCKETLISTENER(_to) \ |
166 | | NS_IMETHOD OnSocketAccepted(nsIServerSocket *aServ, nsISocketTransport *aTransport) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnSocketAccepted(aServ, aTransport); } \ |
167 | | NS_IMETHOD OnStopListening(nsIServerSocket *aServ, nsresult aStatus) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStopListening(aServ, aStatus); } |
168 | | |
169 | | |
170 | | #endif /* __gen_nsIServerSocket_h__ */ |