1 : /*
2 : * DO NOT EDIT. THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/netwerk/socket/nsISocketProvider.idl
3 : */
4 :
5 : #ifndef __gen_nsISocketProvider_h__
6 : #define __gen_nsISocketProvider_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: nsISocketProvider */
19 : #define NS_ISOCKETPROVIDER_IID_STR "00b3df92-e830-11d8-d48e-0004e22243f8"
20 :
21 : #define NS_ISOCKETPROVIDER_IID \
22 : {0x00b3df92, 0xe830, 0x11d8, \
23 : { 0xd4, 0x8e, 0x00, 0x04, 0xe2, 0x22, 0x43, 0xf8 }}
24 :
25 5 : class NS_NO_VTABLE NS_SCRIPTABLE nsISocketProvider : public nsISupports {
26 : public:
27 :
28 : NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISOCKETPROVIDER_IID)
29 :
30 : /* [noscript] void newSocket (in long aFamily, in string aHost, in long aPort, in string aProxyHost, in long aProxyPort, in unsigned long aFlags, out PRFileDescStar aFileDesc, out nsISupports aSecurityInfo); */
31 : NS_IMETHOD NewSocket(PRInt32 aFamily, const char * aHost, PRInt32 aPort, const char * aProxyHost, PRInt32 aProxyPort, PRUint32 aFlags, struct PRFileDesc **aFileDesc NS_OUTPARAM, nsISupports * *aSecurityInfo NS_OUTPARAM) = 0;
32 :
33 : /* [noscript] void addToSocket (in long aFamily, in string aHost, in long aPort, in string aProxyHost, in long aProxyPort, in unsigned long aFlags, in PRFileDescStar aFileDesc, out nsISupports aSecurityInfo); */
34 : NS_IMETHOD AddToSocket(PRInt32 aFamily, const char * aHost, PRInt32 aPort, const char * aProxyHost, PRInt32 aProxyPort, PRUint32 aFlags, struct PRFileDesc *aFileDesc, nsISupports * *aSecurityInfo NS_OUTPARAM) = 0;
35 :
36 : enum {
37 : PROXY_RESOLVES_HOST = 1,
38 : ANONYMOUS_CONNECT = 2
39 : };
40 :
41 : };
42 :
43 : NS_DEFINE_STATIC_IID_ACCESSOR(nsISocketProvider, NS_ISOCKETPROVIDER_IID)
44 :
45 : /* Use this macro when declaring classes that implement this interface. */
46 : #define NS_DECL_NSISOCKETPROVIDER \
47 : NS_IMETHOD NewSocket(PRInt32 aFamily, const char * aHost, PRInt32 aPort, const char * aProxyHost, PRInt32 aProxyPort, PRUint32 aFlags, struct PRFileDesc **aFileDesc NS_OUTPARAM, nsISupports * *aSecurityInfo NS_OUTPARAM); \
48 : NS_IMETHOD AddToSocket(PRInt32 aFamily, const char * aHost, PRInt32 aPort, const char * aProxyHost, PRInt32 aProxyPort, PRUint32 aFlags, struct PRFileDesc *aFileDesc, nsISupports * *aSecurityInfo NS_OUTPARAM); \
49 :
50 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
51 : #define NS_FORWARD_NSISOCKETPROVIDER(_to) \
52 : NS_IMETHOD NewSocket(PRInt32 aFamily, const char * aHost, PRInt32 aPort, const char * aProxyHost, PRInt32 aProxyPort, PRUint32 aFlags, struct PRFileDesc **aFileDesc NS_OUTPARAM, nsISupports * *aSecurityInfo NS_OUTPARAM) { return _to NewSocket(aFamily, aHost, aPort, aProxyHost, aProxyPort, aFlags, aFileDesc, aSecurityInfo); } \
53 : NS_IMETHOD AddToSocket(PRInt32 aFamily, const char * aHost, PRInt32 aPort, const char * aProxyHost, PRInt32 aProxyPort, PRUint32 aFlags, struct PRFileDesc *aFileDesc, nsISupports * *aSecurityInfo NS_OUTPARAM) { return _to AddToSocket(aFamily, aHost, aPort, aProxyHost, aProxyPort, aFlags, aFileDesc, aSecurityInfo); } \
54 :
55 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
56 : #define NS_FORWARD_SAFE_NSISOCKETPROVIDER(_to) \
57 : NS_IMETHOD NewSocket(PRInt32 aFamily, const char * aHost, PRInt32 aPort, const char * aProxyHost, PRInt32 aProxyPort, PRUint32 aFlags, struct PRFileDesc **aFileDesc NS_OUTPARAM, nsISupports * *aSecurityInfo NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->NewSocket(aFamily, aHost, aPort, aProxyHost, aProxyPort, aFlags, aFileDesc, aSecurityInfo); } \
58 : NS_IMETHOD AddToSocket(PRInt32 aFamily, const char * aHost, PRInt32 aPort, const char * aProxyHost, PRInt32 aProxyPort, PRUint32 aFlags, struct PRFileDesc *aFileDesc, nsISupports * *aSecurityInfo NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddToSocket(aFamily, aHost, aPort, aProxyHost, aProxyPort, aFlags, aFileDesc, aSecurityInfo); } \
59 :
60 : #if 0
61 : /* Use the code below as a template for the implementation class for this interface. */
62 :
63 : /* Header file */
64 : class nsSocketProvider : public nsISocketProvider
65 : {
66 : public:
67 : NS_DECL_ISUPPORTS
68 : NS_DECL_NSISOCKETPROVIDER
69 :
70 : nsSocketProvider();
71 :
72 : private:
73 : ~nsSocketProvider();
74 :
75 : protected:
76 : /* additional members */
77 : };
78 :
79 : /* Implementation file */
80 : NS_IMPL_ISUPPORTS1(nsSocketProvider, nsISocketProvider)
81 :
82 : nsSocketProvider::nsSocketProvider()
83 : {
84 : /* member initializers and constructor code */
85 : }
86 :
87 : nsSocketProvider::~nsSocketProvider()
88 : {
89 : /* destructor code */
90 : }
91 :
92 : /* [noscript] void newSocket (in long aFamily, in string aHost, in long aPort, in string aProxyHost, in long aProxyPort, in unsigned long aFlags, out PRFileDescStar aFileDesc, out nsISupports aSecurityInfo); */
93 : NS_IMETHODIMP nsSocketProvider::NewSocket(PRInt32 aFamily, const char * aHost, PRInt32 aPort, const char * aProxyHost, PRInt32 aProxyPort, PRUint32 aFlags, struct PRFileDesc **aFileDesc NS_OUTPARAM, nsISupports * *aSecurityInfo NS_OUTPARAM)
94 : {
95 : return NS_ERROR_NOT_IMPLEMENTED;
96 : }
97 :
98 : /* [noscript] void addToSocket (in long aFamily, in string aHost, in long aPort, in string aProxyHost, in long aProxyPort, in unsigned long aFlags, in PRFileDescStar aFileDesc, out nsISupports aSecurityInfo); */
99 : NS_IMETHODIMP nsSocketProvider::AddToSocket(PRInt32 aFamily, const char * aHost, PRInt32 aPort, const char * aProxyHost, PRInt32 aProxyPort, PRUint32 aFlags, struct PRFileDesc *aFileDesc, nsISupports * *aSecurityInfo NS_OUTPARAM)
100 : {
101 : return NS_ERROR_NOT_IMPLEMENTED;
102 : }
103 :
104 : /* End of implementation class template. */
105 : #endif
106 :
107 : /**
108 : * nsISocketProvider implementations should be registered with XPCOM under a
109 : * contract ID of the form: "@mozilla.org/network/socket;2?type=foo"
110 : */
111 : #define NS_NETWORK_SOCKET_CONTRACTID_PREFIX \
112 : "@mozilla.org/network/socket;2?type="
113 :
114 : #endif /* __gen_nsISocketProvider_h__ */
|