1999-06-24 22:58:42 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
|
|
*
|
1999-11-06 03:40:37 +00:00
|
|
|
* 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/
|
1999-06-24 22:58:42 +00:00
|
|
|
*
|
1999-11-06 03:40:37 +00:00
|
|
|
* 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.
|
1999-06-24 22:58:42 +00:00
|
|
|
*
|
1999-11-06 03:40:37 +00:00
|
|
|
* The Original Code is mozilla.org code.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is Netscape
|
1999-06-24 22:58:42 +00:00
|
|
|
* Communications Corporation. Portions created by Netscape are
|
1999-11-06 03:40:37 +00:00
|
|
|
* Copyright (C) 1998 Netscape Communications Corporation. All
|
|
|
|
* Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
1999-06-24 22:58:42 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef nsLoadGroup_h__
|
|
|
|
#define nsLoadGroup_h__
|
|
|
|
|
|
|
|
#include "nsILoadGroup.h"
|
1999-08-26 23:05:20 +00:00
|
|
|
#include "nsIChannel.h"
|
1999-07-01 19:30:20 +00:00
|
|
|
#include "nsIStreamListener.h"
|
1999-06-24 22:58:42 +00:00
|
|
|
#include "nsAgg.h"
|
1999-08-26 22:45:55 +00:00
|
|
|
#include "nsCOMPtr.h"
|
1999-09-09 23:55:19 +00:00
|
|
|
#include "nsWeakPtr.h"
|
1999-09-20 05:27:50 +00:00
|
|
|
#include "nsWeakReference.h"
|
1999-06-24 22:58:42 +00:00
|
|
|
|
1999-11-22 05:46:03 +00:00
|
|
|
class nsISupportsArray;
|
1999-06-24 22:58:42 +00:00
|
|
|
|
1999-09-20 05:27:50 +00:00
|
|
|
class nsLoadGroup : public nsILoadGroup,
|
|
|
|
public nsSupportsWeakReference
|
1999-06-24 22:58:42 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_AGGREGATED
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////
|
|
|
|
// nsIRequest methods:
|
1999-08-22 13:26:18 +00:00
|
|
|
NS_DECL_NSIREQUEST
|
1999-06-24 22:58:42 +00:00
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////
|
|
|
|
// nsILoadGroup methods:
|
1999-08-22 13:26:18 +00:00
|
|
|
NS_DECL_NSILOADGROUP
|
1999-11-22 05:46:03 +00:00
|
|
|
|
1999-06-24 22:58:42 +00:00
|
|
|
////////////////////////////////////////////////////////////////////////////
|
|
|
|
// nsLoadGroup methods:
|
|
|
|
|
|
|
|
nsLoadGroup(nsISupports* outer);
|
|
|
|
|
|
|
|
static NS_METHOD
|
|
|
|
Create(nsISupports *aOuter, REFNSIID aIID, void **aResult);
|
|
|
|
|
|
|
|
protected:
|
1999-11-22 05:46:03 +00:00
|
|
|
virtual ~nsLoadGroup();
|
|
|
|
nsresult Init();
|
1999-06-24 22:58:42 +00:00
|
|
|
|
2001-02-21 20:38:08 +00:00
|
|
|
nsresult MergeLoadAttributes(nsIRequest *aRequest, nsLoadFlags& flags);
|
1999-08-26 22:45:55 +00:00
|
|
|
|
1999-06-24 22:58:42 +00:00
|
|
|
protected:
|
|
|
|
PRUint32 mDefaultLoadAttributes;
|
1999-07-16 11:14:36 +00:00
|
|
|
PRUint32 mForegroundCount;
|
1999-08-26 22:45:55 +00:00
|
|
|
|
2001-02-21 20:38:08 +00:00
|
|
|
nsCOMPtr<nsIRequest> mDefaultLoadRequest;
|
|
|
|
nsISupportsArray* mRequests;
|
1999-11-22 05:46:03 +00:00
|
|
|
|
2001-02-21 20:38:08 +00:00
|
|
|
nsWeakPtr mObserver;
|
2000-03-24 05:42:10 +00:00
|
|
|
// nsCOMPtr<nsIStreamObserver> mObserver;
|
2001-02-21 20:38:08 +00:00
|
|
|
|
1999-09-09 23:55:19 +00:00
|
|
|
nsWeakPtr mGroupListenerFactory;
|
2001-02-21 20:38:08 +00:00
|
|
|
nsresult mStatus;
|
1999-06-24 22:58:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsLoadGroup_h__
|