extensions/pref/autoconfig/src/nsAutoConfig.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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/. */
     6 #ifndef nsAutoConfig_h
     7 #define nsAutoConfig_h
     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"
    18 class nsAutoConfig : public nsIAutoConfig,
    19                      public nsITimerCallback,
    20                      public nsIStreamListener,
    21                      public nsIObserver,
    22                      public nsSupportsWeakReference
    24 {
    25     public:
    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
    34         nsAutoConfig();
    35         virtual ~nsAutoConfig();
    36         nsresult Init();
    38     protected:
    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 };
    53 #endif

mercurial