michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim: set ts=2 et sw=2 tw=80: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef ApplicationReputation_h__ michael@0: #define ApplicationReputation_h__ michael@0: michael@0: #include "nsIApplicationReputation.h" michael@0: #include "nsIRequestObserver.h" michael@0: #include "nsIStreamListener.h" michael@0: #include "nsISupports.h" michael@0: michael@0: #include "nsCOMPtr.h" michael@0: #include "nsString.h" michael@0: michael@0: class nsIRequest; michael@0: class PendingDBLookup; michael@0: class PendingLookup; michael@0: class PRLogModuleInfo; michael@0: michael@0: class ApplicationReputationService MOZ_FINAL : michael@0: public nsIApplicationReputationService { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIAPPLICATIONREPUTATIONSERVICE michael@0: michael@0: public: michael@0: static ApplicationReputationService* GetSingleton(); michael@0: michael@0: private: michael@0: friend class PendingLookup; michael@0: friend class PendingDBLookup; michael@0: /** michael@0: * Global singleton object for holding this factory service. michael@0: */ michael@0: static ApplicationReputationService* gApplicationReputationService; michael@0: /** michael@0: * NSPR_LOG_MODULES=ApplicationReputation:5 michael@0: */ michael@0: static PRLogModuleInfo* prlog; michael@0: /** michael@0: * This is a singleton, so disallow construction. michael@0: */ michael@0: ApplicationReputationService(); michael@0: ~ApplicationReputationService(); michael@0: /** michael@0: * Wrapper function for QueryReputation that makes it easier to ensure the michael@0: * callback is called. michael@0: */ michael@0: nsresult QueryReputationInternal(nsIApplicationReputationQuery* aQuery, michael@0: nsIApplicationReputationCallback* aCallback); michael@0: }; michael@0: #endif /* ApplicationReputation_h__ */