LCOV - code coverage report
Current view: directory - objdir/dist/include - nsIOutputStream.h (source / functions) Found Hit Coverage
Test: app.info Lines: 1 1 100.0 %
Date: 2012-06-02 Functions: 1 1 100.0 %

       1                 : /*
       2                 :  * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/xpcom/io/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                 :  * @return NS_OK and (*aReadCount > 0) if successfully provided some data
      35                 :  * @return NS_OK and (*aReadCount = 0) or
      36                 :  * @return <any-error> if not interested in providing any data
      37                 :  *
      38                 :  * Errors are never passed to the caller of WriteSegments.
      39                 :  */
      40                 : typedef NS_CALLBACK(nsReadSegmentFun)(nsIOutputStream *aOutStream,
      41                 :                                       void *aClosure,
      42                 :                                       char *aToSegment,
      43                 :                                       PRUint32 aFromOffset,
      44                 :                                       PRUint32 aCount,
      45                 :                                       PRUint32 *aReadCount);
      46                 : 
      47                 : /* starting interface:    nsIOutputStream */
      48                 : #define NS_IOUTPUTSTREAM_IID_STR "0d0acd2a-61b4-11d4-9877-00c04fa0cf4a"
      49                 : 
      50                 : #define NS_IOUTPUTSTREAM_IID \
      51                 :   {0x0d0acd2a, 0x61b4, 0x11d4, \
      52                 :     { 0x98, 0x77, 0x00, 0xc0, 0x4f, 0xa0, 0xcf, 0x4a }}
      53                 : 
      54           54731 : class NS_NO_VTABLE NS_SCRIPTABLE nsIOutputStream : public nsISupports {
      55                 :  public: 
      56                 : 
      57                 :   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IOUTPUTSTREAM_IID)
      58                 : 
      59                 :   /* void close (); */
      60                 :   NS_SCRIPTABLE NS_IMETHOD Close(void) = 0;
      61                 : 
      62                 :   /* void flush (); */
      63                 :   NS_SCRIPTABLE NS_IMETHOD Flush(void) = 0;
      64                 : 
      65                 :   /* unsigned long write (in string aBuf, in unsigned long aCount); */
      66                 :   NS_SCRIPTABLE NS_IMETHOD Write(const char * aBuf, PRUint32 aCount, PRUint32 *_retval NS_OUTPARAM) = 0;
      67                 : 
      68                 :   /* unsigned long writeFrom (in nsIInputStream aFromStream, in unsigned long aCount); */
      69                 :   NS_SCRIPTABLE NS_IMETHOD WriteFrom(nsIInputStream *aFromStream, PRUint32 aCount, PRUint32 *_retval NS_OUTPARAM) = 0;
      70                 : 
      71                 :   /* [noscript] unsigned long writeSegments (in nsReadSegmentFun aReader, in voidPtr aClosure, in unsigned long aCount); */
      72                 :   NS_IMETHOD WriteSegments(nsReadSegmentFun aReader, void *aClosure, PRUint32 aCount, PRUint32 *_retval NS_OUTPARAM) = 0;
      73                 : 
      74                 :   /* boolean isNonBlocking (); */
      75                 :   NS_SCRIPTABLE NS_IMETHOD IsNonBlocking(bool *_retval NS_OUTPARAM) = 0;
      76                 : 
      77                 : };
      78                 : 
      79                 :   NS_DEFINE_STATIC_IID_ACCESSOR(nsIOutputStream, NS_IOUTPUTSTREAM_IID)
      80                 : 
      81                 : /* Use this macro when declaring classes that implement this interface. */
      82                 : #define NS_DECL_NSIOUTPUTSTREAM \
      83                 :   NS_SCRIPTABLE NS_IMETHOD Close(void); \
      84                 :   NS_SCRIPTABLE NS_IMETHOD Flush(void); \
      85                 :   NS_SCRIPTABLE NS_IMETHOD Write(const char * aBuf, PRUint32 aCount, PRUint32 *_retval NS_OUTPARAM); \
      86                 :   NS_SCRIPTABLE NS_IMETHOD WriteFrom(nsIInputStream *aFromStream, PRUint32 aCount, PRUint32 *_retval NS_OUTPARAM); \
      87                 :   NS_IMETHOD WriteSegments(nsReadSegmentFun aReader, void *aClosure, PRUint32 aCount, PRUint32 *_retval NS_OUTPARAM); \
      88                 :   NS_SCRIPTABLE NS_IMETHOD IsNonBlocking(bool *_retval NS_OUTPARAM); 
      89                 : 
      90                 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
      91                 : #define NS_FORWARD_NSIOUTPUTSTREAM(_to) \
      92                 :   NS_SCRIPTABLE NS_IMETHOD Close(void) { return _to Close(); } \
      93                 :   NS_SCRIPTABLE NS_IMETHOD Flush(void) { return _to Flush(); } \
      94                 :   NS_SCRIPTABLE NS_IMETHOD Write(const char * aBuf, PRUint32 aCount, PRUint32 *_retval NS_OUTPARAM) { return _to Write(aBuf, aCount, _retval); } \
      95                 :   NS_SCRIPTABLE NS_IMETHOD WriteFrom(nsIInputStream *aFromStream, PRUint32 aCount, PRUint32 *_retval NS_OUTPARAM) { return _to WriteFrom(aFromStream, aCount, _retval); } \
      96                 :   NS_IMETHOD WriteSegments(nsReadSegmentFun aReader, void *aClosure, PRUint32 aCount, PRUint32 *_retval NS_OUTPARAM) { return _to WriteSegments(aReader, aClosure, aCount, _retval); } \
      97                 :   NS_SCRIPTABLE NS_IMETHOD IsNonBlocking(bool *_retval NS_OUTPARAM) { return _to IsNonBlocking(_retval); } 
      98                 : 
      99                 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
     100                 : #define NS_FORWARD_SAFE_NSIOUTPUTSTREAM(_to) \
     101                 :   NS_SCRIPTABLE NS_IMETHOD Close(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); } \
     102                 :   NS_SCRIPTABLE NS_IMETHOD Flush(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Flush(); } \
     103                 :   NS_SCRIPTABLE NS_IMETHOD Write(const char * aBuf, PRUint32 aCount, PRUint32 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Write(aBuf, aCount, _retval); } \
     104                 :   NS_SCRIPTABLE NS_IMETHOD WriteFrom(nsIInputStream *aFromStream, PRUint32 aCount, PRUint32 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteFrom(aFromStream, aCount, _retval); } \
     105                 :   NS_IMETHOD WriteSegments(nsReadSegmentFun aReader, void *aClosure, PRUint32 aCount, PRUint32 *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteSegments(aReader, aClosure, aCount, _retval); } \
     106                 :   NS_SCRIPTABLE NS_IMETHOD IsNonBlocking(bool *_retval NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsNonBlocking(_retval); } 
     107                 : 
     108                 : #if 0
     109                 : /* Use the code below as a template for the implementation class for this interface. */
     110                 : 
     111                 : /* Header file */
     112                 : class nsOutputStream : public nsIOutputStream
     113                 : {
     114                 : public:
     115                 :   NS_DECL_ISUPPORTS
     116                 :   NS_DECL_NSIOUTPUTSTREAM
     117                 : 
     118                 :   nsOutputStream();
     119                 : 
     120                 : private:
     121                 :   ~nsOutputStream();
     122                 : 
     123                 : protected:
     124                 :   /* additional members */
     125                 : };
     126                 : 
     127                 : /* Implementation file */
     128                 : NS_IMPL_ISUPPORTS1(nsOutputStream, nsIOutputStream)
     129                 : 
     130                 : nsOutputStream::nsOutputStream()
     131                 : {
     132                 :   /* member initializers and constructor code */
     133                 : }
     134                 : 
     135                 : nsOutputStream::~nsOutputStream()
     136                 : {
     137                 :   /* destructor code */
     138                 : }
     139                 : 
     140                 : /* void close (); */
     141                 : NS_IMETHODIMP nsOutputStream::Close()
     142                 : {
     143                 :     return NS_ERROR_NOT_IMPLEMENTED;
     144                 : }
     145                 : 
     146                 : /* void flush (); */
     147                 : NS_IMETHODIMP nsOutputStream::Flush()
     148                 : {
     149                 :     return NS_ERROR_NOT_IMPLEMENTED;
     150                 : }
     151                 : 
     152                 : /* unsigned long write (in string aBuf, in unsigned long aCount); */
     153                 : NS_IMETHODIMP nsOutputStream::Write(const char * aBuf, PRUint32 aCount, PRUint32 *_retval NS_OUTPARAM)
     154                 : {
     155                 :     return NS_ERROR_NOT_IMPLEMENTED;
     156                 : }
     157                 : 
     158                 : /* unsigned long writeFrom (in nsIInputStream aFromStream, in unsigned long aCount); */
     159                 : NS_IMETHODIMP nsOutputStream::WriteFrom(nsIInputStream *aFromStream, PRUint32 aCount, PRUint32 *_retval NS_OUTPARAM)
     160                 : {
     161                 :     return NS_ERROR_NOT_IMPLEMENTED;
     162                 : }
     163                 : 
     164                 : /* [noscript] unsigned long writeSegments (in nsReadSegmentFun aReader, in voidPtr aClosure, in unsigned long aCount); */
     165                 : NS_IMETHODIMP nsOutputStream::WriteSegments(nsReadSegmentFun aReader, void *aClosure, PRUint32 aCount, PRUint32 *_retval NS_OUTPARAM)
     166                 : {
     167                 :     return NS_ERROR_NOT_IMPLEMENTED;
     168                 : }
     169                 : 
     170                 : /* boolean isNonBlocking (); */
     171                 : NS_IMETHODIMP nsOutputStream::IsNonBlocking(bool *_retval NS_OUTPARAM)
     172                 : {
     173                 :     return NS_ERROR_NOT_IMPLEMENTED;
     174                 : }
     175                 : 
     176                 : /* End of implementation class template. */
     177                 : #endif
     178                 : 
     179                 : 
     180                 : #endif /* __gen_nsIOutputStream_h__ */

Generated by: LCOV version 1.7