PageRenderTime 98ms CodeModel.GetById 55ms RepoModel.GetById 13ms app.codeStats 0ms

/mozilla/mozilla/dist/include/docshell/nsIWebNavigation.h

http://kmbrasil.codeplex.com
C++ Header | 455 lines | 163 code | 67 blank | 225 comment | 0 complexity | 94ab4bd170c7350dd1c4ea09024ca19a MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, GPL-2.0
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM h:/projects/mozilla/mozilla/docshell/base/nsIWebNavigation.idl
  3. */
  4. #ifndef __gen_nsIWebNavigation_h__
  5. #define __gen_nsIWebNavigation_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. class nsIDOMDocument; /* forward declaration */
  14. class nsIInputStream; /* forward declaration */
  15. class nsISHistory; /* forward declaration */
  16. class nsIURI; /* forward declaration */
  17. /* starting interface: nsIWebNavigation */
  18. #define NS_IWEBNAVIGATION_IID_STR "f5d9e7b0-d930-11d3-b057-00a024ffc08c"
  19. #define NS_IWEBNAVIGATION_IID \
  20. {0xf5d9e7b0, 0xd930, 0x11d3, \
  21. { 0xb0, 0x57, 0x00, 0xa0, 0x24, 0xff, 0xc0, 0x8c }}
  22. /**
  23. * The nsIWebNavigation interface defines an interface for navigating the web.
  24. * It provides methods and attributes to direct an object to navigate to a new
  25. * location, stop or restart an in process load, or determine where the object
  26. * has previously gone.
  27. *
  28. * @status UNDER_REVIEW
  29. */
  30. class NS_NO_VTABLE nsIWebNavigation : public nsISupports {
  31. public:
  32. NS_DEFINE_STATIC_IID_ACCESSOR(NS_IWEBNAVIGATION_IID)
  33. /**
  34. * Indicates if the object can go back. If true this indicates that
  35. * there is back session history available for navigation.
  36. */
  37. /* readonly attribute boolean canGoBack; */
  38. NS_IMETHOD GetCanGoBack(PRBool *aCanGoBack) = 0;
  39. /**
  40. * Indicates if the object can go forward. If true this indicates that
  41. * there is forward session history available for navigation
  42. */
  43. /* readonly attribute boolean canGoForward; */
  44. NS_IMETHOD GetCanGoForward(PRBool *aCanGoForward) = 0;
  45. /**
  46. * Tells the object to navigate to the previous session history item. When a
  47. * page is loaded from session history, all content is loaded from the cache
  48. * (if available) and page state (such as form values and scroll position) is
  49. * restored.
  50. *
  51. * @throw NS_ERROR_UNEXPECTED
  52. * Indicates that the call was unexpected at this time, which implies
  53. * that canGoBack is false.
  54. */
  55. /* void goBack (); */
  56. NS_IMETHOD GoBack(void) = 0;
  57. /**
  58. * Tells the object to navigate to the next session history item. When a
  59. * page is loaded from session history, all content is loaded from the cache
  60. * (if available) and page state (such as form values and scroll position) is
  61. * restored.
  62. *
  63. * @throw NS_ERROR_UNEXPECTED
  64. * Indicates that the call was unexpected at this time, which implies
  65. * that canGoForward is false.
  66. */
  67. /* void goForward (); */
  68. NS_IMETHOD GoForward(void) = 0;
  69. /**
  70. * Tells the object to navigate to the session history item at a given index.
  71. *
  72. * @throw NS_ERROR_UNEXPECTED
  73. * Indicates that the call was unexpected at this time, which implies
  74. * that session history entry at the given index does not exist.
  75. */
  76. /* void gotoIndex (in long index); */
  77. NS_IMETHOD GotoIndex(PRInt32 index) = 0;
  78. /****************************************************************************
  79. * The following flags may be bitwise combined to form the load flags
  80. * parameter passed to either the loadURI or reload method. Some of these
  81. * flags are only applicable to loadURI.
  82. */
  83. /**
  84. * This flags defines the range of bits that may be specified.
  85. */
  86. enum { LOAD_FLAGS_MASK = 65535U };
  87. /**
  88. * This is the default value for the load flags parameter.
  89. */
  90. enum { LOAD_FLAGS_NONE = 0U };
  91. /**
  92. * This flag specifies that the load should have the semantics of an HTML
  93. * META refresh (i.e., that the cache should be validated). This flag is
  94. * only applicable to loadURI.
  95. * XXX the meaning of this flag is poorly defined.
  96. */
  97. enum { LOAD_FLAGS_IS_REFRESH = 16U };
  98. /**
  99. * This flag specifies that the load should have the semantics of a link
  100. * click. This flag is only applicable to loadURI.
  101. * XXX the meaning of this flag is poorly defined.
  102. */
  103. enum { LOAD_FLAGS_IS_LINK = 32U };
  104. /**
  105. * This flag specifies that history should not be updated. This flag is only
  106. * applicable to loadURI.
  107. */
  108. enum { LOAD_FLAGS_BYPASS_HISTORY = 64U };
  109. /**
  110. * This flag specifies that any existing history entry should be replaced.
  111. * This flag is only applicable to loadURI.
  112. */
  113. enum { LOAD_FLAGS_REPLACE_HISTORY = 128U };
  114. /**
  115. * This flag specifies that the local web cache should be bypassed, but an
  116. * intermediate proxy cache could still be used to satisfy the load.
  117. */
  118. enum { LOAD_FLAGS_BYPASS_CACHE = 256U };
  119. /**
  120. * This flag specifies that any intermediate proxy caches should be bypassed
  121. * (i.e., that the content should be loaded from the origin server).
  122. */
  123. enum { LOAD_FLAGS_BYPASS_PROXY = 512U };
  124. /**
  125. * This flag specifies that a reload was triggered as a result of detecting
  126. * an incorrect character encoding while parsing a previously loaded
  127. * document.
  128. */
  129. enum { LOAD_FLAGS_CHARSET_CHANGE = 1024U };
  130. /**
  131. * If this flag is set, Stop() will be called before the load starts
  132. * and will stop both content and network activity (the default is to
  133. * only stop network activity). Effectively, this passes the
  134. * STOP_CONTENT flag to Stop(), in addition to the STOP_NETWORK flag.
  135. */
  136. enum { LOAD_FLAGS_STOP_CONTENT = 2048U };
  137. /**
  138. * A hint this load was prompted by an external program: take care!
  139. */
  140. enum { LOAD_FLAGS_FROM_EXTERNAL = 4096U };
  141. /**
  142. * This flag specifies that the URI may be submitted to a third-party
  143. * server for correction. This should only be applied to non-sensitive
  144. * URIs entered by users.
  145. */
  146. enum { LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP = 8192U };
  147. /**
  148. * This flag specifies that this is the first load in this object.
  149. * Set with care, since setting incorrectly can cause us to assume that
  150. * nothing was actually loaded in this object if the load ends up being
  151. * handled by an external application.
  152. */
  153. enum { LOAD_FLAGS_FIRST_LOAD = 16384U };
  154. /**
  155. * Loads a given URI. This will give priority to loading the requested URI
  156. * in the object implementing this interface. If it can't be loaded here
  157. * however, the URI dispatcher will go through its normal process of content
  158. * loading.
  159. *
  160. * @param aURI
  161. * The URI string to load. For HTTP and FTP URLs and possibly others,
  162. * characters above U+007F will be converted to UTF-8 and then URL-
  163. * escaped per the rules of RFC 2396.
  164. * @param aLoadFlags
  165. * Flags modifying load behaviour. This parameter is a bitwise
  166. * combination of the load flags defined above. (Undefined bits are
  167. * reserved for future use.) Generally you will pass LOAD_FLAGS_NONE
  168. * for this parameter.
  169. * @param aReferrer
  170. * The referring URI. If this argument is null, then the referring
  171. * URI will be inferred internally.
  172. * @param aPostData
  173. * If the URI corresponds to a HTTP request, then this stream is
  174. * appended directly to the HTTP request headers. It may be prefixed
  175. * with additional HTTP headers. This stream must contain a "\r\n"
  176. * sequence separating any HTTP headers from the HTTP request body.
  177. * This parameter is optional and may be null.
  178. * @param aHeaders
  179. * If the URI corresponds to a HTTP request, then any HTTP headers
  180. * contained in this stream are set on the HTTP request. The HTTP
  181. * header stream is formatted as:
  182. * ( HEADER "\r\n" )*
  183. * This parameter is optional and may be null.
  184. */
  185. /* void loadURI (in wstring aURI, in unsigned long aLoadFlags, in nsIURI aReferrer, in nsIInputStream aPostData, in nsIInputStream aHeaders); */
  186. NS_IMETHOD LoadURI(const PRUnichar *aURI, PRUint32 aLoadFlags, nsIURI *aReferrer, nsIInputStream *aPostData, nsIInputStream *aHeaders) = 0;
  187. /**
  188. * Tells the Object to reload the current page. There may be cases where the
  189. * user will be asked to confirm the reload (for example, when it is
  190. * determined that the request is non-idempotent).
  191. *
  192. * @param aReloadFlags
  193. * Flags modifying load behaviour. This parameter is a bitwise
  194. * combination of the Load Flags defined above. (Undefined bits are
  195. * reserved for future use.) Generally you will pass LOAD_FLAGS_NONE
  196. * for this parameter.
  197. *
  198. * @throw NS_BINDING_ABORTED
  199. * Indicating that the user canceled the reload.
  200. */
  201. /* void reload (in unsigned long aReloadFlags); */
  202. NS_IMETHOD Reload(PRUint32 aReloadFlags) = 0;
  203. /****************************************************************************
  204. * The following flags may be passed as the stop flags parameter to the stop
  205. * method defined on this interface.
  206. */
  207. /**
  208. * This flag specifies that all network activity should be stopped. This
  209. * includes both active network loads and pending META-refreshes.
  210. */
  211. enum { STOP_NETWORK = 1U };
  212. /**
  213. * This flag specifies that all content activity should be stopped. This
  214. * includes animated images, plugins and pending Javascript timeouts.
  215. */
  216. enum { STOP_CONTENT = 2U };
  217. /**
  218. * This flag specifies that all activity should be stopped.
  219. */
  220. enum { STOP_ALL = 3U };
  221. /**
  222. * Stops a load of a URI.
  223. *
  224. * @param aStopFlags
  225. * This parameter is one of the stop flags defined above.
  226. */
  227. /* void stop (in unsigned long aStopFlags); */
  228. NS_IMETHOD Stop(PRUint32 aStopFlags) = 0;
  229. /**
  230. * Retrieves the current DOM document for the frame, or lazily creates a
  231. * blank document if there is none. This attribute never returns null except
  232. * for unexpected error situations.
  233. */
  234. /* readonly attribute nsIDOMDocument document; */
  235. NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument) = 0;
  236. /**
  237. * The currently loaded URI or null.
  238. */
  239. /* readonly attribute nsIURI currentURI; */
  240. NS_IMETHOD GetCurrentURI(nsIURI * *aCurrentURI) = 0;
  241. /**
  242. * The referring URI for the currently loaded URI or null.
  243. */
  244. /* readonly attribute nsIURI referringURI; */
  245. NS_IMETHOD GetReferringURI(nsIURI * *aReferringURI) = 0;
  246. /**
  247. * The session history object used by this web navigation instance.
  248. */
  249. /* attribute nsISHistory sessionHistory; */
  250. NS_IMETHOD GetSessionHistory(nsISHistory * *aSessionHistory) = 0;
  251. NS_IMETHOD SetSessionHistory(nsISHistory * aSessionHistory) = 0;
  252. };
  253. /* Use this macro when declaring classes that implement this interface. */
  254. #define NS_DECL_NSIWEBNAVIGATION \
  255. NS_IMETHOD GetCanGoBack(PRBool *aCanGoBack); \
  256. NS_IMETHOD GetCanGoForward(PRBool *aCanGoForward); \
  257. NS_IMETHOD GoBack(void); \
  258. NS_IMETHOD GoForward(void); \
  259. NS_IMETHOD GotoIndex(PRInt32 index); \
  260. NS_IMETHOD LoadURI(const PRUnichar *aURI, PRUint32 aLoadFlags, nsIURI *aReferrer, nsIInputStream *aPostData, nsIInputStream *aHeaders); \
  261. NS_IMETHOD Reload(PRUint32 aReloadFlags); \
  262. NS_IMETHOD Stop(PRUint32 aStopFlags); \
  263. NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument); \
  264. NS_IMETHOD GetCurrentURI(nsIURI * *aCurrentURI); \
  265. NS_IMETHOD GetReferringURI(nsIURI * *aReferringURI); \
  266. NS_IMETHOD GetSessionHistory(nsISHistory * *aSessionHistory); \
  267. NS_IMETHOD SetSessionHistory(nsISHistory * aSessionHistory);
  268. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  269. #define NS_FORWARD_NSIWEBNAVIGATION(_to) \
  270. NS_IMETHOD GetCanGoBack(PRBool *aCanGoBack) { return _to GetCanGoBack(aCanGoBack); } \
  271. NS_IMETHOD GetCanGoForward(PRBool *aCanGoForward) { return _to GetCanGoForward(aCanGoForward); } \
  272. NS_IMETHOD GoBack(void) { return _to GoBack(); } \
  273. NS_IMETHOD GoForward(void) { return _to GoForward(); } \
  274. NS_IMETHOD GotoIndex(PRInt32 index) { return _to GotoIndex(index); } \
  275. NS_IMETHOD LoadURI(const PRUnichar *aURI, PRUint32 aLoadFlags, nsIURI *aReferrer, nsIInputStream *aPostData, nsIInputStream *aHeaders) { return _to LoadURI(aURI, aLoadFlags, aReferrer, aPostData, aHeaders); } \
  276. NS_IMETHOD Reload(PRUint32 aReloadFlags) { return _to Reload(aReloadFlags); } \
  277. NS_IMETHOD Stop(PRUint32 aStopFlags) { return _to Stop(aStopFlags); } \
  278. NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument) { return _to GetDocument(aDocument); } \
  279. NS_IMETHOD GetCurrentURI(nsIURI * *aCurrentURI) { return _to GetCurrentURI(aCurrentURI); } \
  280. NS_IMETHOD GetReferringURI(nsIURI * *aReferringURI) { return _to GetReferringURI(aReferringURI); } \
  281. NS_IMETHOD GetSessionHistory(nsISHistory * *aSessionHistory) { return _to GetSessionHistory(aSessionHistory); } \
  282. NS_IMETHOD SetSessionHistory(nsISHistory * aSessionHistory) { return _to SetSessionHistory(aSessionHistory); }
  283. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  284. #define NS_FORWARD_SAFE_NSIWEBNAVIGATION(_to) \
  285. NS_IMETHOD GetCanGoBack(PRBool *aCanGoBack) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCanGoBack(aCanGoBack); } \
  286. NS_IMETHOD GetCanGoForward(PRBool *aCanGoForward) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCanGoForward(aCanGoForward); } \
  287. NS_IMETHOD GoBack(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->GoBack(); } \
  288. NS_IMETHOD GoForward(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->GoForward(); } \
  289. NS_IMETHOD GotoIndex(PRInt32 index) { return !_to ? NS_ERROR_NULL_POINTER : _to->GotoIndex(index); } \
  290. NS_IMETHOD LoadURI(const PRUnichar *aURI, PRUint32 aLoadFlags, nsIURI *aReferrer, nsIInputStream *aPostData, nsIInputStream *aHeaders) { return !_to ? NS_ERROR_NULL_POINTER : _to->LoadURI(aURI, aLoadFlags, aReferrer, aPostData, aHeaders); } \
  291. NS_IMETHOD Reload(PRUint32 aReloadFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->Reload(aReloadFlags); } \
  292. NS_IMETHOD Stop(PRUint32 aStopFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->Stop(aStopFlags); } \
  293. NS_IMETHOD GetDocument(nsIDOMDocument * *aDocument) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocument(aDocument); } \
  294. NS_IMETHOD GetCurrentURI(nsIURI * *aCurrentURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentURI(aCurrentURI); } \
  295. NS_IMETHOD GetReferringURI(nsIURI * *aReferringURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetReferringURI(aReferringURI); } \
  296. NS_IMETHOD GetSessionHistory(nsISHistory * *aSessionHistory) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSessionHistory(aSessionHistory); } \
  297. NS_IMETHOD SetSessionHistory(nsISHistory * aSessionHistory) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSessionHistory(aSessionHistory); }
  298. #if 0
  299. /* Use the code below as a template for the implementation class for this interface. */
  300. /* Header file */
  301. class nsWebNavigation : public nsIWebNavigation
  302. {
  303. public:
  304. NS_DECL_ISUPPORTS
  305. NS_DECL_NSIWEBNAVIGATION
  306. nsWebNavigation();
  307. private:
  308. ~nsWebNavigation();
  309. protected:
  310. /* additional members */
  311. };
  312. /* Implementation file */
  313. NS_IMPL_ISUPPORTS1(nsWebNavigation, nsIWebNavigation)
  314. nsWebNavigation::nsWebNavigation()
  315. {
  316. /* member initializers and constructor code */
  317. }
  318. nsWebNavigation::~nsWebNavigation()
  319. {
  320. /* destructor code */
  321. }
  322. /* readonly attribute boolean canGoBack; */
  323. NS_IMETHODIMP nsWebNavigation::GetCanGoBack(PRBool *aCanGoBack)
  324. {
  325. return NS_ERROR_NOT_IMPLEMENTED;
  326. }
  327. /* readonly attribute boolean canGoForward; */
  328. NS_IMETHODIMP nsWebNavigation::GetCanGoForward(PRBool *aCanGoForward)
  329. {
  330. return NS_ERROR_NOT_IMPLEMENTED;
  331. }
  332. /* void goBack (); */
  333. NS_IMETHODIMP nsWebNavigation::GoBack()
  334. {
  335. return NS_ERROR_NOT_IMPLEMENTED;
  336. }
  337. /* void goForward (); */
  338. NS_IMETHODIMP nsWebNavigation::GoForward()
  339. {
  340. return NS_ERROR_NOT_IMPLEMENTED;
  341. }
  342. /* void gotoIndex (in long index); */
  343. NS_IMETHODIMP nsWebNavigation::GotoIndex(PRInt32 index)
  344. {
  345. return NS_ERROR_NOT_IMPLEMENTED;
  346. }
  347. /* void loadURI (in wstring aURI, in unsigned long aLoadFlags, in nsIURI aReferrer, in nsIInputStream aPostData, in nsIInputStream aHeaders); */
  348. NS_IMETHODIMP nsWebNavigation::LoadURI(const PRUnichar *aURI, PRUint32 aLoadFlags, nsIURI *aReferrer, nsIInputStream *aPostData, nsIInputStream *aHeaders)
  349. {
  350. return NS_ERROR_NOT_IMPLEMENTED;
  351. }
  352. /* void reload (in unsigned long aReloadFlags); */
  353. NS_IMETHODIMP nsWebNavigation::Reload(PRUint32 aReloadFlags)
  354. {
  355. return NS_ERROR_NOT_IMPLEMENTED;
  356. }
  357. /* void stop (in unsigned long aStopFlags); */
  358. NS_IMETHODIMP nsWebNavigation::Stop(PRUint32 aStopFlags)
  359. {
  360. return NS_ERROR_NOT_IMPLEMENTED;
  361. }
  362. /* readonly attribute nsIDOMDocument document; */
  363. NS_IMETHODIMP nsWebNavigation::GetDocument(nsIDOMDocument * *aDocument)
  364. {
  365. return NS_ERROR_NOT_IMPLEMENTED;
  366. }
  367. /* readonly attribute nsIURI currentURI; */
  368. NS_IMETHODIMP nsWebNavigation::GetCurrentURI(nsIURI * *aCurrentURI)
  369. {
  370. return NS_ERROR_NOT_IMPLEMENTED;
  371. }
  372. /* readonly attribute nsIURI referringURI; */
  373. NS_IMETHODIMP nsWebNavigation::GetReferringURI(nsIURI * *aReferringURI)
  374. {
  375. return NS_ERROR_NOT_IMPLEMENTED;
  376. }
  377. /* attribute nsISHistory sessionHistory; */
  378. NS_IMETHODIMP nsWebNavigation::GetSessionHistory(nsISHistory * *aSessionHistory)
  379. {
  380. return NS_ERROR_NOT_IMPLEMENTED;
  381. }
  382. NS_IMETHODIMP nsWebNavigation::SetSessionHistory(nsISHistory * aSessionHistory)
  383. {
  384. return NS_ERROR_NOT_IMPLEMENTED;
  385. }
  386. /* End of implementation class template. */
  387. #endif
  388. #endif /* __gen_nsIWebNavigation_h__ */