1 module org.eclipse.swt.internal.mozilla.nsIOutputStream;
2 
3 import java.lang.all;
4 
5 import org.eclipse.swt.internal.mozilla.Common;
6 import org.eclipse.swt.internal.mozilla.nsID;
7 import org.eclipse.swt.internal.mozilla.nsISupports;
8 
9 import org.eclipse.swt.internal.mozilla.nsIInputStream;
10 
11 typedef nsresult function(nsIOutputStream aOutStream,
12 	void *aClosure,
13 	char *aToSegment,
14 	PRUint32 aFromOffset,
15 	PRUint32 aCount,
16 	PRUint32 *aReadCount) nsReadSegmentFun;
17 
18 const char[] NS_IOUTPUTSTREAM_IID_STR = "0d0acd2a-61b4-11d4-9877-00c04fa0cf4a";
19 
20 const nsIID NS_IOUTPUTSTREAM_IID= 
21   {0x0d0acd2a, 0x61b4, 0x11d4, 
22     [ 0x98, 0x77, 0x00, 0xc0, 0x4f, 0xa0, 0xcf, 0x4a ]};
23 
24 interface nsIOutputStream : nsISupports {
25 
26   static const char[] IID_STR = NS_IOUTPUTSTREAM_IID_STR;
27   static const nsIID IID = NS_IOUTPUTSTREAM_IID;
28 
29 extern(System):
30   nsresult Close();
31   nsresult Flush();
32   nsresult Write(char *aBuf, PRUint32 aCount, PRUint32 *_retval);
33   nsresult WriteFrom(nsIInputStream aFromStream, PRUint32 aCount, PRUint32 *_retval);
34   nsresult WriteSegments(nsReadSegmentFun aReader, void * aClosure, PRUint32 aCount, PRUint32 *_retval);
35   nsresult IsNonBlocking(PRBool *_retval);
36 
37 }
38