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

          Line data    Source code
       1             : /*
       2             :  * DO NOT EDIT.  THIS FILE IS GENERATED FROM ../../../dist/idl/nsICryptoHash.idl
       3             :  */
       4             : 
       5             : #ifndef __gen_nsICryptoHash_h__
       6             : #define __gen_nsICryptoHash_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 nsIInputStream; /* forward declaration */
      18             : 
      19             : 
      20             : /* starting interface:    nsICryptoHash */
      21             : #define NS_ICRYPTOHASH_IID_STR "1e5b7c43-4688-45ce-92e1-77ed931e3bbe"
      22             : 
      23             : #define NS_ICRYPTOHASH_IID \
      24             :   {0x1e5b7c43, 0x4688, 0x45ce, \
      25             :     { 0x92, 0xe1, 0x77, 0xed, 0x93, 0x1e, 0x3b, 0xbe }}
      26             : 
      27          15 : class NS_NO_VTABLE nsICryptoHash : public nsISupports {
      28             :  public:
      29             : 
      30             :   NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICRYPTOHASH_IID)
      31             : 
      32             :   enum {
      33             :     MD2 = 1,
      34             :     MD5 = 2,
      35             :     SHA1 = 3,
      36             :     SHA256 = 4,
      37             :     SHA384 = 5,
      38             :     SHA512 = 6
      39             :   };
      40             : 
      41             :   /* void init (in unsigned long aAlgorithm); */
      42             :   NS_IMETHOD Init(uint32_t aAlgorithm) = 0;
      43             : 
      44             :   /* [must_use] void initWithString (in ACString aAlgorithm); */
      45             :   MOZ_MUST_USE NS_IMETHOD InitWithString(const nsACString & aAlgorithm) = 0;
      46             : 
      47             :   /* void update ([array, size_is (aLen), const] in octet aData, in unsigned long aLen); */
      48             :   NS_IMETHOD Update(const uint8_t *aData, uint32_t aLen) = 0;
      49             : 
      50             :   /* [must_use] void updateFromStream (in nsIInputStream aStream, in unsigned long aLen); */
      51             :   MOZ_MUST_USE NS_IMETHOD UpdateFromStream(nsIInputStream *aStream, uint32_t aLen) = 0;
      52             : 
      53             :   /* ACString finish (in boolean aASCII); */
      54             :   NS_IMETHOD Finish(bool aASCII, nsACString & _retval) = 0;
      55             : 
      56             : };
      57             : 
      58             :   NS_DEFINE_STATIC_IID_ACCESSOR(nsICryptoHash, NS_ICRYPTOHASH_IID)
      59             : 
      60             : /* Use this macro when declaring classes that implement this interface. */
      61             : #define NS_DECL_NSICRYPTOHASH \
      62             :   NS_IMETHOD Init(uint32_t aAlgorithm) override; \
      63             :   MOZ_MUST_USE NS_IMETHOD InitWithString(const nsACString & aAlgorithm) override; \
      64             :   NS_IMETHOD Update(const uint8_t *aData, uint32_t aLen) override; \
      65             :   MOZ_MUST_USE NS_IMETHOD UpdateFromStream(nsIInputStream *aStream, uint32_t aLen) override; \
      66             :   NS_IMETHOD Finish(bool aASCII, nsACString & _retval) override; 
      67             : 
      68             : /* Use this macro when declaring the members of this interface when the
      69             :    class doesn't implement the interface. This is useful for forwarding. */
      70             : #define NS_DECL_NON_VIRTUAL_NSICRYPTOHASH \
      71             :   nsresult Init(uint32_t aAlgorithm); \
      72             :   MOZ_MUST_USE nsresult InitWithString(const nsACString & aAlgorithm); \
      73             :   nsresult Update(const uint8_t *aData, uint32_t aLen); \
      74             :   MOZ_MUST_USE nsresult UpdateFromStream(nsIInputStream *aStream, uint32_t aLen); \
      75             :   nsresult Finish(bool aASCII, nsACString & _retval); 
      76             : 
      77             : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
      78             : #define NS_FORWARD_NSICRYPTOHASH(_to) \
      79             :   NS_IMETHOD Init(uint32_t aAlgorithm) override { return _to Init(aAlgorithm); } \
      80             :   MOZ_MUST_USE NS_IMETHOD InitWithString(const nsACString & aAlgorithm) override { return _to InitWithString(aAlgorithm); } \
      81             :   NS_IMETHOD Update(const uint8_t *aData, uint32_t aLen) override { return _to Update(aData, aLen); } \
      82             :   MOZ_MUST_USE NS_IMETHOD UpdateFromStream(nsIInputStream *aStream, uint32_t aLen) override { return _to UpdateFromStream(aStream, aLen); } \
      83             :   NS_IMETHOD Finish(bool aASCII, nsACString & _retval) override { return _to Finish(aASCII, _retval); } 
      84             : 
      85             : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
      86             : #define NS_FORWARD_SAFE_NSICRYPTOHASH(_to) \
      87             :   NS_IMETHOD Init(uint32_t aAlgorithm) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(aAlgorithm); } \
      88             :   MOZ_MUST_USE NS_IMETHOD InitWithString(const nsACString & aAlgorithm) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InitWithString(aAlgorithm); } \
      89             :   NS_IMETHOD Update(const uint8_t *aData, uint32_t aLen) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Update(aData, aLen); } \
      90             :   MOZ_MUST_USE NS_IMETHOD UpdateFromStream(nsIInputStream *aStream, uint32_t aLen) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UpdateFromStream(aStream, aLen); } \
      91             :   NS_IMETHOD Finish(bool aASCII, nsACString & _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Finish(aASCII, _retval); } 
      92             : 
      93             : #if 0
      94             : /* Use the code below as a template for the implementation class for this interface. */
      95             : 
      96             : /* Header file */
      97             : class nsCryptoHash : public nsICryptoHash
      98             : {
      99             : public:
     100             :   NS_DECL_ISUPPORTS
     101             :   NS_DECL_NSICRYPTOHASH
     102             : 
     103             :   nsCryptoHash();
     104             : 
     105             : private:
     106             :   ~nsCryptoHash();
     107             : 
     108             : protected:
     109             :   /* additional members */
     110             : };
     111             : 
     112             : /* Implementation file */
     113             : NS_IMPL_ISUPPORTS(nsCryptoHash, nsICryptoHash)
     114             : 
     115             : nsCryptoHash::nsCryptoHash()
     116             : {
     117             :   /* member initializers and constructor code */
     118             : }
     119             : 
     120             : nsCryptoHash::~nsCryptoHash()
     121             : {
     122             :   /* destructor code */
     123             : }
     124             : 
     125             : /* void init (in unsigned long aAlgorithm); */
     126             : NS_IMETHODIMP nsCryptoHash::Init(uint32_t aAlgorithm)
     127             : {
     128             :     return NS_ERROR_NOT_IMPLEMENTED;
     129             : }
     130             : 
     131             : /* [must_use] void initWithString (in ACString aAlgorithm); */
     132             : MOZ_MUST_USE NS_IMETHODIMP nsCryptoHash::InitWithString(const nsACString & aAlgorithm)
     133             : {
     134             :     return NS_ERROR_NOT_IMPLEMENTED;
     135             : }
     136             : 
     137             : /* void update ([array, size_is (aLen), const] in octet aData, in unsigned long aLen); */
     138             : NS_IMETHODIMP nsCryptoHash::Update(const uint8_t *aData, uint32_t aLen)
     139             : {
     140             :     return NS_ERROR_NOT_IMPLEMENTED;
     141             : }
     142             : 
     143             : /* [must_use] void updateFromStream (in nsIInputStream aStream, in unsigned long aLen); */
     144             : MOZ_MUST_USE NS_IMETHODIMP nsCryptoHash::UpdateFromStream(nsIInputStream *aStream, uint32_t aLen)
     145             : {
     146             :     return NS_ERROR_NOT_IMPLEMENTED;
     147             : }
     148             : 
     149             : /* ACString finish (in boolean aASCII); */
     150             : NS_IMETHODIMP nsCryptoHash::Finish(bool aASCII, nsACString & _retval)
     151             : {
     152             :     return NS_ERROR_NOT_IMPLEMENTED;
     153             : }
     154             : 
     155             : /* End of implementation class template. */
     156             : #endif
     157             : 
     158             : 
     159             : #endif /* __gen_nsICryptoHash_h__ */

Generated by: LCOV version 1.13