michael@0: //* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 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 nsAnnoProtocolHandler_h___ michael@0: #define nsAnnoProtocolHandler_h___ michael@0: michael@0: #include "nsCOMPtr.h" michael@0: #include "nsIProtocolHandler.h" michael@0: #include "nsIURI.h" michael@0: #include "nsString.h" michael@0: #include "nsWeakReference.h" michael@0: #include "mozilla/Attributes.h" michael@0: michael@0: // {e8b8bdb7-c96c-4d82-9c6f-2b3c585ec7ea} michael@0: #define NS_ANNOPROTOCOLHANDLER_CID \ michael@0: { 0xe8b8bdb7, 0xc96c, 0x4d82, { 0x9c, 0x6f, 0x2b, 0x3c, 0x58, 0x5e, 0xc7, 0xea } } michael@0: michael@0: class nsAnnoProtocolHandler MOZ_FINAL : public nsIProtocolHandler, public nsSupportsWeakReference michael@0: { michael@0: public: michael@0: nsAnnoProtocolHandler() {} michael@0: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIPROTOCOLHANDLER michael@0: michael@0: private: michael@0: ~nsAnnoProtocolHandler() {} michael@0: michael@0: protected: michael@0: nsresult ParseAnnoURI(nsIURI* aURI, nsIURI** aResultURI, nsCString& aName); michael@0: michael@0: /** michael@0: * Obtains a new channel to be used to get a favicon from the database. This michael@0: * method is asynchronous. michael@0: * michael@0: * @param aURI michael@0: * The URI the channel will be created for. This is the URI that is michael@0: * set as the original URI on the channel. michael@0: * @param aAnnotationURI michael@0: * The URI that holds the data needed to get the favicon from the michael@0: * database. michael@0: * @returns (via _channel) the channel that will obtain the favicon data. michael@0: */ michael@0: nsresult NewFaviconChannel(nsIURI *aURI, michael@0: nsIURI *aAnnotationURI, michael@0: nsIChannel **_channel); michael@0: }; michael@0: michael@0: #endif /* nsAnnoProtocolHandler_h___ */