2001-02-07 01:21:58 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
2012-05-21 11:12:37 +00:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2001-02-07 01:21:58 +00:00
|
|
|
|
|
|
|
#ifndef nsExternalProtocolHandler_h___
|
|
|
|
#define nsExternalProtocolHandler_h___
|
|
|
|
|
2003-02-27 22:46:42 +00:00
|
|
|
#include "nsIExternalProtocolHandler.h"
|
2001-02-07 01:21:58 +00:00
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsString.h"
|
|
|
|
#include "nsWeakReference.h"
|
2003-02-27 22:46:42 +00:00
|
|
|
#include "nsIExternalProtocolService.h"
|
2012-06-13 03:53:09 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
2001-02-07 01:21:58 +00:00
|
|
|
|
2001-02-07 05:24:27 +00:00
|
|
|
class nsIURI;
|
2001-02-07 01:21:58 +00:00
|
|
|
|
|
|
|
// protocol handlers need to support weak references if we want the netlib nsIOService to cache them.
|
2012-06-13 03:53:09 +00:00
|
|
|
class nsExternalProtocolHandler MOZ_FINAL : public nsIExternalProtocolHandler, public nsSupportsWeakReference
|
2001-02-07 01:21:58 +00:00
|
|
|
{
|
|
|
|
public:
|
2013-07-19 02:24:15 +00:00
|
|
|
NS_DECL_THREADSAFE_ISUPPORTS
|
2001-02-07 01:21:58 +00:00
|
|
|
NS_DECL_NSIPROTOCOLHANDLER
|
2003-02-27 22:46:42 +00:00
|
|
|
NS_DECL_NSIEXTERNALPROTOCOLHANDLER
|
2001-02-07 01:21:58 +00:00
|
|
|
|
|
|
|
nsExternalProtocolHandler();
|
|
|
|
|
|
|
|
protected:
|
2014-06-23 18:49:09 +00:00
|
|
|
~nsExternalProtocolHandler();
|
|
|
|
|
2001-02-07 05:24:27 +00:00
|
|
|
// helper function
|
2011-09-29 06:19:26 +00:00
|
|
|
bool HaveExternalProtocolHandler(nsIURI * aURI);
|
2001-02-07 01:21:58 +00:00
|
|
|
nsCString m_schemeName;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsExternalProtocolHandler_h___
|
|
|
|
|