LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/dist/include - nsIFaviconService.h (source / functions) Hit Total Coverage
Test: output.info Lines: 1 2 50.0 %
Date: 2017-07-14 16:53:18 Functions: 1 2 50.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * DO NOT EDIT.  THIS FILE IS GENERATED FROM ../../../dist/idl/nsIFaviconService.idl
       3             :  */
       4             : 
       5             : #ifndef __gen_nsIFaviconService_h__
       6             : #define __gen_nsIFaviconService_h__
       7             : 
       8             : 
       9             : #ifndef __gen_nsISupports_h__
      10             : #include "nsISupports.h"
      11             : #endif
      12             : 
      13             : /* For IDL files that don't want to include root IDL files. */
      14             : #ifndef NS_NO_VTABLE
      15             : #define NS_NO_VTABLE
      16             : #endif
      17             : class nsIURI; /* forward declaration */
      18             : 
      19             : 
      20             : /* starting interface:    nsIFaviconService */
      21             : #define NS_IFAVICONSERVICE_IID_STR "e81e0b0c-b9f1-4c2e-8f3c-b809933cf73c"
      22             : 
      23             : #define NS_IFAVICONSERVICE_IID \
      24             :   {0xe81e0b0c, 0xb9f1, 0x4c2e, \
      25             :     { 0x8f, 0x3c, 0xb8, 0x09, 0x93, 0x3c, 0xf7, 0x3c }}
      26             : 
      27           1 : class NS_NO_VTABLE nsIFaviconService : public nsISupports {
      28             :  public:
      29             : 
      30             :   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IFAVICONSERVICE_IID)
      31             : 
      32             :   enum {
      33             :     FAVICON_LOAD_PRIVATE = 1U,
      34             :     FAVICON_LOAD_NON_PRIVATE = 2U,
      35             :     MAX_FAVICON_BUFFER_SIZE = 65536U
      36             :   };
      37             : 
      38             :   /* nsIURI getFaviconLinkForIcon (in nsIURI aFaviconURI); */
      39             :   NS_IMETHOD GetFaviconLinkForIcon(nsIURI *aFaviconURI, nsIURI * *_retval) = 0;
      40             : 
      41             :   /* void expireAllFavicons (); */
      42             :   NS_IMETHOD ExpireAllFavicons(void) = 0;
      43             : 
      44             :   /* unsigned short preferredSizeFromURI (in nsIURI aURI); */
      45             :   NS_IMETHOD PreferredSizeFromURI(nsIURI *aURI, uint16_t *_retval) = 0;
      46             : 
      47             :   /* void addFailedFavicon (in nsIURI aFaviconURI); */
      48             :   NS_IMETHOD AddFailedFavicon(nsIURI *aFaviconURI) = 0;
      49             : 
      50             :   /* void removeFailedFavicon (in nsIURI aFaviconURI); */
      51             :   NS_IMETHOD RemoveFailedFavicon(nsIURI *aFaviconURI) = 0;
      52             : 
      53             :   /* boolean isFailedFavicon (in nsIURI aFaviconURI); */
      54             :   NS_IMETHOD IsFailedFavicon(nsIURI *aFaviconURI, bool *_retval) = 0;
      55             : 
      56             :   /* readonly attribute nsIURI defaultFavicon; */
      57             :   NS_IMETHOD GetDefaultFavicon(nsIURI * *aDefaultFavicon) = 0;
      58             : 
      59             :   /* readonly attribute AUTF8String defaultFaviconMimeType; */
      60             :   NS_IMETHOD GetDefaultFaviconMimeType(nsACString & aDefaultFaviconMimeType) = 0;
      61             : 
      62             : };
      63             : 
      64             :   NS_DEFINE_STATIC_IID_ACCESSOR(nsIFaviconService, NS_IFAVICONSERVICE_IID)
      65             : 
      66             : /* Use this macro when declaring classes that implement this interface. */
      67             : #define NS_DECL_NSIFAVICONSERVICE \
      68             :   NS_IMETHOD GetFaviconLinkForIcon(nsIURI *aFaviconURI, nsIURI * *_retval) override; \
      69             :   NS_IMETHOD ExpireAllFavicons(void) override; \
      70             :   NS_IMETHOD PreferredSizeFromURI(nsIURI *aURI, uint16_t *_retval) override; \
      71             :   NS_IMETHOD AddFailedFavicon(nsIURI *aFaviconURI) override; \
      72             :   NS_IMETHOD RemoveFailedFavicon(nsIURI *aFaviconURI) override; \
      73             :   NS_IMETHOD IsFailedFavicon(nsIURI *aFaviconURI, bool *_retval) override; \
      74             :   NS_IMETHOD GetDefaultFavicon(nsIURI * *aDefaultFavicon) override; \
      75             :   NS_IMETHOD GetDefaultFaviconMimeType(nsACString & aDefaultFaviconMimeType) override; 
      76             : 
      77             : /* Use this macro when declaring the members of this interface when the
      78             :    class doesn't implement the interface. This is useful for forwarding. */
      79             : #define NS_DECL_NON_VIRTUAL_NSIFAVICONSERVICE \
      80             :   nsresult GetFaviconLinkForIcon(nsIURI *aFaviconURI, nsIURI * *_retval); \
      81             :   nsresult ExpireAllFavicons(void); \
      82             :   nsresult PreferredSizeFromURI(nsIURI *aURI, uint16_t *_retval); \
      83             :   nsresult AddFailedFavicon(nsIURI *aFaviconURI); \
      84             :   nsresult RemoveFailedFavicon(nsIURI *aFaviconURI); \
      85             :   nsresult IsFailedFavicon(nsIURI *aFaviconURI, bool *_retval); \
      86             :   nsresult GetDefaultFavicon(nsIURI * *aDefaultFavicon); \
      87             :   nsresult GetDefaultFaviconMimeType(nsACString & aDefaultFaviconMimeType); 
      88             : 
      89             : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
      90             : #define NS_FORWARD_NSIFAVICONSERVICE(_to) \
      91             :   NS_IMETHOD GetFaviconLinkForIcon(nsIURI *aFaviconURI, nsIURI * *_retval) override { return _to GetFaviconLinkForIcon(aFaviconURI, _retval); } \
      92             :   NS_IMETHOD ExpireAllFavicons(void) override { return _to ExpireAllFavicons(); } \
      93             :   NS_IMETHOD PreferredSizeFromURI(nsIURI *aURI, uint16_t *_retval) override { return _to PreferredSizeFromURI(aURI, _retval); } \
      94             :   NS_IMETHOD AddFailedFavicon(nsIURI *aFaviconURI) override { return _to AddFailedFavicon(aFaviconURI); } \
      95             :   NS_IMETHOD RemoveFailedFavicon(nsIURI *aFaviconURI) override { return _to RemoveFailedFavicon(aFaviconURI); } \
      96             :   NS_IMETHOD IsFailedFavicon(nsIURI *aFaviconURI, bool *_retval) override { return _to IsFailedFavicon(aFaviconURI, _retval); } \
      97             :   NS_IMETHOD GetDefaultFavicon(nsIURI * *aDefaultFavicon) override { return _to GetDefaultFavicon(aDefaultFavicon); } \
      98             :   NS_IMETHOD GetDefaultFaviconMimeType(nsACString & aDefaultFaviconMimeType) override { return _to GetDefaultFaviconMimeType(aDefaultFaviconMimeType); } 
      99             : 
     100             : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
     101             : #define NS_FORWARD_SAFE_NSIFAVICONSERVICE(_to) \
     102             :   NS_IMETHOD GetFaviconLinkForIcon(nsIURI *aFaviconURI, nsIURI * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFaviconLinkForIcon(aFaviconURI, _retval); } \
     103             :   NS_IMETHOD ExpireAllFavicons(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ExpireAllFavicons(); } \
     104             :   NS_IMETHOD PreferredSizeFromURI(nsIURI *aURI, uint16_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->PreferredSizeFromURI(aURI, _retval); } \
     105             :   NS_IMETHOD AddFailedFavicon(nsIURI *aFaviconURI) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AddFailedFavicon(aFaviconURI); } \
     106             :   NS_IMETHOD RemoveFailedFavicon(nsIURI *aFaviconURI) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveFailedFavicon(aFaviconURI); } \
     107             :   NS_IMETHOD IsFailedFavicon(nsIURI *aFaviconURI, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsFailedFavicon(aFaviconURI, _retval); } \
     108             :   NS_IMETHOD GetDefaultFavicon(nsIURI * *aDefaultFavicon) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultFavicon(aDefaultFavicon); } \
     109             :   NS_IMETHOD GetDefaultFaviconMimeType(nsACString & aDefaultFaviconMimeType) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDefaultFaviconMimeType(aDefaultFaviconMimeType); } 
     110             : 
     111             : #if 0
     112             : /* Use the code below as a template for the implementation class for this interface. */
     113             : 
     114             : /* Header file */
     115             : class nsFaviconService : public nsIFaviconService
     116             : {
     117             : public:
     118             :   NS_DECL_ISUPPORTS
     119             :   NS_DECL_NSIFAVICONSERVICE
     120             : 
     121             :   nsFaviconService();
     122             : 
     123             : private:
     124             :   ~nsFaviconService();
     125             : 
     126             : protected:
     127             :   /* additional members */
     128             : };
     129             : 
     130             : /* Implementation file */
     131             : NS_IMPL_ISUPPORTS(nsFaviconService, nsIFaviconService)
     132             : 
     133             : nsFaviconService::nsFaviconService()
     134             : {
     135             :   /* member initializers and constructor code */
     136             : }
     137             : 
     138             : nsFaviconService::~nsFaviconService()
     139             : {
     140             :   /* destructor code */
     141             : }
     142             : 
     143             : /* nsIURI getFaviconLinkForIcon (in nsIURI aFaviconURI); */
     144             : NS_IMETHODIMP nsFaviconService::GetFaviconLinkForIcon(nsIURI *aFaviconURI, nsIURI * *_retval)
     145             : {
     146             :     return NS_ERROR_NOT_IMPLEMENTED;
     147             : }
     148             : 
     149             : /* void expireAllFavicons (); */
     150             : NS_IMETHODIMP nsFaviconService::ExpireAllFavicons()
     151             : {
     152             :     return NS_ERROR_NOT_IMPLEMENTED;
     153             : }
     154             : 
     155             : /* unsigned short preferredSizeFromURI (in nsIURI aURI); */
     156             : NS_IMETHODIMP nsFaviconService::PreferredSizeFromURI(nsIURI *aURI, uint16_t *_retval)
     157             : {
     158             :     return NS_ERROR_NOT_IMPLEMENTED;
     159             : }
     160             : 
     161             : /* void addFailedFavicon (in nsIURI aFaviconURI); */
     162             : NS_IMETHODIMP nsFaviconService::AddFailedFavicon(nsIURI *aFaviconURI)
     163             : {
     164             :     return NS_ERROR_NOT_IMPLEMENTED;
     165             : }
     166             : 
     167             : /* void removeFailedFavicon (in nsIURI aFaviconURI); */
     168             : NS_IMETHODIMP nsFaviconService::RemoveFailedFavicon(nsIURI *aFaviconURI)
     169             : {
     170             :     return NS_ERROR_NOT_IMPLEMENTED;
     171             : }
     172             : 
     173             : /* boolean isFailedFavicon (in nsIURI aFaviconURI); */
     174             : NS_IMETHODIMP nsFaviconService::IsFailedFavicon(nsIURI *aFaviconURI, bool *_retval)
     175             : {
     176             :     return NS_ERROR_NOT_IMPLEMENTED;
     177             : }
     178             : 
     179             : /* readonly attribute nsIURI defaultFavicon; */
     180             : NS_IMETHODIMP nsFaviconService::GetDefaultFavicon(nsIURI * *aDefaultFavicon)
     181             : {
     182             :     return NS_ERROR_NOT_IMPLEMENTED;
     183             : }
     184             : 
     185             : /* readonly attribute AUTF8String defaultFaviconMimeType; */
     186             : NS_IMETHODIMP nsFaviconService::GetDefaultFaviconMimeType(nsACString & aDefaultFaviconMimeType)
     187             : {
     188             :     return NS_ERROR_NOT_IMPLEMENTED;
     189             : }
     190             : 
     191             : /* End of implementation class template. */
     192             : #endif
     193             : 
     194             : 
     195             : /* starting interface:    nsIFaviconDataCallback */
     196             : #define NS_IFAVICONDATACALLBACK_IID_STR "c85e5c82-b70f-4621-9528-beb2aa47fb44"
     197             : 
     198             : #define NS_IFAVICONDATACALLBACK_IID \
     199             :   {0xc85e5c82, 0xb70f, 0x4621, \
     200             :     { 0x95, 0x28, 0xbe, 0xb2, 0xaa, 0x47, 0xfb, 0x44 }}
     201             : 
     202           0 : class NS_NO_VTABLE nsIFaviconDataCallback : public nsISupports {
     203             :  public:
     204             : 
     205             :   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IFAVICONDATACALLBACK_IID)
     206             : 
     207             :   /* void onComplete (in nsIURI aFaviconURI, in unsigned long aDataLen, [array, size_is (aDataLen), const] in octet aData, in AUTF8String aMimeType, in unsigned short aWidth); */
     208             :   NS_IMETHOD OnComplete(nsIURI *aFaviconURI, uint32_t aDataLen, const uint8_t *aData, const nsACString & aMimeType, uint16_t aWidth) = 0;
     209             : 
     210             : };
     211             : 
     212             :   NS_DEFINE_STATIC_IID_ACCESSOR(nsIFaviconDataCallback, NS_IFAVICONDATACALLBACK_IID)
     213             : 
     214             : /* Use this macro when declaring classes that implement this interface. */
     215             : #define NS_DECL_NSIFAVICONDATACALLBACK \
     216             :   NS_IMETHOD OnComplete(nsIURI *aFaviconURI, uint32_t aDataLen, const uint8_t *aData, const nsACString & aMimeType, uint16_t aWidth) override; 
     217             : 
     218             : /* Use this macro when declaring the members of this interface when the
     219             :    class doesn't implement the interface. This is useful for forwarding. */
     220             : #define NS_DECL_NON_VIRTUAL_NSIFAVICONDATACALLBACK \
     221             :   nsresult OnComplete(nsIURI *aFaviconURI, uint32_t aDataLen, const uint8_t *aData, const nsACString & aMimeType, uint16_t aWidth); 
     222             : 
     223             : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
     224             : #define NS_FORWARD_NSIFAVICONDATACALLBACK(_to) \
     225             :   NS_IMETHOD OnComplete(nsIURI *aFaviconURI, uint32_t aDataLen, const uint8_t *aData, const nsACString & aMimeType, uint16_t aWidth) override { return _to OnComplete(aFaviconURI, aDataLen, aData, aMimeType, aWidth); } 
     226             : 
     227             : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
     228             : #define NS_FORWARD_SAFE_NSIFAVICONDATACALLBACK(_to) \
     229             :   NS_IMETHOD OnComplete(nsIURI *aFaviconURI, uint32_t aDataLen, const uint8_t *aData, const nsACString & aMimeType, uint16_t aWidth) override { return !_to ? NS_ERROR_NULL_POINTER : _to->OnComplete(aFaviconURI, aDataLen, aData, aMimeType, aWidth); } 
     230             : 
     231             : #if 0
     232             : /* Use the code below as a template for the implementation class for this interface. */
     233             : 
     234             : /* Header file */
     235             : class nsFaviconDataCallback : public nsIFaviconDataCallback
     236             : {
     237             : public:
     238             :   NS_DECL_ISUPPORTS
     239             :   NS_DECL_NSIFAVICONDATACALLBACK
     240             : 
     241             :   nsFaviconDataCallback();
     242             : 
     243             : private:
     244             :   ~nsFaviconDataCallback();
     245             : 
     246             : protected:
     247             :   /* additional members */
     248             : };
     249             : 
     250             : /* Implementation file */
     251             : NS_IMPL_ISUPPORTS(nsFaviconDataCallback, nsIFaviconDataCallback)
     252             : 
     253             : nsFaviconDataCallback::nsFaviconDataCallback()
     254             : {
     255             :   /* member initializers and constructor code */
     256             : }
     257             : 
     258             : nsFaviconDataCallback::~nsFaviconDataCallback()
     259             : {
     260             :   /* destructor code */
     261             : }
     262             : 
     263             : /* void onComplete (in nsIURI aFaviconURI, in unsigned long aDataLen, [array, size_is (aDataLen), const] in octet aData, in AUTF8String aMimeType, in unsigned short aWidth); */
     264             : NS_IMETHODIMP nsFaviconDataCallback::OnComplete(nsIURI *aFaviconURI, uint32_t aDataLen, const uint8_t *aData, const nsACString & aMimeType, uint16_t aWidth)
     265             : {
     266             :     return NS_ERROR_NOT_IMPLEMENTED;
     267             : }
     268             : 
     269             : /* End of implementation class template. */
     270             : #endif
     271             : 
     272             : 
     273             : /**
     274             :  * Notification sent when all favicons are expired.
     275             :  */
     276             : #define NS_PLACES_FAVICONS_EXPIRED_TOPIC_ID "places-favicons-expired"
     277             : #define FAVICON_DEFAULT_URL "chrome://mozapps/skin/places/defaultFavicon.svg"
     278             : #define FAVICON_DEFAULT_MIMETYPE "image/svg+xml"
     279             : #define FAVICON_ERRORPAGE_URL "chrome://global/skin/icons/warning-16.png"
     280             : 
     281             : #endif /* __gen_nsIFaviconService_h__ */

Generated by: LCOV version 1.13