From 782817bba7d2191a871a4bb6b3c279bf5e472244 Mon Sep 17 00:00:00 2001 From: "radha%netscape.com" Date: Wed, 22 Dec 1999 22:33:16 +0000 Subject: [PATCH] New Session Hsitory in its own directory. Initial checkin. r=law a=don git-svn-id: svn://10.0.0.236/trunk@56433 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/shistory/public/Makefile.in | 37 ++++++++++ .../shistory/public/nsISHContainer.idl | 59 +++++++++++++++ .../docshell/shistory/public/nsISHEntry.idl | 73 +++++++++++++++++++ .../shistory/public/nsISHTransaction.idl | 72 ++++++++++++++++++ .../components/shistory/public/MANIFEST_IDL | 3 + .../components/shistory/public/Makefile.in | 37 ++++++++++ .../components/shistory/public/makefile.win | 33 +++++++++ .../shistory/public/nsISHContainer.idl | 59 +++++++++++++++ .../components/shistory/public/nsISHEntry.idl | 73 +++++++++++++++++++ .../shistory/public/nsISHTransaction.idl | 72 ++++++++++++++++++ 10 files changed, 518 insertions(+) create mode 100644 mozilla/docshell/shistory/public/Makefile.in create mode 100644 mozilla/docshell/shistory/public/nsISHContainer.idl create mode 100644 mozilla/docshell/shistory/public/nsISHEntry.idl create mode 100644 mozilla/docshell/shistory/public/nsISHTransaction.idl create mode 100644 mozilla/xpfe/components/shistory/public/MANIFEST_IDL create mode 100644 mozilla/xpfe/components/shistory/public/Makefile.in create mode 100644 mozilla/xpfe/components/shistory/public/makefile.win create mode 100644 mozilla/xpfe/components/shistory/public/nsISHContainer.idl create mode 100644 mozilla/xpfe/components/shistory/public/nsISHEntry.idl create mode 100644 mozilla/xpfe/components/shistory/public/nsISHTransaction.idl diff --git a/mozilla/docshell/shistory/public/Makefile.in b/mozilla/docshell/shistory/public/Makefile.in new file mode 100644 index 00000000000..d8454f12d86 --- /dev/null +++ b/mozilla/docshell/shistory/public/Makefile.in @@ -0,0 +1,37 @@ +# +# 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) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# + +DEPTH = ../../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +MODULE = shistory + +XPIDLSRCS = nsISHEntry.idl \ + nsISHContainer.idl \ + nsISHTransaction.idl \ + $(NULL) + +include $(topsrcdir)/config/rules.mk + diff --git a/mozilla/docshell/shistory/public/nsISHContainer.idl b/mozilla/docshell/shistory/public/nsISHContainer.idl new file mode 100644 index 00000000000..6664b3922f9 --- /dev/null +++ b/mozilla/docshell/shistory/public/nsISHContainer.idl @@ -0,0 +1,59 @@ +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Mozilla 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/MPL/ + * + * 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 the Mozilla browser. + * + * The Initial Developer of the Original Code is Netscape + * Communications, Inc. Portions created by Netscape are + * Copyright (C) 1999, Mozilla. All Rights Reserved. + * + * Contributor(s): + * Radha Kulkarni + */ + +#include "nsISupports.idl" +#include "nsIEnumerator.idl" +#include "nsISHEntry.idl" + + +/** + * The nsISHEntryContainer. The interface to access child entries + * of an nsISHEntry. + * + */ + +[scriptable, uuid(65281BA2-988A-11d3-BDC7-0050040A9B44)] +interface nsISHContainer : nsISupports +{ + /** + * The current number of nsISHEntries which are immediate children of the + * current SHEntry + */ + readonly attribute long childCount; + + /** + * Add a new child SHEntry. Adds to the end of the list. + */ + void AddChild(in nsISHEntry child); + + /** + * Removes a child SHEntry + */ + void RemoveChild(in nsISHEntry child); + + /** + * Enumerator to walk child list. + */ + readonly attribute nsIEnumerator childEnumerator; + +}; + diff --git a/mozilla/docshell/shistory/public/nsISHEntry.idl b/mozilla/docshell/shistory/public/nsISHEntry.idl new file mode 100644 index 00000000000..5b976325403 --- /dev/null +++ b/mozilla/docshell/shistory/public/nsISHEntry.idl @@ -0,0 +1,73 @@ +/* -*- 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) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * Radha Kulkarni + */ + +/** + * The interface to nsISHentry. Each document or subframe in + * Session History will have a nsISHEntry associated with it which will + * hold all information required to recreate the document from history + * + */ +#include "nsISupports.idl" +#include "nsIURI.idl" +#include "domstubs.idl" +#include "nsIInputStream.idl" + +[scriptable, uuid(65281BA1-988A-11d3-BDC7-0050040A9B44)] +interface nsISHEntry : nsISupports +{ + +/** URI for the document */ +attribute nsIURI uri; + +/** DOM Document */ +attribute nsIDOMDocument document; + +/** Title for the document */ +attribute wstring title; + +/** Post Data for the document */ +attribute nsIInputStream postData; + +/** LayoutHistoryState for scroll position and form values */ +attribute nsISupports layoutHistoryState; + +/** Parent of the current entry */ +attribute nsISHEntry parent; + +/** Additional ways to create an entry */ +void create(in nsIURI aURI, in wstring aTitle, in nsIDOMDocument aDocument, + in nsIInputStream aInputStream, in nsISupports aHistoryLayoutState); + +}; + + +%{ C++ +// {BFD1A791-AD9F-11d3-BDC7-0050040A9B44} +#define NS_SHENTRY_CID \ +{0xbfd1a791, 0xad9f, 0x11d3, {0xbd, 0xc7, 0x0, 0x50, 0x4, 0xa, 0x9b, 0x44}} + +#define NS_SHENTRY_PROGID \ + "component://netscape/browser/session-history-entry" + +%} + diff --git a/mozilla/docshell/shistory/public/nsISHTransaction.idl b/mozilla/docshell/shistory/public/nsISHTransaction.idl new file mode 100644 index 00000000000..9388423f211 --- /dev/null +++ b/mozilla/docshell/shistory/public/nsISHTransaction.idl @@ -0,0 +1,72 @@ +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Mozilla 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/MPL/ + * + * 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 the Mozilla browser. + * + * The Initial Developer of the Original Code is Netscape + * Communications, Inc. Portions created by Netscape are + * Copyright (C) 1999, Mozilla. All Rights Reserved. + * + * Contributor(s): + * Radha Kulkarni + */ + +#include "nsISupports.idl" +#include "nsISHEntry.idl" +#include "nsIEnumerator.idl" + + +/** + * The nsISHTransaction. + */ + + +[scriptable, uuid(2F0C3A72-988B-11d3-BDC7-0050040A9B44)] +interface nsISHTransaction : nsISupports +{ + /** + * The nsISHEntry for the current transaction + */ + readonly attribute nsISHEntry currentSHistoryEntry; + + /** + * The parent of this transaction + */ + readonly attribute nsISHTransaction parent; + + /** + * The legitimate child of this transaction + */ + readonly attribute nsISHTransaction child; + + /** + * The *other* children of this transaction. + */ + readonly attribute nsISHTransaction lrvList; + + /** + * Create a transaction with parent and History Entry + */ + void create(in nsISHEntry aSHEntry, in nsISHTransaction aParent); +}; + +%{ C++ +// {BFD1A792-AD9F-11d3-BDC7-0050040A9B44} + + +#define NS_SHTRANSACTION_CID \ +{0xbfd1a792, 0xad9f, 0x11d3, {0xbd, 0xc7, 0x0, 0x50, 0x4, 0xa, 0x9b, 0x44}} + +#define NS_SHTRANSACTION_PROGID \ + "component://netscape/browser/session-history-transaction" + +%} \ No newline at end of file diff --git a/mozilla/xpfe/components/shistory/public/MANIFEST_IDL b/mozilla/xpfe/components/shistory/public/MANIFEST_IDL new file mode 100644 index 00000000000..007cc5f14d4 --- /dev/null +++ b/mozilla/xpfe/components/shistory/public/MANIFEST_IDL @@ -0,0 +1,3 @@ +nsIShEntry.idl \ +nsISHTransaction.idl \ +nsISHContainer.idl \ No newline at end of file diff --git a/mozilla/xpfe/components/shistory/public/Makefile.in b/mozilla/xpfe/components/shistory/public/Makefile.in new file mode 100644 index 00000000000..d8454f12d86 --- /dev/null +++ b/mozilla/xpfe/components/shistory/public/Makefile.in @@ -0,0 +1,37 @@ +# +# 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) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# + +DEPTH = ../../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +MODULE = shistory + +XPIDLSRCS = nsISHEntry.idl \ + nsISHContainer.idl \ + nsISHTransaction.idl \ + $(NULL) + +include $(topsrcdir)/config/rules.mk + diff --git a/mozilla/xpfe/components/shistory/public/makefile.win b/mozilla/xpfe/components/shistory/public/makefile.win new file mode 100644 index 00000000000..06b695c7401 --- /dev/null +++ b/mozilla/xpfe/components/shistory/public/makefile.win @@ -0,0 +1,33 @@ +#!nmake +# +# 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) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): + +DEPTH=..\..\..\.. + +MODULE=shistory + +XPIDLSRCS = \ + .\nsISHEntry.idl \ + .\nsISHContainer.idl \ + .\nsISHTransaction.idl \ + $(NULL) + +include <$(DEPTH)\config\rules.mak> + diff --git a/mozilla/xpfe/components/shistory/public/nsISHContainer.idl b/mozilla/xpfe/components/shistory/public/nsISHContainer.idl new file mode 100644 index 00000000000..6664b3922f9 --- /dev/null +++ b/mozilla/xpfe/components/shistory/public/nsISHContainer.idl @@ -0,0 +1,59 @@ +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Mozilla 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/MPL/ + * + * 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 the Mozilla browser. + * + * The Initial Developer of the Original Code is Netscape + * Communications, Inc. Portions created by Netscape are + * Copyright (C) 1999, Mozilla. All Rights Reserved. + * + * Contributor(s): + * Radha Kulkarni + */ + +#include "nsISupports.idl" +#include "nsIEnumerator.idl" +#include "nsISHEntry.idl" + + +/** + * The nsISHEntryContainer. The interface to access child entries + * of an nsISHEntry. + * + */ + +[scriptable, uuid(65281BA2-988A-11d3-BDC7-0050040A9B44)] +interface nsISHContainer : nsISupports +{ + /** + * The current number of nsISHEntries which are immediate children of the + * current SHEntry + */ + readonly attribute long childCount; + + /** + * Add a new child SHEntry. Adds to the end of the list. + */ + void AddChild(in nsISHEntry child); + + /** + * Removes a child SHEntry + */ + void RemoveChild(in nsISHEntry child); + + /** + * Enumerator to walk child list. + */ + readonly attribute nsIEnumerator childEnumerator; + +}; + diff --git a/mozilla/xpfe/components/shistory/public/nsISHEntry.idl b/mozilla/xpfe/components/shistory/public/nsISHEntry.idl new file mode 100644 index 00000000000..5b976325403 --- /dev/null +++ b/mozilla/xpfe/components/shistory/public/nsISHEntry.idl @@ -0,0 +1,73 @@ +/* -*- 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) 1998 Netscape Communications Corporation. All + * Rights Reserved. + * + * Contributor(s): + * Radha Kulkarni + */ + +/** + * The interface to nsISHentry. Each document or subframe in + * Session History will have a nsISHEntry associated with it which will + * hold all information required to recreate the document from history + * + */ +#include "nsISupports.idl" +#include "nsIURI.idl" +#include "domstubs.idl" +#include "nsIInputStream.idl" + +[scriptable, uuid(65281BA1-988A-11d3-BDC7-0050040A9B44)] +interface nsISHEntry : nsISupports +{ + +/** URI for the document */ +attribute nsIURI uri; + +/** DOM Document */ +attribute nsIDOMDocument document; + +/** Title for the document */ +attribute wstring title; + +/** Post Data for the document */ +attribute nsIInputStream postData; + +/** LayoutHistoryState for scroll position and form values */ +attribute nsISupports layoutHistoryState; + +/** Parent of the current entry */ +attribute nsISHEntry parent; + +/** Additional ways to create an entry */ +void create(in nsIURI aURI, in wstring aTitle, in nsIDOMDocument aDocument, + in nsIInputStream aInputStream, in nsISupports aHistoryLayoutState); + +}; + + +%{ C++ +// {BFD1A791-AD9F-11d3-BDC7-0050040A9B44} +#define NS_SHENTRY_CID \ +{0xbfd1a791, 0xad9f, 0x11d3, {0xbd, 0xc7, 0x0, 0x50, 0x4, 0xa, 0x9b, 0x44}} + +#define NS_SHENTRY_PROGID \ + "component://netscape/browser/session-history-entry" + +%} + diff --git a/mozilla/xpfe/components/shistory/public/nsISHTransaction.idl b/mozilla/xpfe/components/shistory/public/nsISHTransaction.idl new file mode 100644 index 00000000000..9388423f211 --- /dev/null +++ b/mozilla/xpfe/components/shistory/public/nsISHTransaction.idl @@ -0,0 +1,72 @@ +/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * + * The contents of this file are subject to the Mozilla 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/MPL/ + * + * 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 the Mozilla browser. + * + * The Initial Developer of the Original Code is Netscape + * Communications, Inc. Portions created by Netscape are + * Copyright (C) 1999, Mozilla. All Rights Reserved. + * + * Contributor(s): + * Radha Kulkarni + */ + +#include "nsISupports.idl" +#include "nsISHEntry.idl" +#include "nsIEnumerator.idl" + + +/** + * The nsISHTransaction. + */ + + +[scriptable, uuid(2F0C3A72-988B-11d3-BDC7-0050040A9B44)] +interface nsISHTransaction : nsISupports +{ + /** + * The nsISHEntry for the current transaction + */ + readonly attribute nsISHEntry currentSHistoryEntry; + + /** + * The parent of this transaction + */ + readonly attribute nsISHTransaction parent; + + /** + * The legitimate child of this transaction + */ + readonly attribute nsISHTransaction child; + + /** + * The *other* children of this transaction. + */ + readonly attribute nsISHTransaction lrvList; + + /** + * Create a transaction with parent and History Entry + */ + void create(in nsISHEntry aSHEntry, in nsISHTransaction aParent); +}; + +%{ C++ +// {BFD1A792-AD9F-11d3-BDC7-0050040A9B44} + + +#define NS_SHTRANSACTION_CID \ +{0xbfd1a792, 0xad9f, 0x11d3, {0xbd, 0xc7, 0x0, 0x50, 0x4, 0xa, 0x9b, 0x44}} + +#define NS_SHTRANSACTION_PROGID \ + "component://netscape/browser/session-history-transaction" + +%} \ No newline at end of file