transport: empty test for sqlite converter
[abstract.git] / view / aaLoadGroup.h
blob83f1cc1b871c65e977aeb2fc9ed980d54bc8bb1c
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:set ts=2 sw=2 sts=2 et cindent tw=79 ft=cpp: */
3 /*
4 * Copyright (C) 2010 Sergey Yanovich <ynvich@gmail.com>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public
17 * License along with this program; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
22 #ifndef AALOADGROUP_H
23 #define AALOADGROUP_H 1
25 #include "nsCOMPtr.h"
26 #include "nsWeakPtr.h"
27 #include "nsILoadGroup.h"
28 #include "nsIDocShell.h"
29 #include "nsIRunnable.h"
30 #include "nsWeakReference.h"
32 #define NS_FORWARD_NSILOADGROUP_R(_to) \
33 NS_SCRIPTABLE NS_IMETHOD GetGroupObserver(nsIRequestObserver * *aGroupObserver) { return _to GetGroupObserver(aGroupObserver); } \
34 NS_SCRIPTABLE NS_IMETHOD SetGroupObserver(nsIRequestObserver * aGroupObserver) { return _to SetGroupObserver(aGroupObserver); } \
35 NS_SCRIPTABLE NS_IMETHOD GetDefaultLoadRequest(nsIRequest * *aDefaultLoadRequest) { return _to GetDefaultLoadRequest(aDefaultLoadRequest); } \
36 NS_SCRIPTABLE NS_IMETHOD SetDefaultLoadRequest(nsIRequest * aDefaultLoadRequest) { return _to SetDefaultLoadRequest(aDefaultLoadRequest); } \
37 NS_SCRIPTABLE NS_IMETHOD GetRequests(nsISimpleEnumerator * *aRequests) { return _to GetRequests(aRequests); } \
38 NS_SCRIPTABLE NS_IMETHOD GetActiveCount(PRUint32 *aActiveCount) { return _to GetActiveCount(aActiveCount); } \
39 NS_SCRIPTABLE NS_IMETHOD GetNotificationCallbacks(nsIInterfaceRequestor * *aNotificationCallbacks) { return _to GetNotificationCallbacks(aNotificationCallbacks); } \
40 NS_SCRIPTABLE NS_IMETHOD SetNotificationCallbacks(nsIInterfaceRequestor * aNotificationCallbacks) { return _to SetNotificationCallbacks(aNotificationCallbacks); }
42 class aaLoadGroup : public nsILoadGroup,
43 public nsSupportsWeakReference
45 public:
46 aaLoadGroup(nsIDocShell *docShell);
47 NS_DECL_ISUPPORTS
48 NS_FORWARD_NSIREQUEST(mContained->)
49 NS_FORWARD_NSILOADGROUP_R(mContained->)
50 NS_SCRIPTABLE NS_IMETHOD AddRequest(nsIRequest *aRequest,
51 nsISupports *aContext);
52 NS_SCRIPTABLE NS_IMETHOD RemoveRequest(nsIRequest *aRequest,
53 nsISupports *aContext, nsresult aStatus);
55 nsresult Init(const PRUnichar *aURI, PRUint32 aLoadFlags, nsIURI *aReferrer,
56 nsIInputStream *aPostData, nsIInputStream *aHeaders);
57 private:
58 virtual ~aaLoadGroup() {}
59 friend class aaViewTest;
61 nsWeakPtr mDocShell;
62 nsCOMPtr<nsILoadGroup> mContained;
63 nsCOMPtr<nsIRunnable> mTask;
65 PRInt32 mCount;
66 nsresult mStatus;
68 void checkPresentation(nsIDocShell *docShell);
71 #endif /* AALOADGROUP_H */