nsIProxyInfo.h 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/mozilla/netwerk/base/public/nsIProxyInfo.idl
  3. */
  4. #ifndef __gen_nsIProxyInfo_h__
  5. #define __gen_nsIProxyInfo_h__
  6. #ifndef __gen_nsISupports_h__
  7. #include "nsISupports.h"
  8. #endif
  9. /* For IDL files that don't want to include root IDL files. */
  10. #ifndef NS_NO_VTABLE
  11. #define NS_NO_VTABLE
  12. #endif
  13. /* starting interface: nsIProxyInfo */
  14. #define NS_IPROXYINFO_IID_STR "3fe9308b-1608-4fa0-933c-c5ec2c6175fd"
  15. #define NS_IPROXYINFO_IID \
  16. {0x3fe9308b, 0x1608, 0x4fa0, \
  17. { 0x93, 0x3c, 0xc5, 0xec, 0x2c, 0x61, 0x75, 0xfd }}
  18. /**
  19. * This interface identifies a proxy server.
  20. *
  21. * @status UNDER_REVIEW
  22. */
  23. class NS_NO_VTABLE nsIProxyInfo : public nsISupports {
  24. public:
  25. NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROXYINFO_IID)
  26. /**
  27. * This attribute specifies the hostname of the proxy server.
  28. */
  29. /* readonly attribute AUTF8String host; */
  30. NS_IMETHOD GetHost(nsACString & aHost) = 0;
  31. /**
  32. * This attribute specifies the port number of the proxy server.
  33. */
  34. /* readonly attribute long port; */
  35. NS_IMETHOD GetPort(PRInt32 *aPort) = 0;
  36. /**
  37. * This attribute specifies the type of the proxy server as an ASCII string.
  38. *
  39. * Some special values for this attribute include (but are not limited to)
  40. * the following:
  41. * "http" HTTP proxy (or SSL CONNECT for HTTPS)
  42. * "socks" SOCKS v5 proxy
  43. * "socks4" SOCKS v4 proxy
  44. * "direct" no proxy
  45. * "unknown" unknown proxy (see nsIProtocolProxyService::resolve)
  46. */
  47. /* readonly attribute ACString type; */
  48. NS_IMETHOD GetType(nsACString & aType) = 0;
  49. /**
  50. * This attribute specifies flags that modify the proxy type. The value of
  51. * this attribute is the bit-wise combination of the Proxy Flags defined
  52. * below. Any undefined bits are reserved for future use.
  53. */
  54. /* readonly attribute unsigned long flags; */
  55. NS_IMETHOD GetFlags(PRUint32 *aFlags) = 0;
  56. /**
  57. * This attribute specifies the failover timeout in seconds for this proxy.
  58. * If a nsIProxyInfo is reported as failed via nsIProtocolProxyService::
  59. * getFailoverForProxy, then the failed proxy will not be used again for this
  60. * many seconds.
  61. */
  62. /* readonly attribute unsigned long failoverTimeout; */
  63. NS_IMETHOD GetFailoverTimeout(PRUint32 *aFailoverTimeout) = 0;
  64. /**
  65. * This attribute specifies the proxy to failover to when this proxy fails.
  66. */
  67. /* attribute nsIProxyInfo failoverProxy; */
  68. NS_IMETHOD GetFailoverProxy(nsIProxyInfo * *aFailoverProxy) = 0;
  69. NS_IMETHOD SetFailoverProxy(nsIProxyInfo * aFailoverProxy) = 0;
  70. /****************************************************************************
  71. * The following "Proxy Flags" may be bit-wise combined to construct the flags
  72. * attribute defined on this interface.
  73. */
  74. /**
  75. * This flag is set if the proxy is to perform name resolution itself. If
  76. * this is the case, the hostname is used in some fashion, and we shouldn't
  77. * do any form of DNS lookup ourselves.
  78. */
  79. enum { TRANSPARENT_PROXY_RESOLVES_HOST = 1U };
  80. };
  81. /* Use this macro when declaring classes that implement this interface. */
  82. #define NS_DECL_NSIPROXYINFO \
  83. NS_IMETHOD GetHost(nsACString & aHost); \
  84. NS_IMETHOD GetPort(PRInt32 *aPort); \
  85. NS_IMETHOD GetType(nsACString & aType); \
  86. NS_IMETHOD GetFlags(PRUint32 *aFlags); \
  87. NS_IMETHOD GetFailoverTimeout(PRUint32 *aFailoverTimeout); \
  88. NS_IMETHOD GetFailoverProxy(nsIProxyInfo * *aFailoverProxy); \
  89. NS_IMETHOD SetFailoverProxy(nsIProxyInfo * aFailoverProxy); \
  90. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  91. #define NS_FORWARD_NSIPROXYINFO(_to) \
  92. NS_IMETHOD GetHost(nsACString & aHost) { return _to GetHost(aHost); } \
  93. NS_IMETHOD GetPort(PRInt32 *aPort) { return _to GetPort(aPort); } \
  94. NS_IMETHOD GetType(nsACString & aType) { return _to GetType(aType); } \
  95. NS_IMETHOD GetFlags(PRUint32 *aFlags) { return _to GetFlags(aFlags); } \
  96. NS_IMETHOD GetFailoverTimeout(PRUint32 *aFailoverTimeout) { return _to GetFailoverTimeout(aFailoverTimeout); } \
  97. NS_IMETHOD GetFailoverProxy(nsIProxyInfo * *aFailoverProxy) { return _to GetFailoverProxy(aFailoverProxy); } \
  98. NS_IMETHOD SetFailoverProxy(nsIProxyInfo * aFailoverProxy) { return _to SetFailoverProxy(aFailoverProxy); } \
  99. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  100. #define NS_FORWARD_SAFE_NSIPROXYINFO(_to) \
  101. NS_IMETHOD GetHost(nsACString & aHost) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHost(aHost); } \
  102. NS_IMETHOD GetPort(PRInt32 *aPort) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPort(aPort); } \
  103. NS_IMETHOD GetType(nsACString & aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetType(aType); } \
  104. NS_IMETHOD GetFlags(PRUint32 *aFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFlags(aFlags); } \
  105. NS_IMETHOD GetFailoverTimeout(PRUint32 *aFailoverTimeout) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFailoverTimeout(aFailoverTimeout); } \
  106. NS_IMETHOD GetFailoverProxy(nsIProxyInfo * *aFailoverProxy) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFailoverProxy(aFailoverProxy); } \
  107. NS_IMETHOD SetFailoverProxy(nsIProxyInfo * aFailoverProxy) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFailoverProxy(aFailoverProxy); } \
  108. #if 0
  109. /* Use the code below as a template for the implementation class for this interface. */
  110. /* Header file */
  111. class nsProxyInfo : public nsIProxyInfo
  112. {
  113. public:
  114. NS_DECL_ISUPPORTS
  115. NS_DECL_NSIPROXYINFO
  116. nsProxyInfo();
  117. private:
  118. ~nsProxyInfo();
  119. protected:
  120. /* additional members */
  121. };
  122. /* Implementation file */
  123. NS_IMPL_ISUPPORTS1(nsProxyInfo, nsIProxyInfo)
  124. nsProxyInfo::nsProxyInfo()
  125. {
  126. /* member initializers and constructor code */
  127. }
  128. nsProxyInfo::~nsProxyInfo()
  129. {
  130. /* destructor code */
  131. }
  132. /* readonly attribute AUTF8String host; */
  133. NS_IMETHODIMP nsProxyInfo::GetHost(nsACString & aHost)
  134. {
  135. return NS_ERROR_NOT_IMPLEMENTED;
  136. }
  137. /* readonly attribute long port; */
  138. NS_IMETHODIMP nsProxyInfo::GetPort(PRInt32 *aPort)
  139. {
  140. return NS_ERROR_NOT_IMPLEMENTED;
  141. }
  142. /* readonly attribute ACString type; */
  143. NS_IMETHODIMP nsProxyInfo::GetType(nsACString & aType)
  144. {
  145. return NS_ERROR_NOT_IMPLEMENTED;
  146. }
  147. /* readonly attribute unsigned long flags; */
  148. NS_IMETHODIMP nsProxyInfo::GetFlags(PRUint32 *aFlags)
  149. {
  150. return NS_ERROR_NOT_IMPLEMENTED;
  151. }
  152. /* readonly attribute unsigned long failoverTimeout; */
  153. NS_IMETHODIMP nsProxyInfo::GetFailoverTimeout(PRUint32 *aFailoverTimeout)
  154. {
  155. return NS_ERROR_NOT_IMPLEMENTED;
  156. }
  157. /* attribute nsIProxyInfo failoverProxy; */
  158. NS_IMETHODIMP nsProxyInfo::GetFailoverProxy(nsIProxyInfo * *aFailoverProxy)
  159. {
  160. return NS_ERROR_NOT_IMPLEMENTED;
  161. }
  162. NS_IMETHODIMP nsProxyInfo::SetFailoverProxy(nsIProxyInfo * aFailoverProxy)
  163. {
  164. return NS_ERROR_NOT_IMPLEMENTED;
  165. }
  166. /* End of implementation class template. */
  167. #endif
  168. #endif /* __gen_nsIProxyInfo_h__ */