1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669
// // DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl/nsIWebBrowserPersist.idl // /// `interface nsIWebBrowserPersist : nsICancelable` /// /// ```text /// /** /// * Interface for persisting DOM documents and URIs to local or remote storage. /// */ /// ``` /// // The actual type definition for the interface. This struct has methods // declared on it which will call through its vtable. You never want to pass // this type around by value, always pass it behind a reference. #[repr(C)] pub struct nsIWebBrowserPersist { vtable: *const nsIWebBrowserPersistVTable, /// This field is a phantomdata to ensure that the VTable type and any /// struct containing it is not safe to send across threads, as XPCOM is /// generally not threadsafe. /// /// XPCOM interfaces in general are not safe to send across threads. __nosync: ::std::marker::PhantomData<::std::rc::Rc<u8>>, } // Implementing XpCom for an interface exposes its IID, which allows for easy // use of the `.query_interface<T>` helper method. This also defines that // method for nsIWebBrowserPersist. unsafe impl XpCom for nsIWebBrowserPersist { const IID: nsIID = nsID(0x8cd752a4, 0x60b1, 0x42c3, [0xa8, 0x19, 0x65, 0xc7, 0xa1, 0x13, 0x8a, 0x28]); } // We need to implement the RefCounted trait so we can be used with `RefPtr`. // This trait teaches `RefPtr` how to manage our memory. unsafe impl RefCounted for nsIWebBrowserPersist { #[inline] unsafe fn addref(&self) { self.AddRef(); } #[inline] unsafe fn release(&self) { self.Release(); } } // This trait is implemented on all types which can be coerced to from nsIWebBrowserPersist. // It is used in the implementation of `fn coerce<T>`. We hide it from the // documentation, because it clutters it up a lot. #[doc(hidden)] pub trait nsIWebBrowserPersistCoerce { /// Cheaply cast a value of this type from a `nsIWebBrowserPersist`. fn coerce_from(v: &nsIWebBrowserPersist) -> &Self; } // The trivial implementation: We can obviously coerce ourselves to ourselves. impl nsIWebBrowserPersistCoerce for nsIWebBrowserPersist { #[inline] fn coerce_from(v: &nsIWebBrowserPersist) -> &Self { v } } impl nsIWebBrowserPersist { /// Cast this `nsIWebBrowserPersist` to one of its base interfaces. #[inline] pub fn coerce<T: nsIWebBrowserPersistCoerce>(&self) -> &T { T::coerce_from(self) } } // Every interface struct type implements `Deref` to its base interface. This // causes methods on the base interfaces to be directly avaliable on the // object. For example, you can call `.AddRef` or `.QueryInterface` directly // on any interface which inherits from `nsISupports`. impl ::std::ops::Deref for nsIWebBrowserPersist { type Target = nsICancelable; #[inline] fn deref(&self) -> &nsICancelable { unsafe { ::std::mem::transmute(self) } } } // Ensure we can use .coerce() to cast to our base types as well. Any type which // our base interface can coerce from should be coercable from us as well. impl<T: nsICancelableCoerce> nsIWebBrowserPersistCoerce for T { #[inline] fn coerce_from(v: &nsIWebBrowserPersist) -> &Self { T::coerce_from(v) } } // This struct represents the interface's VTable. A pointer to a statically // allocated version of this struct is at the beginning of every nsIWebBrowserPersist // object. It contains one pointer field for each method in the interface. In // the case where we can't generate a binding for a method, we include a void // pointer. #[doc(hidden)] #[repr(C)] pub struct nsIWebBrowserPersistVTable { /// We need to include the members from the base interface's vtable at the start /// of the VTable definition. pub __base: nsICancelableVTable, /* attribute unsigned long persistFlags; */ pub GetPersistFlags: unsafe extern "system" fn (this: *const nsIWebBrowserPersist, aPersistFlags: *mut libc::uint32_t) -> nsresult, /* attribute unsigned long persistFlags; */ pub SetPersistFlags: unsafe extern "system" fn (this: *const nsIWebBrowserPersist, aPersistFlags: libc::uint32_t) -> nsresult, /* readonly attribute unsigned long currentState; */ pub GetCurrentState: unsafe extern "system" fn (this: *const nsIWebBrowserPersist, aCurrentState: *mut libc::uint32_t) -> nsresult, /* readonly attribute nsresult result; */ pub GetResult: unsafe extern "system" fn (this: *const nsIWebBrowserPersist, aResult: *mut nsresult) -> nsresult, /* attribute nsIWebProgressListener progressListener; */ pub GetProgressListener: unsafe extern "system" fn (this: *const nsIWebBrowserPersist, aProgressListener: *mut *const nsIWebProgressListener) -> nsresult, /* attribute nsIWebProgressListener progressListener; */ pub SetProgressListener: unsafe extern "system" fn (this: *const nsIWebBrowserPersist, aProgressListener: *const nsIWebProgressListener) -> nsresult, /* void saveURI (in nsIURI aURI, in nsISupports aCacheKey, in nsIURI aReferrer, in unsigned long aReferrerPolicy, in nsIInputStream aPostData, in string aExtraHeaders, in nsISupports aFile, in nsILoadContext aPrivacyContext); */ pub SaveURI: unsafe extern "system" fn (this: *const nsIWebBrowserPersist, aURI: *const nsIURI, aCacheKey: *const nsISupports, aReferrer: *const nsIURI, aReferrerPolicy: libc::uint32_t, aPostData: *const nsIInputStream, aExtraHeaders: *const libc::c_char, aFile: *const nsISupports, aPrivacyContext: *const nsILoadContext) -> nsresult, /* void savePrivacyAwareURI (in nsIURI aURI, in nsISupports aCacheKey, in nsIURI aReferrer, in unsigned long aReferrerPolicy, in nsIInputStream aPostData, in string aExtraHeaders, in nsISupports aFile, in boolean aIsPrivate); */ pub SavePrivacyAwareURI: unsafe extern "system" fn (this: *const nsIWebBrowserPersist, aURI: *const nsIURI, aCacheKey: *const nsISupports, aReferrer: *const nsIURI, aReferrerPolicy: libc::uint32_t, aPostData: *const nsIInputStream, aExtraHeaders: *const libc::c_char, aFile: *const nsISupports, aIsPrivate: bool) -> nsresult, /* void saveChannel (in nsIChannel aChannel, in nsISupports aFile); */ pub SaveChannel: unsafe extern "system" fn (this: *const nsIWebBrowserPersist, aChannel: *const nsIChannel, aFile: *const nsISupports) -> nsresult, /* void saveDocument (in nsISupports aDocument, in nsISupports aFile, in nsISupports aDataPath, in string aOutputContentType, in unsigned long aEncodingFlags, in unsigned long aWrapColumn); */ pub SaveDocument: unsafe extern "system" fn (this: *const nsIWebBrowserPersist, aDocument: *const nsISupports, aFile: *const nsISupports, aDataPath: *const nsISupports, aOutputContentType: *const libc::c_char, aEncodingFlags: libc::uint32_t, aWrapColumn: libc::uint32_t) -> nsresult, /* void cancelSave (); */ pub CancelSave: unsafe extern "system" fn (this: *const nsIWebBrowserPersist) -> nsresult, } // The implementations of the function wrappers which are exposed to rust code. // Call these methods rather than manually calling through the VTable struct. impl nsIWebBrowserPersist { /// ```text /// /** No special persistence behaviour. */ /// ``` /// pub const PERSIST_FLAGS_NONE: i64 = 0; /// ```text /// /** Use cached data if present (skipping validation), else load from network */ /// ``` /// pub const PERSIST_FLAGS_FROM_CACHE: i64 = 1; /// ```text /// /** Bypass the cached data. */ /// ``` /// pub const PERSIST_FLAGS_BYPASS_CACHE: i64 = 2; /// ```text /// /** Ignore any redirected data (usually adverts). */ /// ``` /// pub const PERSIST_FLAGS_IGNORE_REDIRECTED_DATA: i64 = 4; /// ```text /// /** Ignore IFRAME content (usually adverts). */ /// ``` /// pub const PERSIST_FLAGS_IGNORE_IFRAMES: i64 = 8; /// ```text /// /** Do not run the incoming data through a content converter e.g. to decompress it */ /// ``` /// pub const PERSIST_FLAGS_NO_CONVERSION: i64 = 16; /// ```text /// /** Replace existing files on the disk (use with due diligence!) */ /// ``` /// pub const PERSIST_FLAGS_REPLACE_EXISTING_FILES: i64 = 32; /// ```text /// /** Don't modify or add base tags */ /// ``` /// pub const PERSIST_FLAGS_NO_BASE_TAG_MODIFICATIONS: i64 = 64; /// ```text /// /** Make changes to original dom rather than cloning nodes */ /// ``` /// pub const PERSIST_FLAGS_FIXUP_ORIGINAL_DOM: i64 = 128; /// ```text /// /** Fix links relative to destination location (not origin) */ /// ``` /// pub const PERSIST_FLAGS_FIXUP_LINKS_TO_DESTINATION: i64 = 256; /// ```text /// /** Don't make any adjustments to links */ /// ``` /// pub const PERSIST_FLAGS_DONT_FIXUP_LINKS: i64 = 512; /// ```text /// /** Force serialization of output (one file at a time; not concurrent) */ /// ``` /// pub const PERSIST_FLAGS_SERIALIZE_OUTPUT: i64 = 1024; /// ```text /// /** Don't make any adjustments to filenames */ /// ``` /// pub const PERSIST_FLAGS_DONT_CHANGE_FILENAMES: i64 = 2048; /// ```text /// /** Fail on broken inline links */ /// ``` /// pub const PERSIST_FLAGS_FAIL_ON_BROKEN_LINKS: i64 = 4096; /// ```text /// /** /// * Automatically cleanup after a failed or cancelled operation, deleting all /// * created files and directories. This flag does nothing for failed upload /// * operations to remote servers. /// */ /// ``` /// pub const PERSIST_FLAGS_CLEANUP_ON_FAILURE: i64 = 8192; /// ```text /// /** /// * Let the WebBrowserPersist decide whether the incoming data is encoded /// * and whether it needs to go through a content converter e.g. to /// * decompress it. /// */ /// ``` /// pub const PERSIST_FLAGS_AUTODETECT_APPLY_CONVERSION: i64 = 16384; /// ```text /// /** /// * Append the downloaded data to the target file. /// * This can only be used when persisting to a local file. /// */ /// ``` /// pub const PERSIST_FLAGS_APPEND_TO_FILE: i64 = 32768; /// ```text /// /** /// * Force relevant cookies to be sent with this load even if normally they /// * wouldn't be. /// */ /// ``` /// pub const PERSIST_FLAGS_FORCE_ALLOW_COOKIES: i64 = 65536; /// ```text /// /** Persister is ready to save data */ /// ``` /// pub const PERSIST_STATE_READY: i64 = 1; /// ```text /// /** Persister is saving data */ /// ``` /// pub const PERSIST_STATE_SAVING: i64 = 2; /// ```text /// /** Persister has finished saving data */ /// ``` /// pub const PERSIST_STATE_FINISHED: i64 = 3; /// ```text /// /** Output only the current selection as opposed to the whole document. */ /// ``` /// pub const ENCODE_FLAGS_SELECTION_ONLY: i64 = 1; /// ```text /// /** /// * For plaintext output. Convert html to plaintext that looks like the html. /// * Implies wrap (except inside <pre>), since html wraps. /// * HTML output: always do prettyprinting, ignoring existing formatting. /// */ /// ``` /// pub const ENCODE_FLAGS_FORMATTED: i64 = 2; /// ```text /// /** /// * Output without formatting or wrapping the content. This flag /// * may be used to preserve the original formatting as much as possible. /// */ /// ``` /// pub const ENCODE_FLAGS_RAW: i64 = 4; /// ```text /// /** Output only the body section, no HTML tags. */ /// ``` /// pub const ENCODE_FLAGS_BODY_ONLY: i64 = 8; /// ```text /// /** Wrap even if when not doing formatted output (e.g. for text fields). */ /// ``` /// pub const ENCODE_FLAGS_PREFORMATTED: i64 = 16; /// ```text /// /** Wrap documents at the specified column. */ /// ``` /// pub const ENCODE_FLAGS_WRAP: i64 = 32; /// ```text /// /** /// * For plaintext output. Output for format flowed (RFC 2646). This is used /// * when converting to text for mail sending. This differs just slightly /// * but in an important way from normal formatted, and that is that /// * lines are space stuffed. This can't (correctly) be done later. /// */ /// ``` /// pub const ENCODE_FLAGS_FORMAT_FLOWED: i64 = 64; /// ```text /// /** Convert links to absolute links where possible. */ /// ``` /// pub const ENCODE_FLAGS_ABSOLUTE_LINKS: i64 = 128; /// ```text /// /** /// * Output with carriage return line breaks. May also be combined with /// * ENCODE_FLAGS_LF_LINEBREAKS and if neither is specified, the platform /// * default format is used. /// */ /// ``` /// pub const ENCODE_FLAGS_CR_LINEBREAKS: i64 = 512; /// ```text /// /** /// * Output with linefeed line breaks. May also be combined with /// * ENCODE_FLAGS_CR_LINEBREAKS and if neither is specified, the platform /// * default format is used. /// */ /// ``` /// pub const ENCODE_FLAGS_LF_LINEBREAKS: i64 = 1024; /// ```text /// /** For plaintext output. Output the content of noscript elements. */ /// ``` /// pub const ENCODE_FLAGS_NOSCRIPT_CONTENT: i64 = 2048; /// ```text /// /** For plaintext output. Output the content of noframes elements. */ /// ``` /// pub const ENCODE_FLAGS_NOFRAMES_CONTENT: i64 = 4096; /// ```text /// /** /// * Encode basic entities, e.g. output instead of character code 0xa0. /// * The basic set is just & < > " for interoperability /// * with older products that don't support α and friends. /// */ /// ``` /// pub const ENCODE_FLAGS_ENCODE_BASIC_ENTITIES: i64 = 8192; /// ```text /// /** /// * Flags governing how data is fetched and saved from the network. /// * It is best to set this value explicitly unless you are prepared /// * to accept the default values. /// */ /// ``` /// /// `attribute unsigned long persistFlags;` #[inline] pub unsafe fn GetPersistFlags(&self, aPersistFlags: *mut libc::uint32_t) -> nsresult { ((*self.vtable).GetPersistFlags)(self, aPersistFlags) } /// ```text /// /** /// * Flags governing how data is fetched and saved from the network. /// * It is best to set this value explicitly unless you are prepared /// * to accept the default values. /// */ /// ``` /// /// `attribute unsigned long persistFlags;` #[inline] pub unsafe fn SetPersistFlags(&self, aPersistFlags: libc::uint32_t) -> nsresult { ((*self.vtable).SetPersistFlags)(self, aPersistFlags) } /// ```text /// /** /// * Current state of the persister object. /// */ /// ``` /// /// `readonly attribute unsigned long currentState;` #[inline] pub unsafe fn GetCurrentState(&self, aCurrentState: *mut libc::uint32_t) -> nsresult { ((*self.vtable).GetCurrentState)(self, aCurrentState) } /// ```text /// /** /// * Value indicating the success or failure of the persist /// * operation. /// * /// * @throws NS_BINDING_ABORTED Operation cancelled. /// * @throws NS_ERROR_FAILURE Non-specific failure. /// */ /// ``` /// /// `readonly attribute nsresult result;` #[inline] pub unsafe fn GetResult(&self, aResult: *mut nsresult) -> nsresult { ((*self.vtable).GetResult)(self, aResult) } /// ```text /// /** /// * Callback listener for progress notifications. The object that the /// * embbedder supplies may also implement nsIInterfaceRequestor and be /// * prepared to return nsIAuthPrompt or other interfaces that may be required /// * to download data. /// * /// * @see nsIAuthPrompt /// * @see nsIInterfaceRequestor /// */ /// ``` /// /// `attribute nsIWebProgressListener progressListener;` #[inline] pub unsafe fn GetProgressListener(&self, aProgressListener: *mut *const nsIWebProgressListener) -> nsresult { ((*self.vtable).GetProgressListener)(self, aProgressListener) } /// ```text /// /** /// * Callback listener for progress notifications. The object that the /// * embbedder supplies may also implement nsIInterfaceRequestor and be /// * prepared to return nsIAuthPrompt or other interfaces that may be required /// * to download data. /// * /// * @see nsIAuthPrompt /// * @see nsIInterfaceRequestor /// */ /// ``` /// /// `attribute nsIWebProgressListener progressListener;` #[inline] pub unsafe fn SetProgressListener(&self, aProgressListener: *const nsIWebProgressListener) -> nsresult { ((*self.vtable).SetProgressListener)(self, aProgressListener) } /// ```text /// /** /// * Save the specified URI to file. /// * /// * @param aURI URI to save to file. Some implementations of this interface /// * may also support <CODE>nullptr</CODE> to imply the currently /// * loaded URI. /// * @param aCacheKey An object representing the URI in the cache or /// * <CODE>nullptr</CODE>. This can be a necko cache key, /// * an nsIWebPageDescriptor, or the currentDescriptor of an /// * nsIWebPageDescriptor. /// * @param aReferrer The referrer URI to pass with an HTTP request or /// * <CODE>nullptr</CODE>. /// * @param aReferrerPolicy The referrer policy for when and what to send via /// * HTTP Referer header. Ignored if aReferrer is /// * <CODE>nullptr</CODE>. Taken from REFERRER_POLICY /// * constants in nsIHttpChannel. /// * @param aPostData Post data to pass with an HTTP request or /// * <CODE>nullptr</CODE>. /// * @param aExtraHeaders Additional headers to supply with an HTTP request /// * or <CODE>nullptr</CODE>. /// * @param aFile Target file. This may be a nsIFile object or an /// * nsIURI object with a file scheme or a scheme that /// * supports uploading (e.g. ftp). /// * @param aPrivacyContext A context from which the privacy status of this /// * save operation can be determined. Must only be null /// * in situations in which no such context is available /// * (eg. the operation has no logical association with any /// * window or document) /// * /// * @see nsIFile /// * @see nsIURI /// * @see nsIInputStream /// * /// * @throws NS_ERROR_INVALID_ARG One or more arguments was invalid. /// */ /// ``` /// /// `void saveURI (in nsIURI aURI, in nsISupports aCacheKey, in nsIURI aReferrer, in unsigned long aReferrerPolicy, in nsIInputStream aPostData, in string aExtraHeaders, in nsISupports aFile, in nsILoadContext aPrivacyContext);` #[inline] pub unsafe fn SaveURI(&self, aURI: *const nsIURI, aCacheKey: *const nsISupports, aReferrer: *const nsIURI, aReferrerPolicy: libc::uint32_t, aPostData: *const nsIInputStream, aExtraHeaders: *const libc::c_char, aFile: *const nsISupports, aPrivacyContext: *const nsILoadContext) -> nsresult { ((*self.vtable).SaveURI)(self, aURI, aCacheKey, aReferrer, aReferrerPolicy, aPostData, aExtraHeaders, aFile, aPrivacyContext) } /// ```text /// /** /// * @param aIsPrivate Treat the save operation as private (ie. with /// * regards to networking operations and persistence /// * of intermediate data, etc.) /// * @see saveURI for all other parameter descriptions /// */ /// ``` /// /// `void savePrivacyAwareURI (in nsIURI aURI, in nsISupports aCacheKey, in nsIURI aReferrer, in unsigned long aReferrerPolicy, in nsIInputStream aPostData, in string aExtraHeaders, in nsISupports aFile, in boolean aIsPrivate);` #[inline] pub unsafe fn SavePrivacyAwareURI(&self, aURI: *const nsIURI, aCacheKey: *const nsISupports, aReferrer: *const nsIURI, aReferrerPolicy: libc::uint32_t, aPostData: *const nsIInputStream, aExtraHeaders: *const libc::c_char, aFile: *const nsISupports, aIsPrivate: bool) -> nsresult { ((*self.vtable).SavePrivacyAwareURI)(self, aURI, aCacheKey, aReferrer, aReferrerPolicy, aPostData, aExtraHeaders, aFile, aIsPrivate) } /// ```text /// /** /// * Save a channel to a file. It must not be opened yet. /// * @see saveURI /// */ /// ``` /// /// `void saveChannel (in nsIChannel aChannel, in nsISupports aFile);` #[inline] pub unsafe fn SaveChannel(&self, aChannel: *const nsIChannel, aFile: *const nsISupports) -> nsresult { ((*self.vtable).SaveChannel)(self, aChannel, aFile) } /// ```text /// /** /// * Save the specified DOM document to file and optionally all linked files /// * (e.g. images, CSS, JS & subframes). Do not call this method until the /// * document has finished loading! /// * /// * @param aDocument Document to save to file. Some implementations of /// * this interface may also support <CODE>nullptr</CODE> /// * to imply the currently loaded document. Can be an /// * nsIWebBrowserPersistDocument or nsIDOMDocument. /// * @param aFile Target local file. This may be a nsIFile object or an /// * nsIURI object with a file scheme or a scheme that /// * supports uploading (e.g. ftp). /// * @param aDataPath Path to directory where URIs linked to the document /// * are saved or nullptr if no linked URIs should be saved. /// * This may be a nsIFile object or an nsIURI object /// * with a file scheme. /// * @param aOutputContentType The desired MIME type format to save the /// * document and all subdocuments into or nullptr to use /// * the default behaviour. /// * @param aEncodingFlags Flags to pass to the encoder. /// * @param aWrapColumn For text documents, indicates the desired width to /// * wrap text at. Parameter is ignored if wrapping is not /// * specified by the encoding flags. /// * /// * @see nsIWebBrowserPersistDocument /// * @see nsIWebBrowserPersistable /// * @see nsIFile /// * @see nsIURI /// * /// * @throws NS_ERROR_INVALID_ARG One or more arguments was invalid. /// */ /// ``` /// /// `void saveDocument (in nsISupports aDocument, in nsISupports aFile, in nsISupports aDataPath, in string aOutputContentType, in unsigned long aEncodingFlags, in unsigned long aWrapColumn);` #[inline] pub unsafe fn SaveDocument(&self, aDocument: *const nsISupports, aFile: *const nsISupports, aDataPath: *const nsISupports, aOutputContentType: *const libc::c_char, aEncodingFlags: libc::uint32_t, aWrapColumn: libc::uint32_t) -> nsresult { ((*self.vtable).SaveDocument)(self, aDocument, aFile, aDataPath, aOutputContentType, aEncodingFlags, aWrapColumn) } /// ```text /// /** /// * Cancels the current operation. The caller is responsible for cleaning up /// * partially written files or directories. This has the same effect as calling /// * cancel with an argument of NS_BINDING_ABORTED. /// */ /// ``` /// /// `void cancelSave ();` #[inline] pub unsafe fn CancelSave(&self, ) -> nsresult { ((*self.vtable).CancelSave)(self, ) } }