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
//
// DO NOT EDIT.  THIS FILE IS GENERATED FROM ../../../dist/idl/nsISessionStore.idl
//


/// `interface nsISessionStore : nsISupports`
///

/// ```text
/// /**
///  * nsISessionStore keeps track of the current browsing state - i.e.
///  * tab history, cookies, scroll state, form data, and window features
///  * - and allows to restore everything into one browser window.
///  *
///  * The nsISessionStore API operates mostly on browser windows and the tabbrowser
///  * tabs contained in them:
///  *
///  * * "Browser windows" are those DOM windows having loaded
///  * chrome://browser/content/browser.xul . From overlays you can just pass the
///  * global |window| object to the API, though (or |top| from a sidebar).
///  * From elsewhere you can get browser windows through the nsIWindowMediator
///  * by looking for "navigator:browser" windows.
///  *
///  * * "Tabbrowser tabs" are all the child nodes of a browser window's
///  * |gBrowser.tabContainer| such as e.g. |gBrowser.selectedTab|.
///  */
/// ```
///

// 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 nsISessionStore {
    vtable: *const nsISessionStoreVTable,

    /// 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 nsISessionStore.
unsafe impl XpCom for nsISessionStore {
    const IID: nsIID = nsID(0x4580f5eb, 0x693d, 0x423d,
        [0xb0, 0xce, 0x2c, 0xb2, 0x0a, 0x96, 0x2e, 0x4d]);
}

// 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 nsISessionStore {
    #[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 nsISessionStore.
// 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 nsISessionStoreCoerce {
    /// Cheaply cast a value of this type from a `nsISessionStore`.
    fn coerce_from(v: &nsISessionStore) -> &Self;
}

// The trivial implementation: We can obviously coerce ourselves to ourselves.
impl nsISessionStoreCoerce for nsISessionStore {
    #[inline]
    fn coerce_from(v: &nsISessionStore) -> &Self {
        v
    }
}

impl nsISessionStore {
    /// Cast this `nsISessionStore` to one of its base interfaces.
    #[inline]
    pub fn coerce<T: nsISessionStoreCoerce>(&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 nsISessionStore {
    type Target = nsISupports;
    #[inline]
    fn deref(&self) -> &nsISupports {
        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: nsISupportsCoerce> nsISessionStoreCoerce for T {
    #[inline]
    fn coerce_from(v: &nsISessionStore) -> &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 nsISessionStore
// 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 nsISessionStoreVTable {
    /// We need to include the members from the base interface's vtable at the start
    /// of the VTable definition.
    pub __base: nsISupportsVTable,

    /* attribute boolean canRestoreLastSession; */
    pub GetCanRestoreLastSession: unsafe extern "system" fn (this: *const nsISessionStore, aCanRestoreLastSession: *mut bool) -> nsresult,

    /* attribute boolean canRestoreLastSession; */
    pub SetCanRestoreLastSession: unsafe extern "system" fn (this: *const nsISessionStore, aCanRestoreLastSession: bool) -> nsresult,

    /* void restoreLastSession (); */
    pub RestoreLastSession: unsafe extern "system" fn (this: *const nsISessionStore) -> nsresult,

    /* AString getBrowserState (); */
    pub GetBrowserState: unsafe extern "system" fn (this: *const nsISessionStore, _retval: &mut ::nsstring::nsAString) -> nsresult,

    /* void setBrowserState (in AString aState); */
    pub SetBrowserState: unsafe extern "system" fn (this: *const nsISessionStore, aState: &::nsstring::nsAString) -> nsresult,

    /* AString getWindowState (in nsIDOMWindow aWindow); */
    pub GetWindowState: unsafe extern "system" fn (this: *const nsISessionStore, aWindow: *const nsIDOMWindow, _retval: &mut ::nsstring::nsAString) -> nsresult,

    /* void setWindowState (in nsIDOMWindow aWindow, in AString aState, in boolean aOverwrite); */
    pub SetWindowState: unsafe extern "system" fn (this: *const nsISessionStore, aWindow: *const nsIDOMWindow, aState: &::nsstring::nsAString, aOverwrite: bool) -> nsresult,

    /* AString getTabState (in nsIDOMNode aTab); */
    pub GetTabState: unsafe extern "system" fn (this: *const nsISessionStore, aTab: *const nsIDOMNode, _retval: &mut ::nsstring::nsAString) -> nsresult,

    /* void setTabState (in nsIDOMNode aTab, in AString aState); */
    pub SetTabState: unsafe extern "system" fn (this: *const nsISessionStore, aTab: *const nsIDOMNode, aState: &::nsstring::nsAString) -> nsresult,

    /* nsIDOMNode duplicateTab (in nsIDOMWindow aWindow, in nsIDOMNode aTab, [optional] in long aDelta); */
    pub DuplicateTab: unsafe extern "system" fn (this: *const nsISessionStore, aWindow: *const nsIDOMWindow, aTab: *const nsIDOMNode, aDelta: libc::int32_t, _retval: *mut *const nsIDOMNode) -> nsresult,

    /* unsigned long getClosedTabCount (in nsIDOMWindow aWindow); */
    pub GetClosedTabCount: unsafe extern "system" fn (this: *const nsISessionStore, aWindow: *const nsIDOMWindow, _retval: *mut libc::uint32_t) -> nsresult,

    /* AString getClosedTabData (in nsIDOMWindow aWindow); */
    pub GetClosedTabData: unsafe extern "system" fn (this: *const nsISessionStore, aWindow: *const nsIDOMWindow, _retval: &mut ::nsstring::nsAString) -> nsresult,

    /* nsIDOMNode undoCloseTab (in nsIDOMWindow aWindow, in unsigned long aIndex); */
    pub UndoCloseTab: unsafe extern "system" fn (this: *const nsISessionStore, aWindow: *const nsIDOMWindow, aIndex: libc::uint32_t, _retval: *mut *const nsIDOMNode) -> nsresult,

    /* nsIDOMNode forgetClosedTab (in nsIDOMWindow aWindow, in unsigned long aIndex); */
    pub ForgetClosedTab: unsafe extern "system" fn (this: *const nsISessionStore, aWindow: *const nsIDOMWindow, aIndex: libc::uint32_t, _retval: *mut *const nsIDOMNode) -> nsresult,

    /* unsigned long getClosedWindowCount (); */
    pub GetClosedWindowCount: unsafe extern "system" fn (this: *const nsISessionStore, _retval: *mut libc::uint32_t) -> nsresult,

    /* AString getClosedWindowData (); */
    pub GetClosedWindowData: unsafe extern "system" fn (this: *const nsISessionStore, _retval: &mut ::nsstring::nsAString) -> nsresult,

    /* nsIDOMWindow undoCloseWindow (in unsigned long aIndex); */
    pub UndoCloseWindow: unsafe extern "system" fn (this: *const nsISessionStore, aIndex: libc::uint32_t, _retval: *mut *const nsIDOMWindow) -> nsresult,

    /* nsIDOMNode forgetClosedWindow (in unsigned long aIndex); */
    pub ForgetClosedWindow: unsafe extern "system" fn (this: *const nsISessionStore, aIndex: libc::uint32_t, _retval: *mut *const nsIDOMNode) -> nsresult,

    /* AString getWindowValue (in nsIDOMWindow aWindow, in AString aKey); */
    pub GetWindowValue: unsafe extern "system" fn (this: *const nsISessionStore, aWindow: *const nsIDOMWindow, aKey: &::nsstring::nsAString, _retval: &mut ::nsstring::nsAString) -> nsresult,

    /* void setWindowValue (in nsIDOMWindow aWindow, in AString aKey, in jsval aStringValue); */
    /// Unable to generate binding because `native type JS::Value is unsupported`
    pub SetWindowValue: *const ::libc::c_void,

    /* void deleteWindowValue (in nsIDOMWindow aWindow, in AString aKey); */
    pub DeleteWindowValue: unsafe extern "system" fn (this: *const nsISessionStore, aWindow: *const nsIDOMWindow, aKey: &::nsstring::nsAString) -> nsresult,

    /* AString getTabValue (in nsIDOMNode aTab, in AString aKey); */
    pub GetTabValue: unsafe extern "system" fn (this: *const nsISessionStore, aTab: *const nsIDOMNode, aKey: &::nsstring::nsAString, _retval: &mut ::nsstring::nsAString) -> nsresult,

    /* void setTabValue (in nsIDOMNode aTab, in AString aKey, in jsval aStringValue); */
    /// Unable to generate binding because `native type JS::Value is unsupported`
    pub SetTabValue: *const ::libc::c_void,

    /* void deleteTabValue (in nsIDOMNode aTab, in AString aKey); */
    pub DeleteTabValue: unsafe extern "system" fn (this: *const nsISessionStore, aTab: *const nsIDOMNode, aKey: &::nsstring::nsAString) -> nsresult,

    /* AString getGlobalValue (in AString aKey); */
    pub GetGlobalValue: unsafe extern "system" fn (this: *const nsISessionStore, aKey: &::nsstring::nsAString, _retval: &mut ::nsstring::nsAString) -> nsresult,

    /* void setGlobalValue (in AString aKey, in jsval aStringValue); */
    /// Unable to generate binding because `native type JS::Value is unsupported`
    pub SetGlobalValue: *const ::libc::c_void,

    /* void deleteGlobalValue (in AString aKey); */
    pub DeleteGlobalValue: unsafe extern "system" fn (this: *const nsISessionStore, aKey: &::nsstring::nsAString) -> nsresult,

    /* void persistTabAttribute (in AString aName); */
    pub PersistTabAttribute: unsafe extern "system" fn (this: *const nsISessionStore, aName: &::nsstring::nsAString) -> 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 nsISessionStore {

    /// ```text
    /// /**
    ///    * Is it possible to restore the previous session. Will always be false when
    ///    * in Private Browsing mode.
    ///    */
    /// ```
    ///

    /// `attribute boolean canRestoreLastSession;`
    #[inline]
    pub unsafe fn GetCanRestoreLastSession(&self, aCanRestoreLastSession: *mut bool) -> nsresult {
        ((*self.vtable).GetCanRestoreLastSession)(self, aCanRestoreLastSession)
    }


    /// ```text
    /// /**
    ///    * Is it possible to restore the previous session. Will always be false when
    ///    * in Private Browsing mode.
    ///    */
    /// ```
    ///

    /// `attribute boolean canRestoreLastSession;`
    #[inline]
    pub unsafe fn SetCanRestoreLastSession(&self, aCanRestoreLastSession: bool) -> nsresult {
        ((*self.vtable).SetCanRestoreLastSession)(self, aCanRestoreLastSession)
    }


    /// ```text
    /// /**
    ///    * Restore the previous session if possible. This will not overwrite the
    ///    * current session. Instead the previous session will be merged into the
    ///    * current session. Current windows will be reused if they were windows that
    ///    * pinned tabs were previously restored into. New windows will be opened as
    ///    * needed.
    ///    *
    ///    * Note: This will throw if there is no previous state to restore. Check with
    ///    * canRestoreLastSession first to avoid thrown errors.
    ///    */
    /// ```
    ///

    /// `void restoreLastSession ();`
    #[inline]
    pub unsafe fn RestoreLastSession(&self, ) -> nsresult {
        ((*self.vtable).RestoreLastSession)(self, )
    }


    /// ```text
    /// /**
    ///    * Get the current browsing state.
    ///    * @returns a JSON string representing the session state.
    ///    */
    /// ```
    ///

    /// `AString getBrowserState ();`
    #[inline]
    pub unsafe fn GetBrowserState(&self, _retval: &mut ::nsstring::nsAString) -> nsresult {
        ((*self.vtable).GetBrowserState)(self, _retval)
    }


    /// ```text
    /// /**
    ///    * Set the browsing state.
    ///    * This will immediately restore the state of the whole application to the state
    ///    * passed in, *replacing* the current session.
    ///    *
    ///    * @param aState is a JSON string representing the session state.
    ///    */
    /// ```
    ///

    /// `void setBrowserState (in AString aState);`
    #[inline]
    pub unsafe fn SetBrowserState(&self, aState: &::nsstring::nsAString) -> nsresult {
        ((*self.vtable).SetBrowserState)(self, aState)
    }


    /// ```text
    /// /**
    ///    * @param aWindow is the browser window whose state is to be returned.
    ///    *
    ///    * @returns a JSON string representing a session state with only one window.
    ///    */
    /// ```
    ///

    /// `AString getWindowState (in nsIDOMWindow aWindow);`
    #[inline]
    pub unsafe fn GetWindowState(&self, aWindow: *const nsIDOMWindow, _retval: &mut ::nsstring::nsAString) -> nsresult {
        ((*self.vtable).GetWindowState)(self, aWindow, _retval)
    }


    /// ```text
    /// /**
    ///    * @param aWindow    is the browser window whose state is to be set.
    ///    * @param aState     is a JSON string representing a session state.
    ///    * @param aOverwrite boolean overwrite existing tabs
    ///    */
    /// ```
    ///

    /// `void setWindowState (in nsIDOMWindow aWindow, in AString aState, in boolean aOverwrite);`
    #[inline]
    pub unsafe fn SetWindowState(&self, aWindow: *const nsIDOMWindow, aState: &::nsstring::nsAString, aOverwrite: bool) -> nsresult {
        ((*self.vtable).SetWindowState)(self, aWindow, aState, aOverwrite)
    }


    /// ```text
    /// /**
    ///    * @param aTab is the tabbrowser tab whose state is to be returned.
    ///    *
    ///    * @returns a JSON string representing the state of the tab
    ///    *         (note: doesn't contain cookies - if you need them, use getWindowState instead).
    ///    */
    /// ```
    ///

    /// `AString getTabState (in nsIDOMNode aTab);`
    #[inline]
    pub unsafe fn GetTabState(&self, aTab: *const nsIDOMNode, _retval: &mut ::nsstring::nsAString) -> nsresult {
        ((*self.vtable).GetTabState)(self, aTab, _retval)
    }


    /// ```text
    /// /**
    ///    * @param aTab   is the tabbrowser tab whose state is to be set.
    ///    * @param aState is a JSON string representing a session state.
    ///    */
    /// ```
    ///

    /// `void setTabState (in nsIDOMNode aTab, in AString aState);`
    #[inline]
    pub unsafe fn SetTabState(&self, aTab: *const nsIDOMNode, aState: &::nsstring::nsAString) -> nsresult {
        ((*self.vtable).SetTabState)(self, aTab, aState)
    }


    /// ```text
    /// /**
    ///    * Duplicates a given tab as thoroughly as possible.
    ///    *
    ///    * @param aWindow is the browser window into which the tab will be duplicated.
    ///    * @param aTab    is the tabbrowser tab to duplicate (can be from a different window).
    ///    * @param aDelta  is the offset to the history entry to load in the duplicated tab.
    ///    * @returns a reference to the newly created tab.
    ///    */
    /// ```
    ///

    /// `nsIDOMNode duplicateTab (in nsIDOMWindow aWindow, in nsIDOMNode aTab, [optional] in long aDelta);`
    #[inline]
    pub unsafe fn DuplicateTab(&self, aWindow: *const nsIDOMWindow, aTab: *const nsIDOMNode, aDelta: libc::int32_t, _retval: *mut *const nsIDOMNode) -> nsresult {
        ((*self.vtable).DuplicateTab)(self, aWindow, aTab, aDelta, _retval)
    }


    /// ```text
    /// /**
    ///    * Get the number of restore-able tabs for a browser window
    ///    */
    /// ```
    ///

    /// `unsigned long getClosedTabCount (in nsIDOMWindow aWindow);`
    #[inline]
    pub unsafe fn GetClosedTabCount(&self, aWindow: *const nsIDOMWindow, _retval: *mut libc::uint32_t) -> nsresult {
        ((*self.vtable).GetClosedTabCount)(self, aWindow, _retval)
    }


    /// ```text
    /// /**
    ///    * Get closed tab data
    ///    *
    ///    * @param aWindow is the browser window for which to get closed tab data
    ///    * @returns a JSON string representing the list of closed tabs.
    ///    */
    /// ```
    ///

    /// `AString getClosedTabData (in nsIDOMWindow aWindow);`
    #[inline]
    pub unsafe fn GetClosedTabData(&self, aWindow: *const nsIDOMWindow, _retval: &mut ::nsstring::nsAString) -> nsresult {
        ((*self.vtable).GetClosedTabData)(self, aWindow, _retval)
    }


    /// ```text
    /// /**
    ///    * @param aWindow is the browser window to reopen a closed tab in.
    ///    * @param aIndex  is the index of the tab to be restored (FIFO ordered).
    ///    * @returns a reference to the reopened tab.
    ///    */
    /// ```
    ///

    /// `nsIDOMNode undoCloseTab (in nsIDOMWindow aWindow, in unsigned long aIndex);`
    #[inline]
    pub unsafe fn UndoCloseTab(&self, aWindow: *const nsIDOMWindow, aIndex: libc::uint32_t, _retval: *mut *const nsIDOMNode) -> nsresult {
        ((*self.vtable).UndoCloseTab)(self, aWindow, aIndex, _retval)
    }


    /// ```text
    /// /**
    ///    * @param aWindow is the browser window associated with the closed tab.
    ///    * @param aIndex  is the index of the closed tab to be removed (FIFO ordered).
    ///    */
    /// ```
    ///

    /// `nsIDOMNode forgetClosedTab (in nsIDOMWindow aWindow, in unsigned long aIndex);`
    #[inline]
    pub unsafe fn ForgetClosedTab(&self, aWindow: *const nsIDOMWindow, aIndex: libc::uint32_t, _retval: *mut *const nsIDOMNode) -> nsresult {
        ((*self.vtable).ForgetClosedTab)(self, aWindow, aIndex, _retval)
    }


    /// ```text
    /// /**
    ///    * Get the number of restore-able windows
    ///    */
    /// ```
    ///

    /// `unsigned long getClosedWindowCount ();`
    #[inline]
    pub unsafe fn GetClosedWindowCount(&self, _retval: *mut libc::uint32_t) -> nsresult {
        ((*self.vtable).GetClosedWindowCount)(self, _retval)
    }


    /// ```text
    /// /**
    ///    * Get closed windows data
    ///    *
    ///    * @returns a JSON string representing the list of closed windows.
    ///    */
    /// ```
    ///

    /// `AString getClosedWindowData ();`
    #[inline]
    pub unsafe fn GetClosedWindowData(&self, _retval: &mut ::nsstring::nsAString) -> nsresult {
        ((*self.vtable).GetClosedWindowData)(self, _retval)
    }


    /// ```text
    /// /**
    ///    * @param aIndex is the index of the windows to be restored (FIFO ordered).
    ///    * @returns the nsIDOMWindow object of the reopened window
    ///    */
    /// ```
    ///

    /// `nsIDOMWindow undoCloseWindow (in unsigned long aIndex);`
    #[inline]
    pub unsafe fn UndoCloseWindow(&self, aIndex: libc::uint32_t, _retval: *mut *const nsIDOMWindow) -> nsresult {
        ((*self.vtable).UndoCloseWindow)(self, aIndex, _retval)
    }


    /// ```text
    /// /**
    ///    * @param aIndex  is the index of the closed window to be removed (FIFO ordered).
    ///    *
    ///    * @throws NS_ERROR_INVALID_ARG
    ///    *   when aIndex does not map to a closed window
    ///    */
    /// ```
    ///

    /// `nsIDOMNode forgetClosedWindow (in unsigned long aIndex);`
    #[inline]
    pub unsafe fn ForgetClosedWindow(&self, aIndex: libc::uint32_t, _retval: *mut *const nsIDOMNode) -> nsresult {
        ((*self.vtable).ForgetClosedWindow)(self, aIndex, _retval)
    }


    /// ```text
    /// /**
    ///    * @param aWindow is the window to get the value for.
    ///    * @param aKey    is the value's name.
    ///    *
    ///    * @returns A string value or an empty string if none is set.
    ///    */
    /// ```
    ///

    /// `AString getWindowValue (in nsIDOMWindow aWindow, in AString aKey);`
    #[inline]
    pub unsafe fn GetWindowValue(&self, aWindow: *const nsIDOMWindow, aKey: &::nsstring::nsAString, _retval: &mut ::nsstring::nsAString) -> nsresult {
        ((*self.vtable).GetWindowValue)(self, aWindow, aKey, _retval)
    }


    /// ```text
    /// /**
    ///    * @param aWindow      is the browser window to set the value for.
    ///    * @param aKey         is the value's name.
    ///    * @param aStringValue is the value itself (use JSON.stringify/parse before setting JS objects).
    ///    */
    /// ```
    ///

    /// `void setWindowValue (in nsIDOMWindow aWindow, in AString aKey, in jsval aStringValue);`
    const _SetWindowValue: () = ();

    /// ```text
    /// /**
    ///    * @param aWindow is the browser window to get the value for.
    ///    * @param aKey    is the value's name.
    ///    */
    /// ```
    ///

    /// `void deleteWindowValue (in nsIDOMWindow aWindow, in AString aKey);`
    #[inline]
    pub unsafe fn DeleteWindowValue(&self, aWindow: *const nsIDOMWindow, aKey: &::nsstring::nsAString) -> nsresult {
        ((*self.vtable).DeleteWindowValue)(self, aWindow, aKey)
    }


    /// ```text
    /// /**
    ///    * @param aTab is the tabbrowser tab to get the value for.
    ///    * @param aKey is the value's name.
    ///    *
    ///    * @returns A string value or an empty string if none is set.
    ///    */
    /// ```
    ///

    /// `AString getTabValue (in nsIDOMNode aTab, in AString aKey);`
    #[inline]
    pub unsafe fn GetTabValue(&self, aTab: *const nsIDOMNode, aKey: &::nsstring::nsAString, _retval: &mut ::nsstring::nsAString) -> nsresult {
        ((*self.vtable).GetTabValue)(self, aTab, aKey, _retval)
    }


    /// ```text
    /// /**
    ///    * @param aTab         is the tabbrowser tab to set the value for.
    ///    * @param aKey         is the value's name.
    ///    * @param aStringValue is the value itself (use JSON.stringify/parse before setting JS objects).
    ///    */
    /// ```
    ///

    /// `void setTabValue (in nsIDOMNode aTab, in AString aKey, in jsval aStringValue);`
    const _SetTabValue: () = ();

    /// ```text
    /// /**
    ///    * @param aTab is the tabbrowser tab to get the value for.
    ///    * @param aKey is the value's name.
    ///    */
    /// ```
    ///

    /// `void deleteTabValue (in nsIDOMNode aTab, in AString aKey);`
    #[inline]
    pub unsafe fn DeleteTabValue(&self, aTab: *const nsIDOMNode, aKey: &::nsstring::nsAString) -> nsresult {
        ((*self.vtable).DeleteTabValue)(self, aTab, aKey)
    }


    /// ```text
    /// /**
    ///    * @param aKey is the value's name.
    ///    *
    ///    * @returns A string value or an empty string if none is set.
    ///    */
    /// ```
    ///

    /// `AString getGlobalValue (in AString aKey);`
    #[inline]
    pub unsafe fn GetGlobalValue(&self, aKey: &::nsstring::nsAString, _retval: &mut ::nsstring::nsAString) -> nsresult {
        ((*self.vtable).GetGlobalValue)(self, aKey, _retval)
    }


    /// ```text
    /// /**
    ///    * @param aKey         is the value's name.
    ///    * @param aStringValue is the value itself (use JSON.stringify/parse before setting JS objects).
    ///    */
    /// ```
    ///

    /// `void setGlobalValue (in AString aKey, in jsval aStringValue);`
    const _SetGlobalValue: () = ();

    /// ```text
    /// /**
    ///    * @param aTab is the browser tab to get the value for.
    ///    * @param aKey is the value's name.
    ///    */
    /// ```
    ///

    /// `void deleteGlobalValue (in AString aKey);`
    #[inline]
    pub unsafe fn DeleteGlobalValue(&self, aKey: &::nsstring::nsAString) -> nsresult {
        ((*self.vtable).DeleteGlobalValue)(self, aKey)
    }


    /// ```text
    /// /**
    ///    * @param aName is the name of the attribute to save/restore for all tabbrowser tabs.
    ///    */
    /// ```
    ///

    /// `void persistTabAttribute (in AString aName);`
    #[inline]
    pub unsafe fn PersistTabAttribute(&self, aName: &::nsstring::nsAString) -> nsresult {
        ((*self.vtable).PersistTabAttribute)(self, aName)
    }


}