2001-02-07 04:21:58 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
2012-05-21 15:12:37 +04: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 04:21:58 +03:00
|
|
|
|
|
|
|
#ifndef nsExternalProtocolHandler_h___
|
|
|
|
#define nsExternalProtocolHandler_h___
|
|
|
|
|
2003-02-28 01:46:42 +03:00
|
|
|
#include "nsIExternalProtocolHandler.h"
|
2001-02-07 04:21:58 +03:00
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsString.h"
|
|
|
|
#include "nsWeakReference.h"
|
2003-02-28 01:46:42 +03:00
|
|
|
#include "nsIExternalProtocolService.h"
|
2012-06-13 07:53:09 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2001-02-07 04:21:58 +03:00
|
|
|
|
2001-02-07 08:24:27 +03:00
|
|
|
class nsIURI;
|
2001-02-07 04:21:58 +03:00
|
|
|
|
|
|
|
// protocol handlers need to support weak references if we want the netlib nsIOService to cache them.
|
2012-06-13 07:53:09 +04:00
|
|
|
class nsExternalProtocolHandler MOZ_FINAL : public nsIExternalProtocolHandler, public nsSupportsWeakReference
|
2001-02-07 04:21:58 +03:00
|
|
|
{
|
|
|
|
public:
|
2013-07-19 06:24:15 +04:00
|
|
|
NS_DECL_THREADSAFE_ISUPPORTS
|
2001-02-07 04:21:58 +03:00
|
|
|
NS_DECL_NSIPROTOCOLHANDLER
|
2003-02-28 01:46:42 +03:00
|
|
|
NS_DECL_NSIEXTERNALPROTOCOLHANDLER
|
2001-02-07 04:21:58 +03:00
|
|
|
|
|
|
|
nsExternalProtocolHandler();
|
2004-01-16 21:22:55 +03:00
|
|
|
~nsExternalProtocolHandler();
|
2001-02-07 04:21:58 +03:00
|
|
|
|
|
|
|
protected:
|
2001-02-07 08:24:27 +03:00
|
|
|
// helper function
|
2011-09-29 10:19:26 +04:00
|
|
|
bool HaveExternalProtocolHandler(nsIURI * aURI);
|
2001-02-07 04:21:58 +03:00
|
|
|
nsCString m_schemeName;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // nsExternalProtocolHandler_h___
|
|
|
|
|