1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/components/places/nsAnnoProtocolHandler.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,51 @@ 1.4 +//* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 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 nsAnnoProtocolHandler_h___ 1.10 +#define nsAnnoProtocolHandler_h___ 1.11 + 1.12 +#include "nsCOMPtr.h" 1.13 +#include "nsIProtocolHandler.h" 1.14 +#include "nsIURI.h" 1.15 +#include "nsString.h" 1.16 +#include "nsWeakReference.h" 1.17 +#include "mozilla/Attributes.h" 1.18 + 1.19 +// {e8b8bdb7-c96c-4d82-9c6f-2b3c585ec7ea} 1.20 +#define NS_ANNOPROTOCOLHANDLER_CID \ 1.21 +{ 0xe8b8bdb7, 0xc96c, 0x4d82, { 0x9c, 0x6f, 0x2b, 0x3c, 0x58, 0x5e, 0xc7, 0xea } } 1.22 + 1.23 +class nsAnnoProtocolHandler MOZ_FINAL : public nsIProtocolHandler, public nsSupportsWeakReference 1.24 +{ 1.25 +public: 1.26 + nsAnnoProtocolHandler() {} 1.27 + 1.28 + NS_DECL_ISUPPORTS 1.29 + NS_DECL_NSIPROTOCOLHANDLER 1.30 + 1.31 +private: 1.32 + ~nsAnnoProtocolHandler() {} 1.33 + 1.34 +protected: 1.35 + nsresult ParseAnnoURI(nsIURI* aURI, nsIURI** aResultURI, nsCString& aName); 1.36 + 1.37 + /** 1.38 + * Obtains a new channel to be used to get a favicon from the database. This 1.39 + * method is asynchronous. 1.40 + * 1.41 + * @param aURI 1.42 + * The URI the channel will be created for. This is the URI that is 1.43 + * set as the original URI on the channel. 1.44 + * @param aAnnotationURI 1.45 + * The URI that holds the data needed to get the favicon from the 1.46 + * database. 1.47 + * @returns (via _channel) the channel that will obtain the favicon data. 1.48 + */ 1.49 + nsresult NewFaviconChannel(nsIURI *aURI, 1.50 + nsIURI *aAnnotationURI, 1.51 + nsIChannel **_channel); 1.52 +}; 1.53 + 1.54 +#endif /* nsAnnoProtocolHandler_h___ */