LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/dist/include - nsIUnicharInputStream.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/nsIUnicharInputStream.idl
       3             :  */
       4             : 
       5             : #ifndef __gen_nsIUnicharInputStream_h__
       6             : #define __gen_nsIUnicharInputStream_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 nsIUnicharInputStream; /* forward declaration */
      18             : 
      19             : class nsIInputStream; /* forward declaration */
      20             : 
      21             : /**
      22             :  * The signature of the writer function passed to ReadSegments. This
      23             :  * is the "consumer" of data that gets read from the stream's buffer.
      24             :  *
      25             :  * @param aInStream stream being read
      26             :  * @param aClosure opaque parameter passed to ReadSegments
      27             :  * @param aFromSegment pointer to memory owned by the input stream
      28             :  * @param aToOffset amount already read (since ReadSegments was called)
      29             :  * @param aCount length of fromSegment
      30             :  * @param aWriteCount number of bytes read
      31             :  *
      32             :  * Implementers should return the following:
      33             :  *
      34             :  * @throws <any-error> if not interested in consuming any data
      35             :  *
      36             :  * Errors are never passed to the caller of ReadSegments.
      37             :  *
      38             :  * NOTE: returning NS_OK and (*aWriteCount = 0) has undefined behavior.
      39             :  */
      40             : typedef nsresult (*nsWriteUnicharSegmentFun)(nsIUnicharInputStream *aInStream,
      41             :                                              void *aClosure,
      42             :                                              const char16_t *aFromSegment,
      43             :                                              uint32_t aToOffset,
      44             :                                              uint32_t aCount,
      45             :                                              uint32_t *aWriteCount);
      46             : 
      47             : /* starting interface:    nsIUnicharInputStream */
      48             : #define NS_IUNICHARINPUTSTREAM_IID_STR "d5e3bd80-6723-4b92-b0c9-22f6162fd94f"
      49             : 
      50             : #define NS_IUNICHARINPUTSTREAM_IID \
      51             :   {0xd5e3bd80, 0x6723, 0x4b92, \
      52             :     { 0xb0, 0xc9, 0x22, 0xf6, 0x16, 0x2f, 0xd9, 0x4f }}
      53             : 
      54          24 : class NS_NO_VTABLE nsIUnicharInputStream : public nsISupports {
      55             :  public:
      56             : 
      57             :   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IUNICHARINPUTSTREAM_IID)
      58             : 
      59             :   /* [noscript] unsigned long read ([array, size_is (aCount)] in char16_t aBuf, in unsigned long aCount); */
      60             :   NS_IMETHOD Read(char16_t *aBuf, uint32_t aCount, uint32_t *_retval) = 0;
      61             : 
      62             :   /* [noscript] unsigned long readSegments (in nsWriteUnicharSegmentFun aWriter, in voidPtr aClosure, in unsigned long aCount); */
      63             :   NS_IMETHOD ReadSegments(nsWriteUnicharSegmentFun aWriter, void *aClosure, uint32_t aCount, uint32_t *_retval) = 0;
      64             : 
      65             :   /* unsigned long readString (in unsigned long aCount, out AString aString); */
      66             :   NS_IMETHOD ReadString(uint32_t aCount, nsAString & aString, uint32_t *_retval) = 0;
      67             : 
      68             :   /* void close (); */
      69             :   NS_IMETHOD Close(void) = 0;
      70             : 
      71             : };
      72             : 
      73             :   NS_DEFINE_STATIC_IID_ACCESSOR(nsIUnicharInputStream, NS_IUNICHARINPUTSTREAM_IID)
      74             : 
      75             : /* Use this macro when declaring classes that implement this interface. */
      76             : #define NS_DECL_NSIUNICHARINPUTSTREAM \
      77             :   NS_IMETHOD Read(char16_t *aBuf, uint32_t aCount, uint32_t *_retval) override; \
      78             :   NS_IMETHOD ReadSegments(nsWriteUnicharSegmentFun aWriter, void *aClosure, uint32_t aCount, uint32_t *_retval) override; \
      79             :   NS_IMETHOD ReadString(uint32_t aCount, nsAString & aString, uint32_t *_retval) override; \
      80             :   NS_IMETHOD Close(void) override; 
      81             : 
      82             : /* Use this macro when declaring the members of this interface when the
      83             :    class doesn't implement the interface. This is useful for forwarding. */
      84             : #define NS_DECL_NON_VIRTUAL_NSIUNICHARINPUTSTREAM \
      85             :   nsresult Read(char16_t *aBuf, uint32_t aCount, uint32_t *_retval); \
      86             :   nsresult ReadSegments(nsWriteUnicharSegmentFun aWriter, void *aClosure, uint32_t aCount, uint32_t *_retval); \
      87             :   nsresult ReadString(uint32_t aCount, nsAString & aString, uint32_t *_retval); \
      88             :   nsresult Close(void); 
      89             : 
      90             : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
      91             : #define NS_FORWARD_NSIUNICHARINPUTSTREAM(_to) \
      92             :   NS_IMETHOD Read(char16_t *aBuf, uint32_t aCount, uint32_t *_retval) override { return _to Read(aBuf, aCount, _retval); } \
      93             :   NS_IMETHOD ReadSegments(nsWriteUnicharSegmentFun aWriter, void *aClosure, uint32_t aCount, uint32_t *_retval) override { return _to ReadSegments(aWriter, aClosure, aCount, _retval); } \
      94             :   NS_IMETHOD ReadString(uint32_t aCount, nsAString & aString, uint32_t *_retval) override { return _to ReadString(aCount, aString, _retval); } \
      95             :   NS_IMETHOD Close(void) override { return _to Close(); } 
      96             : 
      97             : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
      98             : #define NS_FORWARD_SAFE_NSIUNICHARINPUTSTREAM(_to) \
      99             :   NS_IMETHOD Read(char16_t *aBuf, uint32_t aCount, uint32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Read(aBuf, aCount, _retval); } \
     100             :   NS_IMETHOD ReadSegments(nsWriteUnicharSegmentFun aWriter, void *aClosure, uint32_t aCount, uint32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ReadSegments(aWriter, aClosure, aCount, _retval); } \
     101             :   NS_IMETHOD ReadString(uint32_t aCount, nsAString & aString, uint32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ReadString(aCount, aString, _retval); } \
     102             :   NS_IMETHOD Close(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); } 
     103             : 
     104             : #if 0
     105             : /* Use the code below as a template for the implementation class for this interface. */
     106             : 
     107             : /* Header file */
     108             : class nsUnicharInputStream : public nsIUnicharInputStream
     109             : {
     110             : public:
     111             :   NS_DECL_ISUPPORTS
     112             :   NS_DECL_NSIUNICHARINPUTSTREAM
     113             : 
     114             :   nsUnicharInputStream();
     115             : 
     116             : private:
     117             :   ~nsUnicharInputStream();
     118             : 
     119             : protected:
     120             :   /* additional members */
     121             : };
     122             : 
     123             : /* Implementation file */
     124             : NS_IMPL_ISUPPORTS(nsUnicharInputStream, nsIUnicharInputStream)
     125             : 
     126             : nsUnicharInputStream::nsUnicharInputStream()
     127             : {
     128             :   /* member initializers and constructor code */
     129             : }
     130             : 
     131             : nsUnicharInputStream::~nsUnicharInputStream()
     132             : {
     133             :   /* destructor code */
     134             : }
     135             : 
     136             : /* [noscript] unsigned long read ([array, size_is (aCount)] in char16_t aBuf, in unsigned long aCount); */
     137             : NS_IMETHODIMP nsUnicharInputStream::Read(char16_t *aBuf, uint32_t aCount, uint32_t *_retval)
     138             : {
     139             :     return NS_ERROR_NOT_IMPLEMENTED;
     140             : }
     141             : 
     142             : /* [noscript] unsigned long readSegments (in nsWriteUnicharSegmentFun aWriter, in voidPtr aClosure, in unsigned long aCount); */
     143             : NS_IMETHODIMP nsUnicharInputStream::ReadSegments(nsWriteUnicharSegmentFun aWriter, void *aClosure, uint32_t aCount, uint32_t *_retval)
     144             : {
     145             :     return NS_ERROR_NOT_IMPLEMENTED;
     146             : }
     147             : 
     148             : /* unsigned long readString (in unsigned long aCount, out AString aString); */
     149             : NS_IMETHODIMP nsUnicharInputStream::ReadString(uint32_t aCount, nsAString & aString, uint32_t *_retval)
     150             : {
     151             :     return NS_ERROR_NOT_IMPLEMENTED;
     152             : }
     153             : 
     154             : /* void close (); */
     155             : NS_IMETHODIMP nsUnicharInputStream::Close()
     156             : {
     157             :     return NS_ERROR_NOT_IMPLEMENTED;
     158             : }
     159             : 
     160             : /* End of implementation class template. */
     161             : #endif
     162             : 
     163             : 
     164             : #endif /* __gen_nsIUnicharInputStream_h__ */

Generated by: LCOV version 1.13