This commit is contained in:
kipp%netscape.com 1999-05-06 19:35:11 +00:00
Родитель 714ae43be7
Коммит 387570c865
2 изменённых файлов: 36 добавлений и 28 удалений

Просмотреть файл

@ -1,6 +1,3 @@
#ifndef nsIDocStreamLoaderFactory_h___
#define nsIDocStreamLoaderFactory_h___
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
@ -19,31 +16,34 @@
* Corporation. Portions created by Netscape are Copyright (C) 1998
* Netscape Communications Corporation. All Rights Reserved.
*/
#ifndef nsIDocStreamLoaderFactory_h___
#define nsIDocStreamLoaderFactory_h___
// Wrapping includes can speed up compiles (see "Large Scale C++ Software Design")
// Wrapping includes can speed up compiles (see "Large Scale C++
// Software Design")
#ifndef nsISupports_h___
#include "nsISupports.h"
#include "nsISupports.h"
#endif
class nsIInputStream;
class nsIContentViewer;
class nsIContentViewerContainer;
/* 9188bc80-f92e-11d2-81ef-0060083a0bcf */
/* 9188bc80-f92e-11d2-81ef-0060083a0bcf */
#define NS_IDOCSTREAMLOADERFACTORY_IID \
{ 0x9188bc80, 0xf92e, 0x11d2,{0x81, 0xef, 0x00, 0x60, 0x08, 0x3a, 0x0b, 0xcf}}
class nsIDocStreamLoaderFactory : public nsISupports
{
public:
static const nsIID& GetIID() { static nsIID iid = NS_IDOCSTREAMLOADERFACTORY_IID; return iid; }
{
public:
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOCSTREAMLOADERFACTORY_IID)
NS_IMETHOD CreateInstance( nsIInputStream& aInputStream,
const char* aContentType,
const char* aCommand,
nsIContentViewerContainer* aContainer,
nsISupports* aExtraInfo,
nsIContentViewer** aDocViewer ) = 0;
};
NS_IMETHOD CreateInstance(nsIInputStream& aInputStream,
const char* aContentType,
const char* aCommand,
nsIContentViewerContainer* aContainer,
nsISupports* aExtraInfo,
nsIContentViewer** aDocViewer) = 0;
};
#endif // !defined(nsIDocStreamLoaderFactory_h___)
#endif /* !defined(nsIDocStreamLoaderFactory_h___) */

Просмотреть файл

@ -1,4 +1,4 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
/* -*- 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.0 (the "License"); you may not use this file except in
@ -37,8 +37,19 @@ class nsIDocumentLoaderObserver;
/* f43ba260-0737-11d2-beb9-00805f8a66dc */
#define NS_IDOCUMENTLOADERFACTORY_IID \
{ 0xf43ba260, 0x0737, 0x11d2, \
{0xbe, 0xb9, 0x00, 0x80, 0x5f, 0x8a, 0x66, 0xdc} }
{ 0xf43ba260, 0x0737, 0x11d2,{0xbe, 0xb9, 0x00, 0x80, 0x5f, 0x8a, 0x66, 0xdc}}
// Registered components that can instantiate a
// nsIDocumentLoaderFactory for a given mimetype must be prefixed with
// this prefix to be found. The format is <prefix>/%s/%s where the
// first %s is replaced with the command and the second %s is replaced
// with the mimetype. For example, to view a image/gif file you would
// create this progid:
//
// "component://netscape/content-viewer-factory/view/image/gif"
//
#define NS_DOCUMENT_LOADER_FACTORY_PROGID_PREFIX \
"component://netscape/content-viewer-factory/"
/*
* The factory API for creating a content viewer for a given
@ -47,7 +58,7 @@ class nsIDocumentLoaderObserver;
class nsIDocumentLoaderFactory : public nsISupports
{
public:
static const nsIID& GetIID() { static nsIID iid = NS_IDOCUMENTLOADERFACTORY_IID; return iid; }
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOCUMENTLOADERFACTORY_IID)
NS_IMETHOD CreateInstance(nsIURL* aURL,
const char* aContentType,
@ -58,6 +69,8 @@ public:
nsIContentViewer** aDocViewerResult) = 0;
};
//----------------------------------------------------------------------
/* b9d685e0-fcae-11d1-beb9-00805f8a66dc */
#define NS_IDOCUMENTLOADER_IID \
{ 0xb9d685e0, 0xfcae, 0x11d1, \
@ -70,7 +83,7 @@ public:
class nsIDocumentLoader : public nsISupports
{
public:
static const nsIID& GetIID() { static nsIID iid = NS_IDOCUMENTLOADER_IID; return iid; }
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOCUMENTLOADER_IID)
NS_IMETHOD LoadDocument(const nsString& aURLSpec,
const char* aCommand,
@ -92,10 +105,6 @@ public:
NS_IMETHOD CreateDocumentLoader(nsIDocumentLoader** anInstance) = 0;
NS_IMETHOD SetDocumentFactory(nsIDocumentLoaderFactory* aFactory) = 0;
NS_IMETHOD GetDocumentFactory(nsIDocumentLoaderFactory** aResult) = 0;
NS_IMETHOD AddObserver(nsIDocumentLoaderObserver *aObserver) = 0;
NS_IMETHOD RemoveObserver(nsIDocumentLoaderObserver *aObserver) = 0;
@ -109,7 +118,6 @@ public:
/* 057b04d0-0ccf-11d2-beba-00805f8a66dc */
#define NS_DOCUMENTLOADER_SERVICE_CID \
{ 0x057b04d0, 0x0ccf, 0x11d2, \
{0xbe, 0xba, 0x00, 0x80, 0x5f, 0x8a, 0x66, 0xdc} }
{ 0x057b04d0, 0x0ccf, 0x11d2,{0xbe, 0xba, 0x00, 0x80, 0x5f, 0x8a, 0x66, 0xdc}}
#endif /* nsIDocumentLoader_h___ */