1998-07-01 11:25:55 +00:00
|
|
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Netscape Public License
|
|
|
|
* Version 1.0 (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 Communicator client 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.
|
|
|
|
*/
|
|
|
|
#ifndef nsIDocumentLoader_h___
|
|
|
|
#define nsIDocumentLoader_h___
|
|
|
|
|
|
|
|
#include "nsweb.h"
|
|
|
|
#include "prtypes.h"
|
|
|
|
#include "nsISupports.h"
|
1998-09-16 00:40:20 +00:00
|
|
|
#include "nsILoadAttribs.h"
|
1998-07-01 11:25:55 +00:00
|
|
|
|
|
|
|
/* Forward declarations... */
|
|
|
|
class nsString;
|
|
|
|
class nsIURL;
|
|
|
|
class nsIFactory;
|
1998-07-02 23:38:48 +00:00
|
|
|
class nsIPostData;
|
1998-07-17 06:32:39 +00:00
|
|
|
class nsIContentViewer;
|
1998-07-18 21:48:47 +00:00
|
|
|
class nsIContentViewerContainer;
|
1998-07-01 11:25:55 +00:00
|
|
|
class nsIStreamListener;
|
1998-07-02 23:38:48 +00:00
|
|
|
class nsIStreamObserver;
|
1998-08-12 04:56:40 +00:00
|
|
|
class nsIDocumentLoaderObserver;
|
1998-07-01 11:25:55 +00:00
|
|
|
|
|
|
|
/* f43ba260-0737-11d2-beb9-00805f8a66dc */
|
|
|
|
#define NS_IDOCUMENTLOADERFACTORY_IID \
|
|
|
|
{ 0xf43ba260, 0x0737, 0x11d2, \
|
|
|
|
{0xbe, 0xb9, 0x00, 0x80, 0x5f, 0x8a, 0x66, 0xdc} }
|
|
|
|
|
|
|
|
/*
|
1998-07-18 21:48:47 +00:00
|
|
|
* The factory API for creating a content viewer for a given
|
|
|
|
* content-type and command.
|
1998-07-01 11:25:55 +00:00
|
|
|
*/
|
|
|
|
class nsIDocumentLoaderFactory : public nsISupports
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_IMETHOD CreateInstance(nsIURL* aURL,
|
|
|
|
const char* aContentType,
|
|
|
|
const char *aCommand,
|
1998-07-18 21:48:47 +00:00
|
|
|
nsIContentViewerContainer* aContainer,
|
1999-03-12 05:20:14 +00:00
|
|
|
nsISupports* aExtraInfo,
|
1998-07-18 21:48:47 +00:00
|
|
|
nsIStreamListener** aDocListenerResult,
|
|
|
|
nsIContentViewer** aDocViewerResult) = 0;
|
1998-07-01 11:25:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* b9d685e0-fcae-11d1-beb9-00805f8a66dc */
|
|
|
|
#define NS_IDOCUMENTLOADER_IID \
|
|
|
|
{ 0xb9d685e0, 0xfcae, 0x11d1, \
|
|
|
|
{0xbe, 0xb9, 0x00, 0x80, 0x5f, 0x8a, 0x66, 0xdc} }
|
|
|
|
|
|
|
|
/*
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
class nsIDocumentLoader : public nsISupports
|
|
|
|
{
|
|
|
|
public:
|
1999-03-11 22:38:38 +00:00
|
|
|
static const nsIID& GetIID() { static nsIID iid = NS_IDOCUMENTLOADER_IID; return iid; }
|
|
|
|
|
1998-10-09 05:47:40 +00:00
|
|
|
NS_IMETHOD LoadDocument(const nsString& aURLSpec,
|
|
|
|
const char* aCommand,
|
|
|
|
nsIContentViewerContainer* aContainer,
|
|
|
|
nsIPostData* aPostData = nsnull,
|
|
|
|
nsISupports* aExtraInfo = nsnull,
|
|
|
|
nsIStreamObserver* anObserver = nsnull,
|
1998-10-10 04:34:35 +00:00
|
|
|
nsURLReloadType type = nsURLReload,
|
1998-10-09 05:47:40 +00:00
|
|
|
const PRUint32 aLocalIP = 0) = 0;
|
1998-07-22 11:23:32 +00:00
|
|
|
|
1999-03-12 05:20:14 +00:00
|
|
|
NS_IMETHOD LoadSubDocument(const nsString& aURLSpec,
|
|
|
|
nsISupports* aExtraInfo = nsnull,
|
|
|
|
nsURLReloadType type = nsURLReload,
|
|
|
|
const PRUint32 aLocalIP = 0) = 0;
|
|
|
|
|
1998-07-22 11:23:32 +00:00
|
|
|
NS_IMETHOD Stop(void) = 0;
|
|
|
|
|
1998-10-01 21:47:18 +00:00
|
|
|
NS_IMETHOD IsBusy(PRBool& aResult) = 0;
|
|
|
|
|
1998-07-22 11:23:32 +00:00
|
|
|
NS_IMETHOD CreateDocumentLoader(nsIDocumentLoader** anInstance) = 0;
|
|
|
|
|
|
|
|
NS_IMETHOD SetDocumentFactory(nsIDocumentLoaderFactory* aFactory) = 0;
|
1998-08-12 04:56:40 +00:00
|
|
|
|
|
|
|
NS_IMETHOD AddObserver(nsIDocumentLoaderObserver *aObserver) = 0;
|
|
|
|
|
|
|
|
NS_IMETHOD RemoveObserver(nsIDocumentLoaderObserver *aObserver) = 0;
|
1999-01-14 06:34:56 +00:00
|
|
|
|
|
|
|
NS_IMETHOD SetContainer(nsIContentViewerContainer* aContainer) = 0;
|
|
|
|
|
|
|
|
NS_IMETHOD GetContainer(nsIContentViewerContainer** aResult) = 0;
|
1998-07-01 11:25:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* 057b04d0-0ccf-11d2-beba-00805f8a66dc */
|
1999-01-17 11:47:27 +00:00
|
|
|
#define NS_DOCUMENTLOADER_SERVICE_CID \
|
1998-07-01 11:25:55 +00:00
|
|
|
{ 0x057b04d0, 0x0ccf, 0x11d2, \
|
|
|
|
{0xbe, 0xba, 0x00, 0x80, 0x5f, 0x8a, 0x66, 0xdc} }
|
|
|
|
|
|
|
|
#endif /* nsIDocumentLoader_h___ */
|