2005-08-18 15:14:57 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Netscape Public
|
|
|
|
* License Version 1.1 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.mozilla.org/NPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS
|
|
|
|
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
|
|
* implied. See the License for the specific language governing
|
|
|
|
* rights and limitations under the License.
|
|
|
|
*
|
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is Netscape
|
|
|
|
* Communications Corporation. Portions created by Netscape are
|
|
|
|
* Copyright (C) 1999 Netscape Communications Corporation. All
|
|
|
|
* Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s): Radha Kulkarni (radha@netscape.com)
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
#include "nsIFactory.idl"
|
|
|
|
#include "nsISHEntry.idl"
|
|
|
|
#include "nsISHTransaction.idl"
|
2005-08-18 15:15:34 +04:00
|
|
|
#include "nsIDocShell.idl"
|
2005-08-18 15:14:57 +04:00
|
|
|
|
2005-08-18 15:15:34 +04:00
|
|
|
//interface nsIDocShell;
|
2005-08-18 15:14:57 +04:00
|
|
|
|
|
|
|
%{C++
|
|
|
|
#define NS_SHISTORY_CID \
|
|
|
|
{0xdd335421, 0xb8b8, 0x11d3, {0xbd, 0xc8, 0x00, 0x50, 0x04, 0x0a, 0x9b, 0x44}}
|
|
|
|
|
2005-08-18 15:15:50 +04:00
|
|
|
#define NS_SHISTORY_CONTRACTID "@mozilla.org/browser/shistory;1"
|
2005-08-18 15:14:57 +04:00
|
|
|
%}
|
|
|
|
|
|
|
|
[scriptable, uuid(DD335421-B8B8-11d3-BDC8-0050040A9B44)]
|
|
|
|
interface nsISHistory: nsISupports
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Add a new Entry to the History List
|
2005-08-18 15:15:28 +04:00
|
|
|
* @param aEntry - The entry to add
|
|
|
|
* @param aPersist - If true this specifies that the entry should persist
|
|
|
|
* in the list. If false, this means that when new entries are added
|
|
|
|
* this element will not appear in the session history list.
|
2005-08-18 15:14:57 +04:00
|
|
|
*/
|
2005-08-18 15:15:28 +04:00
|
|
|
void addEntry(in nsISHEntry aEntry, in boolean aPersist);
|
2005-08-18 15:14:57 +04:00
|
|
|
|
|
|
|
/**
|
2005-08-18 15:15:18 +04:00
|
|
|
* Get the size of the History list
|
2005-08-18 15:14:57 +04:00
|
|
|
*/
|
2005-08-18 15:15:18 +04:00
|
|
|
readonly attribute long count;
|
2005-08-18 15:14:57 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the index of the current document in the history list
|
|
|
|
*/
|
|
|
|
readonly attribute long index;
|
|
|
|
|
2005-08-18 15:15:14 +04:00
|
|
|
/**
|
|
|
|
* Get Previous Entry
|
|
|
|
*/
|
|
|
|
nsISHEntry getPreviousEntry(in boolean modifyIndex);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the next entry
|
|
|
|
*/
|
|
|
|
nsISHEntry getNextEntry(in boolean modifyIndex);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the entry at a given index
|
|
|
|
*/
|
|
|
|
nsISHEntry getEntryAtIndex(in long index, in boolean modifyIndex);
|
|
|
|
|
|
|
|
/**
|
2005-08-18 15:15:18 +04:00
|
|
|
* Get the root transaction
|
2005-08-18 15:15:14 +04:00
|
|
|
*/
|
2005-08-18 15:15:18 +04:00
|
|
|
readonly attribute nsISHTransaction rootTransaction;
|
2005-08-18 15:14:57 +04:00
|
|
|
|
2005-08-18 15:15:34 +04:00
|
|
|
/**
|
|
|
|
* The toplevel docshell object to which this SHistory object belongs to.
|
|
|
|
*/
|
2005-08-18 15:15:59 +04:00
|
|
|
attribute nsIDocShell rootDocShell;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get/Set the Max entries Session History will hold per window
|
|
|
|
*/
|
|
|
|
attribute long maxLength;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Purge the oldest numEntries from history list
|
|
|
|
*/
|
|
|
|
void PurgeHistory(in long numEntries);
|
2005-08-18 15:15:34 +04:00
|
|
|
|
2005-08-18 15:14:57 +04:00
|
|
|
};
|