1998-10-02 01:36:57 +04: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 nsIURLGroup_h__
|
|
|
|
#define nsIURLGroup_h__
|
|
|
|
|
|
|
|
#include "nsISupports.h"
|
|
|
|
|
|
|
|
class nsString;
|
1999-06-23 07:29:44 +04:00
|
|
|
class nsIURI;
|
1998-10-02 01:36:57 +04:00
|
|
|
class nsIInputStream;
|
|
|
|
class nsIStreamListener;
|
|
|
|
class nsILoadAttribs;
|
|
|
|
|
|
|
|
/* {a4071430-5263-11d2-929b-00105a1b0d64} */
|
1999-06-25 06:17:37 +04:00
|
|
|
#define NS_ILOADGROUP_IID \
|
1998-10-02 01:36:57 +04:00
|
|
|
{ 0xa4071430, 0x5263, 0x11d2, \
|
|
|
|
{0x92, 0x9b, 0x00, 0x10, 0x5a, 0x1b, 0x0d, 0x64} }
|
|
|
|
|
1999-06-25 06:17:37 +04:00
|
|
|
class nsILoadGroup : public nsISupports
|
1998-10-02 01:36:57 +04:00
|
|
|
{
|
|
|
|
public:
|
1999-04-30 12:59:11 +04:00
|
|
|
|
1999-06-25 06:17:37 +04:00
|
|
|
static const nsIID& GetIID() { static nsIID iid = NS_ILOADGROUP_IID; return iid; }
|
1999-04-30 12:59:11 +04:00
|
|
|
|
1998-10-02 01:36:57 +04:00
|
|
|
/**
|
|
|
|
* Create a new URL, setting its LoadAttributes to the default
|
|
|
|
* LoadAttributes for the group.
|
|
|
|
*
|
|
|
|
* If aBaseURL is non-null then aSpec is interpreted as relative to
|
|
|
|
* aBaseURL.
|
|
|
|
*
|
|
|
|
* @param aInstancePtrResult Newly created URL.
|
|
|
|
* @param aBaseURL An existing URL to be treated as a base
|
|
|
|
* @param aSpec String specification of the URL
|
|
|
|
* @param aContainer An ISupports interface associated with the
|
|
|
|
* URL.
|
|
|
|
* @return Returns NS_OK if successful, otherwise NS_ERROR_FAILURE...
|
|
|
|
*/
|
1999-06-23 07:29:44 +04:00
|
|
|
NS_IMETHOD CreateURL(nsIURI** aInstancePtrResult,
|
|
|
|
nsIURI* aBaseURL,
|
1998-10-02 01:36:57 +04:00
|
|
|
const nsString& aSpec,
|
|
|
|
nsISupports* aContainer) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initiate an asynchronous URL load...
|
|
|
|
*
|
|
|
|
* @param aUrl The URL to be loaded.
|
|
|
|
* @param aConsumer The nsIStreamListener where the data and loading
|
|
|
|
* notifications will be sent.
|
|
|
|
*
|
|
|
|
* @return Returns NS_OK if successful, otherwise NS_ERROR_FAILURE.
|
|
|
|
*/
|
1999-06-23 07:29:44 +04:00
|
|
|
NS_IMETHOD OpenStream(nsIURI *aUrl,
|
1998-10-02 01:36:57 +04:00
|
|
|
nsIStreamListener *aConsumer) = 0;
|
|
|
|
|
|
|
|
/**
|
1999-06-25 06:17:37 +04:00
|
|
|
* Get the nsILoadAttributes for this nsILoadGroup and its children...
|
1998-10-02 01:36:57 +04:00
|
|
|
*
|
|
|
|
* @param aLoadAttribs Result parameter containing the nsILoadAttributes
|
|
|
|
* instance.
|
|
|
|
*
|
|
|
|
* @return Returns NS_OK if successful, otherwise NS_ERROR_FAILURE.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD GetDefaultLoadAttributes(nsILoadAttribs*& aLoadAttribs) = 0;
|
|
|
|
|
|
|
|
/**
|
1999-06-25 06:17:37 +04:00
|
|
|
* Set the nsILoadAttributes for this nsILoadGroup and its children...
|
1998-10-02 01:36:57 +04:00
|
|
|
*
|
|
|
|
* @param aLoadAttribs nsILoadAttributes instance to be used by this
|
1999-06-25 06:17:37 +04:00
|
|
|
* nsILoadGroup and its children.
|
1998-10-02 01:36:57 +04:00
|
|
|
*
|
|
|
|
* @return Returns NS_OK if successful, otherwise NS_ERROR_FAILURE.
|
|
|
|
*/
|
|
|
|
NS_IMETHOD SetDefaultLoadAttributes(nsILoadAttribs* aLoadAttribs) = 0;
|
|
|
|
|
|
|
|
/**
|
1999-06-25 06:17:37 +04:00
|
|
|
* Add a child to an nsILoadGroup.
|
1998-10-02 01:36:57 +04:00
|
|
|
*
|
1999-06-25 06:17:37 +04:00
|
|
|
* @param aGroup The nsILoadGroup to be added as a child. When the
|
1998-10-02 01:36:57 +04:00
|
|
|
* child is added it will receive the nsILoadAttribs
|
|
|
|
* of its parent...
|
|
|
|
*
|
|
|
|
* @return Returns NS_OK if successful, otherwise NS_ERROR_FAILURE.
|
|
|
|
*/
|
1999-06-25 06:17:37 +04:00
|
|
|
NS_IMETHOD AddChildGroup(nsILoadGroup* aGroup) = 0;
|
1998-10-02 01:36:57 +04:00
|
|
|
|
|
|
|
/**
|
1999-06-25 06:17:37 +04:00
|
|
|
* Remove a child from an nsILoadGroup.
|
1998-10-02 01:36:57 +04:00
|
|
|
*
|
1999-06-25 06:17:37 +04:00
|
|
|
* @param aGroup The nsILoadGroup to be removed.
|
1998-10-02 01:36:57 +04:00
|
|
|
*
|
|
|
|
* @return Returns NS_OK if successful, otherwise NS_ERROR_FAILURE.
|
|
|
|
*/
|
1999-06-25 06:17:37 +04:00
|
|
|
NS_IMETHOD RemoveChildGroup(nsILoadGroup* aGroup) = 0;
|
1998-10-02 01:36:57 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* nsIURLGroup_h__ */
|