1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/netwerk/protocol/websocket/nsIWebSocketListener.idl
3 : */
4 :
5 : #ifndef __gen_nsIWebSocketListener_h__
6 : #define __gen_nsIWebSocketListener_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: nsIWebSocketListener */
19 : #define NS_IWEBSOCKETLISTENER_IID_STR "d74c96b2-65b3-4e39-9e39-c577de5d7a73"
20 :
21 : #define NS_IWEBSOCKETLISTENER_IID \
22 : {0xd74c96b2, 0x65b3, 0x4e39, \
23 : { 0x9e, 0x39, 0xc5, 0x77, 0xde, 0x5d, 0x7a, 0x73 }}
24 :
25 0 : class NS_NO_VTABLE NS_SCRIPTABLE nsIWebSocketListener : public nsISupports {
26 : public:
27 :
28 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_IWEBSOCKETLISTENER_IID)
29 :
30 : /* void onStart (in nsISupports aContext); */
31 : NS_SCRIPTABLE NS_IMETHOD OnStart(nsISupports *aContext) = 0;
32 :
33 : /* void onStop (in nsISupports aContext, in nsresult aStatusCode); */
34 : NS_SCRIPTABLE NS_IMETHOD OnStop(nsISupports *aContext, nsresult aStatusCode) = 0;
35 :
36 : /* void onMessageAvailable (in nsISupports aContext, in AUTF8String aMsg); */
37 : NS_SCRIPTABLE NS_IMETHOD OnMessageAvailable(nsISupports *aContext, const nsACString & aMsg) = 0;
38 :
39 : /* void onBinaryMessageAvailable (in nsISupports aContext, in ACString aMsg); */
40 : NS_SCRIPTABLE NS_IMETHOD OnBinaryMessageAvailable(nsISupports *aContext, const nsACString & aMsg) = 0;
41 :
42 : /* void onAcknowledge (in nsISupports aContext, in PRUint32 aSize); */
43 : NS_SCRIPTABLE NS_IMETHOD OnAcknowledge(nsISupports *aContext, PRUint32 aSize) = 0;
44 :
45 : /* void onServerClose (in nsISupports aContext, in unsigned short aCode, in AUTF8String aReason); */
46 : NS_SCRIPTABLE NS_IMETHOD OnServerClose(nsISupports *aContext, PRUint16 aCode, const nsACString & aReason) = 0;
47 :
48 : };
49 :
50 : NS_DEFINE_STATIC_IID_ACCESSOR(nsIWebSocketListener, NS_IWEBSOCKETLISTENER_IID)
51 :
52 : /* Use this macro when declaring classes that implement this interface. */
53 : #define NS_DECL_NSIWEBSOCKETLISTENER \
54 : NS_SCRIPTABLE NS_IMETHOD OnStart(nsISupports *aContext); \
55 : NS_SCRIPTABLE NS_IMETHOD OnStop(nsISupports *aContext, nsresult aStatusCode); \
56 : NS_SCRIPTABLE NS_IMETHOD OnMessageAvailable(nsISupports *aContext, const nsACString & aMsg); \
57 : NS_SCRIPTABLE NS_IMETHOD OnBinaryMessageAvailable(nsISupports *aContext, const nsACString & aMsg); \
58 : NS_SCRIPTABLE NS_IMETHOD OnAcknowledge(nsISupports *aContext, PRUint32 aSize); \
59 : NS_SCRIPTABLE NS_IMETHOD OnServerClose(nsISupports *aContext, PRUint16 aCode, const nsACString & aReason);
60 :
61 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
62 : #define NS_FORWARD_NSIWEBSOCKETLISTENER(_to) \
63 : NS_SCRIPTABLE NS_IMETHOD OnStart(nsISupports *aContext) { return _to OnStart(aContext); } \
64 : NS_SCRIPTABLE NS_IMETHOD OnStop(nsISupports *aContext, nsresult aStatusCode) { return _to OnStop(aContext, aStatusCode); } \
65 : NS_SCRIPTABLE NS_IMETHOD OnMessageAvailable(nsISupports *aContext, const nsACString & aMsg) { return _to OnMessageAvailable(aContext, aMsg); } \
66 : NS_SCRIPTABLE NS_IMETHOD OnBinaryMessageAvailable(nsISupports *aContext, const nsACString & aMsg) { return _to OnBinaryMessageAvailable(aContext, aMsg); } \
67 : NS_SCRIPTABLE NS_IMETHOD OnAcknowledge(nsISupports *aContext, PRUint32 aSize) { return _to OnAcknowledge(aContext, aSize); } \
68 : NS_SCRIPTABLE NS_IMETHOD OnServerClose(nsISupports *aContext, PRUint16 aCode, const nsACString & aReason) { return _to OnServerClose(aContext, aCode, aReason); }
69 :
70 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
71 : #define NS_FORWARD_SAFE_NSIWEBSOCKETLISTENER(_to) \
72 : NS_SCRIPTABLE NS_IMETHOD OnStart(nsISupports *aContext) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStart(aContext); } \
73 : NS_SCRIPTABLE NS_IMETHOD OnStop(nsISupports *aContext, nsresult aStatusCode) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStop(aContext, aStatusCode); } \
74 : NS_SCRIPTABLE NS_IMETHOD OnMessageAvailable(nsISupports *aContext, const nsACString & aMsg) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnMessageAvailable(aContext, aMsg); } \
75 : NS_SCRIPTABLE NS_IMETHOD OnBinaryMessageAvailable(nsISupports *aContext, const nsACString & aMsg) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnBinaryMessageAvailable(aContext, aMsg); } \
76 : NS_SCRIPTABLE NS_IMETHOD OnAcknowledge(nsISupports *aContext, PRUint32 aSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnAcknowledge(aContext, aSize); } \
77 : NS_SCRIPTABLE NS_IMETHOD OnServerClose(nsISupports *aContext, PRUint16 aCode, const nsACString & aReason) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnServerClose(aContext, aCode, aReason); }
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 nsWebSocketListener : public nsIWebSocketListener
84 : {
85 : public:
86 : NS_DECL_ISUPPORTS
87 : NS_DECL_NSIWEBSOCKETLISTENER
88 :
89 : nsWebSocketListener();
90 :
91 : private:
92 : ~nsWebSocketListener();
93 :
94 : protected:
95 : /* additional members */
96 : };
97 :
98 : /* Implementation file */
99 : NS_IMPL_ISUPPORTS1(nsWebSocketListener, nsIWebSocketListener)
100 :
101 : nsWebSocketListener::nsWebSocketListener()
102 : {
103 : /* member initializers and constructor code */
104 : }
105 :
106 : nsWebSocketListener::~nsWebSocketListener()
107 : {
108 : /* destructor code */
109 : }
110 :
111 : /* void onStart (in nsISupports aContext); */
112 : NS_IMETHODIMP nsWebSocketListener::OnStart(nsISupports *aContext)
113 : {
114 : return NS_ERROR_NOT_IMPLEMENTED;
115 : }
116 :
117 : /* void onStop (in nsISupports aContext, in nsresult aStatusCode); */
118 : NS_IMETHODIMP nsWebSocketListener::OnStop(nsISupports *aContext, nsresult aStatusCode)
119 : {
120 : return NS_ERROR_NOT_IMPLEMENTED;
121 : }
122 :
123 : /* void onMessageAvailable (in nsISupports aContext, in AUTF8String aMsg); */
124 : NS_IMETHODIMP nsWebSocketListener::OnMessageAvailable(nsISupports *aContext, const nsACString & aMsg)
125 : {
126 : return NS_ERROR_NOT_IMPLEMENTED;
127 : }
128 :
129 : /* void onBinaryMessageAvailable (in nsISupports aContext, in ACString aMsg); */
130 : NS_IMETHODIMP nsWebSocketListener::OnBinaryMessageAvailable(nsISupports *aContext, const nsACString & aMsg)
131 : {
132 : return NS_ERROR_NOT_IMPLEMENTED;
133 : }
134 :
135 : /* void onAcknowledge (in nsISupports aContext, in PRUint32 aSize); */
136 : NS_IMETHODIMP nsWebSocketListener::OnAcknowledge(nsISupports *aContext, PRUint32 aSize)
137 : {
138 : return NS_ERROR_NOT_IMPLEMENTED;
139 : }
140 :
141 : /* void onServerClose (in nsISupports aContext, in unsigned short aCode, in AUTF8String aReason); */
142 : NS_IMETHODIMP nsWebSocketListener::OnServerClose(nsISupports *aContext, PRUint16 aCode, const nsACString & aReason)
143 : {
144 : return NS_ERROR_NOT_IMPLEMENTED;
145 : }
146 :
147 : /* End of implementation class template. */
148 : #endif
149 :
150 :
151 : #endif /* __gen_nsIWebSocketListener_h__ */
|