LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/dist/include - nsIOutputStream.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/nsIOutputStream.idl
       3             :  */
       4             : 
       5             : #ifndef __gen_nsIOutputStream_h__
       6             : #define __gen_nsIOutputStream_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 nsIOutputStream; /* forward declaration */
      18             : 
      19             : class nsIInputStream; /* forward declaration */
      20             : 
      21             : /**
      22             :  * The signature for the reader function passed to WriteSegments. This 
      23             :  * is the "provider" of data that gets written into the stream's buffer.
      24             :  *
      25             :  * @param aOutStream stream being written to
      26             :  * @param aClosure opaque parameter passed to WriteSegments
      27             :  * @param aToSegment pointer to memory owned by the output stream
      28             :  * @param aFromOffset amount already written (since WriteSegments was called)
      29             :  * @param aCount length of toSegment
      30             :  * @param aReadCount number of bytes written
      31             :  *
      32             :  * Implementers should return the following:
      33             :  *
      34             :  * @throws <any-error> if not interested in providing any data
      35             :  *
      36             :  * Errors are never passed to the caller of WriteSegments.
      37             :  */
      38             : typedef nsresult (*nsReadSegmentFun)(nsIOutputStream *aOutStream,
      39             :                                      void *aClosure,
      40             :                                      char *aToSegment,
      41             :                                      uint32_t aFromOffset,
      42             :                                      uint32_t aCount,
      43             :                                      uint32_t *aReadCount);
      44             : 
      45             : /* starting interface:    nsIOutputStream */
      46             : #define NS_IOUTPUTSTREAM_IID_STR "0d0acd2a-61b4-11d4-9877-00c04fa0cf4a"
      47             : 
      48             : #define NS_IOUTPUTSTREAM_IID \
      49             :   {0x0d0acd2a, 0x61b4, 0x11d4, \
      50             :     { 0x98, 0x77, 0x00, 0xc0, 0x4f, 0xa0, 0xcf, 0x4a }}
      51             : 
      52         113 : class NS_NO_VTABLE nsIOutputStream : public nsISupports {
      53             :  public:
      54             : 
      55             :   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IOUTPUTSTREAM_IID)
      56             : 
      57             :   /* void close (); */
      58             :   NS_IMETHOD Close(void) = 0;
      59             : 
      60             :   /* void flush (); */
      61             :   NS_IMETHOD Flush(void) = 0;
      62             : 
      63             :   /* unsigned long write (in string aBuf, in unsigned long aCount); */
      64             :   NS_IMETHOD Write(const char * aBuf, uint32_t aCount, uint32_t *_retval) = 0;
      65             : 
      66             :   /* unsigned long writeFrom (in nsIInputStream aFromStream, in unsigned long aCount); */
      67             :   NS_IMETHOD WriteFrom(nsIInputStream *aFromStream, uint32_t aCount, uint32_t *_retval) = 0;
      68             : 
      69             :   /* [noscript] unsigned long writeSegments (in nsReadSegmentFun aReader, in voidPtr aClosure, in unsigned long aCount); */
      70             :   NS_IMETHOD WriteSegments(nsReadSegmentFun aReader, void *aClosure, uint32_t aCount, uint32_t *_retval) = 0;
      71             : 
      72             :   /* boolean isNonBlocking (); */
      73             :   NS_IMETHOD IsNonBlocking(bool *_retval) = 0;
      74             : 
      75             : };
      76             : 
      77             :   NS_DEFINE_STATIC_IID_ACCESSOR(nsIOutputStream, NS_IOUTPUTSTREAM_IID)
      78             : 
      79             : /* Use this macro when declaring classes that implement this interface. */
      80             : #define NS_DECL_NSIOUTPUTSTREAM \
      81             :   NS_IMETHOD Close(void) override; \
      82             :   NS_IMETHOD Flush(void) override; \
      83             :   NS_IMETHOD Write(const char * aBuf, uint32_t aCount, uint32_t *_retval) override; \
      84             :   NS_IMETHOD WriteFrom(nsIInputStream *aFromStream, uint32_t aCount, uint32_t *_retval) override; \
      85             :   NS_IMETHOD WriteSegments(nsReadSegmentFun aReader, void *aClosure, uint32_t aCount, uint32_t *_retval) override; \
      86             :   NS_IMETHOD IsNonBlocking(bool *_retval) override; 
      87             : 
      88             : /* Use this macro when declaring the members of this interface when the
      89             :    class doesn't implement the interface. This is useful for forwarding. */
      90             : #define NS_DECL_NON_VIRTUAL_NSIOUTPUTSTREAM \
      91             :   nsresult Close(void); \
      92             :   nsresult Flush(void); \
      93             :   nsresult Write(const char * aBuf, uint32_t aCount, uint32_t *_retval); \
      94             :   nsresult WriteFrom(nsIInputStream *aFromStream, uint32_t aCount, uint32_t *_retval); \
      95             :   nsresult WriteSegments(nsReadSegmentFun aReader, void *aClosure, uint32_t aCount, uint32_t *_retval); \
      96             :   nsresult IsNonBlocking(bool *_retval); 
      97             : 
      98             : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
      99             : #define NS_FORWARD_NSIOUTPUTSTREAM(_to) \
     100             :   NS_IMETHOD Close(void) override { return _to Close(); } \
     101             :   NS_IMETHOD Flush(void) override { return _to Flush(); } \
     102             :   NS_IMETHOD Write(const char * aBuf, uint32_t aCount, uint32_t *_retval) override { return _to Write(aBuf, aCount, _retval); } \
     103             :   NS_IMETHOD WriteFrom(nsIInputStream *aFromStream, uint32_t aCount, uint32_t *_retval) override { return _to WriteFrom(aFromStream, aCount, _retval); } \
     104             :   NS_IMETHOD WriteSegments(nsReadSegmentFun aReader, void *aClosure, uint32_t aCount, uint32_t *_retval) override { return _to WriteSegments(aReader, aClosure, aCount, _retval); } \
     105             :   NS_IMETHOD IsNonBlocking(bool *_retval) override { return _to IsNonBlocking(_retval); } 
     106             : 
     107             : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
     108             : #define NS_FORWARD_SAFE_NSIOUTPUTSTREAM(_to) \
     109             :   NS_IMETHOD Close(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); } \
     110             :   NS_IMETHOD Flush(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Flush(); } \
     111             :   NS_IMETHOD Write(const char * aBuf, uint32_t aCount, uint32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Write(aBuf, aCount, _retval); } \
     112             :   NS_IMETHOD WriteFrom(nsIInputStream *aFromStream, uint32_t aCount, uint32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteFrom(aFromStream, aCount, _retval); } \
     113             :   NS_IMETHOD WriteSegments(nsReadSegmentFun aReader, void *aClosure, uint32_t aCount, uint32_t *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteSegments(aReader, aClosure, aCount, _retval); } \
     114             :   NS_IMETHOD IsNonBlocking(bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->IsNonBlocking(_retval); } 
     115             : 
     116             : #if 0
     117             : /* Use the code below as a template for the implementation class for this interface. */
     118             : 
     119             : /* Header file */
     120             : class nsOutputStream : public nsIOutputStream
     121             : {
     122             : public:
     123             :   NS_DECL_ISUPPORTS
     124             :   NS_DECL_NSIOUTPUTSTREAM
     125             : 
     126             :   nsOutputStream();
     127             : 
     128             : private:
     129             :   ~nsOutputStream();
     130             : 
     131             : protected:
     132             :   /* additional members */
     133             : };
     134             : 
     135             : /* Implementation file */
     136             : NS_IMPL_ISUPPORTS(nsOutputStream, nsIOutputStream)
     137             : 
     138             : nsOutputStream::nsOutputStream()
     139             : {
     140             :   /* member initializers and constructor code */
     141             : }
     142             : 
     143             : nsOutputStream::~nsOutputStream()
     144             : {
     145             :   /* destructor code */
     146             : }
     147             : 
     148             : /* void close (); */
     149             : NS_IMETHODIMP nsOutputStream::Close()
     150             : {
     151             :     return NS_ERROR_NOT_IMPLEMENTED;
     152             : }
     153             : 
     154             : /* void flush (); */
     155             : NS_IMETHODIMP nsOutputStream::Flush()
     156             : {
     157             :     return NS_ERROR_NOT_IMPLEMENTED;
     158             : }
     159             : 
     160             : /* unsigned long write (in string aBuf, in unsigned long aCount); */
     161             : NS_IMETHODIMP nsOutputStream::Write(const char * aBuf, uint32_t aCount, uint32_t *_retval)
     162             : {
     163             :     return NS_ERROR_NOT_IMPLEMENTED;
     164             : }
     165             : 
     166             : /* unsigned long writeFrom (in nsIInputStream aFromStream, in unsigned long aCount); */
     167             : NS_IMETHODIMP nsOutputStream::WriteFrom(nsIInputStream *aFromStream, uint32_t aCount, uint32_t *_retval)
     168             : {
     169             :     return NS_ERROR_NOT_IMPLEMENTED;
     170             : }
     171             : 
     172             : /* [noscript] unsigned long writeSegments (in nsReadSegmentFun aReader, in voidPtr aClosure, in unsigned long aCount); */
     173             : NS_IMETHODIMP nsOutputStream::WriteSegments(nsReadSegmentFun aReader, void *aClosure, uint32_t aCount, uint32_t *_retval)
     174             : {
     175             :     return NS_ERROR_NOT_IMPLEMENTED;
     176             : }
     177             : 
     178             : /* boolean isNonBlocking (); */
     179             : NS_IMETHODIMP nsOutputStream::IsNonBlocking(bool *_retval)
     180             : {
     181             :     return NS_ERROR_NOT_IMPLEMENTED;
     182             : }
     183             : 
     184             : /* End of implementation class template. */
     185             : #endif
     186             : 
     187             : 
     188             : #endif /* __gen_nsIOutputStream_h__ */

Generated by: LCOV version 1.13