extensions/pref/autoconfig/src/nsAutoConfig.h

branch
TOR_BUG_9701
changeset 11
deefc01c0e14
equal deleted inserted replaced
-1:000000000000 0:61371407d014
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 #ifndef nsAutoConfig_h
7 #define nsAutoConfig_h
8
9 #include "nsIAutoConfig.h"
10 #include "nsITimer.h"
11 #include "nsIFile.h"
12 #include "nsIObserver.h"
13 #include "nsNetUtil.h"
14 #include "nsIPrefService.h"
15 #include "nsIPrefBranch.h"
16 #include "nsWeakReference.h"
17
18 class nsAutoConfig : public nsIAutoConfig,
19 public nsITimerCallback,
20 public nsIStreamListener,
21 public nsIObserver,
22 public nsSupportsWeakReference
23
24 {
25 public:
26
27 NS_DECL_THREADSAFE_ISUPPORTS
28 NS_DECL_NSIAUTOCONFIG
29 NS_DECL_NSIREQUESTOBSERVER
30 NS_DECL_NSISTREAMLISTENER
31 NS_DECL_NSIOBSERVER
32 NS_DECL_NSITIMERCALLBACK
33
34 nsAutoConfig();
35 virtual ~nsAutoConfig();
36 nsresult Init();
37
38 protected:
39
40 nsresult downloadAutoConfig();
41 nsresult readOfflineFile();
42 nsresult evaluateLocalFile(nsIFile *file);
43 nsresult writeFailoverFile();
44 nsresult getEmailAddr(nsACString & emailAddr);
45 nsresult PromptForEMailAddress(nsACString &emailAddress);
46 nsCString mBuf;
47 nsCOMPtr<nsIPrefBranch> mPrefBranch;
48 bool mLoaded;
49 nsCOMPtr<nsITimer> mTimer;
50 nsCString mConfigURL;
51 };
52
53 #endif

mercurial