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

       1                 : /*
       2                 :  * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/slave/m-beta-lnx-codecoverage/build/xpcom/io/nsIPipe.idl
       3                 :  */
       4                 : 
       5                 : #ifndef __gen_nsIPipe_h__
       6                 : #define __gen_nsIPipe_h__
       7                 : 
       8                 : 
       9                 : #ifndef __gen_nsIAsyncInputStream_h__
      10                 : #include "nsIAsyncInputStream.h"
      11                 : #endif
      12                 : 
      13                 : #ifndef __gen_nsIAsyncOutputStream_h__
      14                 : #include "nsIAsyncOutputStream.h"
      15                 : #endif
      16                 : 
      17                 : /* For IDL files that don't want to include root IDL files. */
      18                 : #ifndef NS_NO_VTABLE
      19                 : #define NS_NO_VTABLE
      20                 : #endif
      21                 : class nsIMemory; /* forward declaration */
      22                 : 
      23                 : 
      24                 : /* starting interface:    nsIPipe */
      25                 : #define NS_IPIPE_IID_STR "f4211abc-61b3-11d4-9877-00c04fa0cf4a"
      26                 : 
      27                 : #define NS_IPIPE_IID \
      28                 :   {0xf4211abc, 0x61b3, 0x11d4, \
      29                 :     { 0x98, 0x77, 0x00, 0xc0, 0x4f, 0xa0, 0xcf, 0x4a }}
      30                 : 
      31           18632 : class NS_NO_VTABLE NS_SCRIPTABLE nsIPipe : public nsISupports {
      32                 :  public: 
      33                 : 
      34                 :   NS_DECLARE_STATIC_IID_ACCESSOR(NS_IPIPE_IID)
      35                 : 
      36                 :   /* void init (in boolean nonBlockingInput, in boolean nonBlockingOutput, in unsigned long segmentSize, in unsigned long segmentCount, in nsIMemory segmentAllocator); */
      37                 :   NS_SCRIPTABLE NS_IMETHOD Init(bool nonBlockingInput, bool nonBlockingOutput, PRUint32 segmentSize, PRUint32 segmentCount, nsIMemory *segmentAllocator) = 0;
      38                 : 
      39                 :   /* readonly attribute nsIAsyncInputStream inputStream; */
      40                 :   NS_SCRIPTABLE NS_IMETHOD GetInputStream(nsIAsyncInputStream * *aInputStream) = 0;
      41                 : 
      42                 :   /* readonly attribute nsIAsyncOutputStream outputStream; */
      43                 :   NS_SCRIPTABLE NS_IMETHOD GetOutputStream(nsIAsyncOutputStream * *aOutputStream) = 0;
      44                 : 
      45                 : };
      46                 : 
      47                 :   NS_DEFINE_STATIC_IID_ACCESSOR(nsIPipe, NS_IPIPE_IID)
      48                 : 
      49                 : /* Use this macro when declaring classes that implement this interface. */
      50                 : #define NS_DECL_NSIPIPE \
      51                 :   NS_SCRIPTABLE NS_IMETHOD Init(bool nonBlockingInput, bool nonBlockingOutput, PRUint32 segmentSize, PRUint32 segmentCount, nsIMemory *segmentAllocator); \
      52                 :   NS_SCRIPTABLE NS_IMETHOD GetInputStream(nsIAsyncInputStream * *aInputStream); \
      53                 :   NS_SCRIPTABLE NS_IMETHOD GetOutputStream(nsIAsyncOutputStream * *aOutputStream); 
      54                 : 
      55                 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
      56                 : #define NS_FORWARD_NSIPIPE(_to) \
      57                 :   NS_SCRIPTABLE NS_IMETHOD Init(bool nonBlockingInput, bool nonBlockingOutput, PRUint32 segmentSize, PRUint32 segmentCount, nsIMemory *segmentAllocator) { return _to Init(nonBlockingInput, nonBlockingOutput, segmentSize, segmentCount, segmentAllocator); } \
      58                 :   NS_SCRIPTABLE NS_IMETHOD GetInputStream(nsIAsyncInputStream * *aInputStream) { return _to GetInputStream(aInputStream); } \
      59                 :   NS_SCRIPTABLE NS_IMETHOD GetOutputStream(nsIAsyncOutputStream * *aOutputStream) { return _to GetOutputStream(aOutputStream); } 
      60                 : 
      61                 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
      62                 : #define NS_FORWARD_SAFE_NSIPIPE(_to) \
      63                 :   NS_SCRIPTABLE NS_IMETHOD Init(bool nonBlockingInput, bool nonBlockingOutput, PRUint32 segmentSize, PRUint32 segmentCount, nsIMemory *segmentAllocator) { return !_to ? NS_ERROR_NULL_POINTER : _to->Init(nonBlockingInput, nonBlockingOutput, segmentSize, segmentCount, segmentAllocator); } \
      64                 :   NS_SCRIPTABLE NS_IMETHOD GetInputStream(nsIAsyncInputStream * *aInputStream) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInputStream(aInputStream); } \
      65                 :   NS_SCRIPTABLE NS_IMETHOD GetOutputStream(nsIAsyncOutputStream * *aOutputStream) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOutputStream(aOutputStream); } 
      66                 : 
      67                 : #if 0
      68                 : /* Use the code below as a template for the implementation class for this interface. */
      69                 : 
      70                 : /* Header file */
      71                 : class nsPipe : public nsIPipe
      72                 : {
      73                 : public:
      74                 :   NS_DECL_ISUPPORTS
      75                 :   NS_DECL_NSIPIPE
      76                 : 
      77                 :   nsPipe();
      78                 : 
      79                 : private:
      80                 :   ~nsPipe();
      81                 : 
      82                 : protected:
      83                 :   /* additional members */
      84                 : };
      85                 : 
      86                 : /* Implementation file */
      87                 : NS_IMPL_ISUPPORTS1(nsPipe, nsIPipe)
      88                 : 
      89                 : nsPipe::nsPipe()
      90                 : {
      91                 :   /* member initializers and constructor code */
      92                 : }
      93                 : 
      94                 : nsPipe::~nsPipe()
      95                 : {
      96                 :   /* destructor code */
      97                 : }
      98                 : 
      99                 : /* void init (in boolean nonBlockingInput, in boolean nonBlockingOutput, in unsigned long segmentSize, in unsigned long segmentCount, in nsIMemory segmentAllocator); */
     100                 : NS_IMETHODIMP nsPipe::Init(bool nonBlockingInput, bool nonBlockingOutput, PRUint32 segmentSize, PRUint32 segmentCount, nsIMemory *segmentAllocator)
     101                 : {
     102                 :     return NS_ERROR_NOT_IMPLEMENTED;
     103                 : }
     104                 : 
     105                 : /* readonly attribute nsIAsyncInputStream inputStream; */
     106                 : NS_IMETHODIMP nsPipe::GetInputStream(nsIAsyncInputStream * *aInputStream)
     107                 : {
     108                 :     return NS_ERROR_NOT_IMPLEMENTED;
     109                 : }
     110                 : 
     111                 : /* readonly attribute nsIAsyncOutputStream outputStream; */
     112                 : NS_IMETHODIMP nsPipe::GetOutputStream(nsIAsyncOutputStream * *aOutputStream)
     113                 : {
     114                 :     return NS_ERROR_NOT_IMPLEMENTED;
     115                 : }
     116                 : 
     117                 : /* End of implementation class template. */
     118                 : #endif
     119                 : 
     120                 : 
     121                 : /* starting interface:    nsISearchableInputStream */
     122                 : #define NS_ISEARCHABLEINPUTSTREAM_IID_STR "8c39ef62-f7c9-11d4-98f5-001083010e9b"
     123                 : 
     124                 : #define NS_ISEARCHABLEINPUTSTREAM_IID \
     125                 :   {0x8c39ef62, 0xf7c9, 0x11d4, \
     126                 :     { 0x98, 0xf5, 0x00, 0x10, 0x83, 0x01, 0x0e, 0x9b }}
     127                 : 
     128           18632 : class NS_NO_VTABLE NS_SCRIPTABLE nsISearchableInputStream : public nsISupports {
     129                 :  public: 
     130                 : 
     131                 :   NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISEARCHABLEINPUTSTREAM_IID)
     132                 : 
     133                 :   /* void search (in string forString, in boolean ignoreCase, out boolean found, out unsigned long offsetSearchedTo); */
     134                 :   NS_SCRIPTABLE NS_IMETHOD Search(const char * forString, bool ignoreCase, bool *found NS_OUTPARAM, PRUint32 *offsetSearchedTo NS_OUTPARAM) = 0;
     135                 : 
     136                 : };
     137                 : 
     138                 :   NS_DEFINE_STATIC_IID_ACCESSOR(nsISearchableInputStream, NS_ISEARCHABLEINPUTSTREAM_IID)
     139                 : 
     140                 : /* Use this macro when declaring classes that implement this interface. */
     141                 : #define NS_DECL_NSISEARCHABLEINPUTSTREAM \
     142                 :   NS_SCRIPTABLE NS_IMETHOD Search(const char * forString, bool ignoreCase, bool *found NS_OUTPARAM, PRUint32 *offsetSearchedTo NS_OUTPARAM); 
     143                 : 
     144                 : /* Use this macro to declare functions that forward the behavior of this interface to another object. */
     145                 : #define NS_FORWARD_NSISEARCHABLEINPUTSTREAM(_to) \
     146                 :   NS_SCRIPTABLE NS_IMETHOD Search(const char * forString, bool ignoreCase, bool *found NS_OUTPARAM, PRUint32 *offsetSearchedTo NS_OUTPARAM) { return _to Search(forString, ignoreCase, found, offsetSearchedTo); } 
     147                 : 
     148                 : /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
     149                 : #define NS_FORWARD_SAFE_NSISEARCHABLEINPUTSTREAM(_to) \
     150                 :   NS_SCRIPTABLE NS_IMETHOD Search(const char * forString, bool ignoreCase, bool *found NS_OUTPARAM, PRUint32 *offsetSearchedTo NS_OUTPARAM) { return !_to ? NS_ERROR_NULL_POINTER : _to->Search(forString, ignoreCase, found, offsetSearchedTo); } 
     151                 : 
     152                 : #if 0
     153                 : /* Use the code below as a template for the implementation class for this interface. */
     154                 : 
     155                 : /* Header file */
     156                 : class nsSearchableInputStream : public nsISearchableInputStream
     157                 : {
     158                 : public:
     159                 :   NS_DECL_ISUPPORTS
     160                 :   NS_DECL_NSISEARCHABLEINPUTSTREAM
     161                 : 
     162                 :   nsSearchableInputStream();
     163                 : 
     164                 : private:
     165                 :   ~nsSearchableInputStream();
     166                 : 
     167                 : protected:
     168                 :   /* additional members */
     169                 : };
     170                 : 
     171                 : /* Implementation file */
     172                 : NS_IMPL_ISUPPORTS1(nsSearchableInputStream, nsISearchableInputStream)
     173                 : 
     174                 : nsSearchableInputStream::nsSearchableInputStream()
     175                 : {
     176                 :   /* member initializers and constructor code */
     177                 : }
     178                 : 
     179                 : nsSearchableInputStream::~nsSearchableInputStream()
     180                 : {
     181                 :   /* destructor code */
     182                 : }
     183                 : 
     184                 : /* void search (in string forString, in boolean ignoreCase, out boolean found, out unsigned long offsetSearchedTo); */
     185                 : NS_IMETHODIMP nsSearchableInputStream::Search(const char * forString, bool ignoreCase, bool *found NS_OUTPARAM, PRUint32 *offsetSearchedTo NS_OUTPARAM)
     186                 : {
     187                 :     return NS_ERROR_NOT_IMPLEMENTED;
     188                 : }
     189                 : 
     190                 : /* End of implementation class template. */
     191                 : #endif
     192                 : 
     193                 : 
     194                 : /**
     195                 :  * NS_NewPipe2
     196                 :  *
     197                 :  * This function supersedes NS_NewPipe.  It differs from NS_NewPipe in two
     198                 :  * major ways:
     199                 :  *  (1) returns nsIAsyncInputStream and nsIAsyncOutputStream, so it is
     200                 :  *      not necessary to QI in order to access these interfaces.
     201                 :  *  (2) the size of the pipe is determined by the number of segments
     202                 :  *      times the size of each segment.
     203                 :  *
     204                 :  * @param pipeIn
     205                 :  *        resulting input end of the pipe
     206                 :  * @param pipeOut
     207                 :  *        resulting output end of the pipe
     208                 :  * @param nonBlockingInput
     209                 :  *        true specifies non-blocking input stream behavior
     210                 :  * @param nonBlockingOutput
     211                 :  *        true specifies non-blocking output stream behavior
     212                 :  * @param segmentSize
     213                 :  *        specifies the segment size in bytes (pass 0 to use default value)
     214                 :  * @param segmentCount
     215                 :  *        specifies the max number of segments (pass 0 to use default value)
     216                 :  *        passing PR_UINT32_MAX here causes the pipe to have "infinite" space.
     217                 :  *        this mode can be useful in some cases, but should always be used with
     218                 :  *        caution.  the default value for this parameter is a finite value.
     219                 :  * @param segmentAlloc
     220                 :  *        pass reference to nsIMemory to have all pipe allocations use this
     221                 :  *        allocator (pass null to use the default allocator)
     222                 :  */
     223                 : extern nsresult
     224                 : NS_NewPipe2(nsIAsyncInputStream **pipeIn,
     225                 :             nsIAsyncOutputStream **pipeOut,
     226                 :             bool nonBlockingInput = PR_FALSE,
     227                 :             bool nonBlockingOutput = PR_FALSE,
     228                 :             PRUint32 segmentSize = 0,
     229                 :             PRUint32 segmentCount = 0,
     230                 :             nsIMemory *segmentAlloc = nsnull);
     231                 : /**
     232                 :  * NS_NewPipe
     233                 :  *
     234                 :  * Preserved for backwards compatibility.  Plus, this interface is more
     235                 :  * amiable in certain contexts (e.g., when you don't need the pipe's async
     236                 :  * capabilities).
     237                 :  *
     238                 :  * @param pipeIn
     239                 :  *        resulting input end of the pipe
     240                 :  * @param pipeOut
     241                 :  *        resulting output end of the pipe
     242                 :  * @param segmentSize
     243                 :  *        specifies the segment size in bytes (pass 0 to use default value)
     244                 :  * @param maxSize
     245                 :  *        specifies the max size of the pipe (pass 0 to use default value)
     246                 :  *        number of segments is maxSize / segmentSize, and maxSize must be a
     247                 :  *        multiple of segmentSize.  passing PR_UINT32_MAX here causes the
     248                 :  *        pipe to have "infinite" space.  this mode can be useful in some
     249                 :  *        cases, but should always be used with caution.  the default value
     250                 :  *        for this parameter is a finite value.
     251                 :  * @param nonBlockingInput
     252                 :  *        true specifies non-blocking input stream behavior
     253                 :  * @param nonBlockingOutput
     254                 :  *        true specifies non-blocking output stream behavior
     255                 :  * @param segmentAlloc
     256                 :  *        pass reference to nsIMemory to have all pipe allocations use this
     257                 :  *        allocator (pass null to use the default allocator)
     258                 :  */
     259                 : extern nsresult
     260                 : NS_NewPipe(nsIInputStream **pipeIn,
     261                 :            nsIOutputStream **pipeOut,
     262                 :            PRUint32 segmentSize = 0,
     263                 :            PRUint32 maxSize = 0,
     264                 :            bool nonBlockingInput = PR_FALSE,
     265                 :            bool nonBlockingOutput = PR_FALSE,
     266                 :            nsIMemory *segmentAlloc = nsnull);
     267                 : 
     268                 : #endif /* __gen_nsIPipe_h__ */

Generated by: LCOV version 1.7