extensions/pref/autoconfig/src/nsAutoConfig.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/extensions/pref/autoconfig/src/nsAutoConfig.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,53 @@
     1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef nsAutoConfig_h
    1.10 +#define nsAutoConfig_h
    1.11 +
    1.12 +#include "nsIAutoConfig.h"
    1.13 +#include "nsITimer.h"
    1.14 +#include "nsIFile.h"
    1.15 +#include "nsIObserver.h"
    1.16 +#include "nsNetUtil.h"
    1.17 +#include "nsIPrefService.h"
    1.18 +#include "nsIPrefBranch.h"
    1.19 +#include "nsWeakReference.h"
    1.20 +
    1.21 +class nsAutoConfig : public nsIAutoConfig,
    1.22 +                     public nsITimerCallback,
    1.23 +                     public nsIStreamListener,
    1.24 +                     public nsIObserver,
    1.25 +                     public nsSupportsWeakReference
    1.26 +
    1.27 +{
    1.28 +    public:
    1.29 +
    1.30 +        NS_DECL_THREADSAFE_ISUPPORTS
    1.31 +        NS_DECL_NSIAUTOCONFIG
    1.32 +        NS_DECL_NSIREQUESTOBSERVER
    1.33 +        NS_DECL_NSISTREAMLISTENER
    1.34 +        NS_DECL_NSIOBSERVER
    1.35 +        NS_DECL_NSITIMERCALLBACK
    1.36 +
    1.37 +        nsAutoConfig();
    1.38 +        virtual ~nsAutoConfig();
    1.39 +        nsresult Init();
    1.40 +  
    1.41 +    protected:
    1.42 +  
    1.43 +        nsresult downloadAutoConfig();
    1.44 +        nsresult readOfflineFile();
    1.45 +        nsresult evaluateLocalFile(nsIFile *file);
    1.46 +        nsresult writeFailoverFile();
    1.47 +        nsresult getEmailAddr(nsACString & emailAddr);
    1.48 +        nsresult PromptForEMailAddress(nsACString &emailAddress);
    1.49 +        nsCString mBuf;
    1.50 +        nsCOMPtr<nsIPrefBranch> mPrefBranch;
    1.51 +        bool mLoaded;
    1.52 +        nsCOMPtr<nsITimer> mTimer;
    1.53 +        nsCString mConfigURL;
    1.54 +};
    1.55 +
    1.56 +#endif

mercurial