Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: gecko-sdk/include/nsIScriptableInputStream.h

Issue 20346: Version 1.8 of gecko-sdk. Downloaded from here:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gecko-sdk/include/nsISHistoryListener.h ('k') | gecko-sdk/include/nsISecurityWarningDialogs.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 /*
2 * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/builds/tinderbox/XR-Mozilla1.8.0 -Release/WINNT_5.2_Depend/mozilla/xpcom/io/nsIScriptableInputStream.idl
3 */
4
5 #ifndef __gen_nsIScriptableInputStream_h__
6 #define __gen_nsIScriptableInputStream_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 nsIInputStream; /* forward declaration */
18
19
20 /* starting interface: nsIScriptableInputStream */
21 #define NS_ISCRIPTABLEINPUTSTREAM_IID_STR "a2a32f90-9b90-11d3-a189-0050041caf44"
22
23 #define NS_ISCRIPTABLEINPUTSTREAM_IID \
24 {0xa2a32f90, 0x9b90, 0x11d3, \
25 { 0xa1, 0x89, 0x00, 0x50, 0x04, 0x1c, 0xaf, 0x44 }}
26
27 /**
28 * nsIScriptableInputStream provides scriptable access to the nsIInputStream.
29 *
30 * @status FROZEN
31 */
32 class NS_NO_VTABLE nsIScriptableInputStream : public nsISupports {
33 public:
34
35 NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISCRIPTABLEINPUTSTREAM_IID)
36
37 /**
38 * Closes the stream.
39 */
40 /* void close (); */
41 NS_IMETHOD Close(void) = 0;
42
43 /** Wrap the given nsIInputStream with this nsIScriptableInputStream.
44 * @param aInputStream [in] parameter providing the stream to wrap
45 */
46 /* void init (in nsIInputStream aInputStream); */
47 NS_IMETHOD Init(nsIInputStream *aInputStream) = 0;
48
49 /** Return the number of bytes currently available in the stream
50 * @param _retval [out] parameter to hold the number of bytes
51 * if an error occurs, the parameter will be undefined
52 * @return error status
53 */
54 /* unsigned long available (); */
55 NS_IMETHOD Available(PRUint32 *_retval) = 0;
56
57 /** Read data from the stream.
58 * @param aCount [in] the maximum number of bytes to read
59 * @param _retval [out] the data
60 */
61 /* string read (in unsigned long aCount); */
62 NS_IMETHOD Read(PRUint32 aCount, char **_retval) = 0;
63
64 };
65
66 /* Use this macro when declaring classes that implement this interface. */
67 #define NS_DECL_NSISCRIPTABLEINPUTSTREAM \
68 NS_IMETHOD Close(void); \
69 NS_IMETHOD Init(nsIInputStream *aInputStream); \
70 NS_IMETHOD Available(PRUint32 *_retval); \
71 NS_IMETHOD Read(PRUint32 aCount, char **_retval);
72
73 /* Use this macro to declare functions that forward the behavior of this interfa ce to another object. */
74 #define NS_FORWARD_NSISCRIPTABLEINPUTSTREAM(_to) \
75 NS_IMETHOD Close(void) { return _to Close(); } \
76 NS_IMETHOD Init(nsIInputStream *aInputStream) { return _to Init(aInputStream); } \
77 NS_IMETHOD Available(PRUint32 *_retval) { return _to Available(_retval); } \
78 NS_IMETHOD Read(PRUint32 aCount, char **_retval) { return _to Read(aCount, _re tval); }
79
80 /* Use this macro to declare functions that forward the behavior of this interfa ce to another object in a safe way. */
81 #define NS_FORWARD_SAFE_NSISCRIPTABLEINPUTSTREAM(_to) \
82 NS_IMETHOD Close(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); } \
83 NS_IMETHOD Init(nsIInputStream *aInputStream) { return !_to ? NS_ERROR_NULL_PO INTER : _to->Init(aInputStream); } \
84 NS_IMETHOD Available(PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Available(_retval); } \
85 NS_IMETHOD Read(PRUint32 aCount, char **_retval) { return !_to ? NS_ERROR_NULL _POINTER : _to->Read(aCount, _retval); }
86
87 #if 0
88 /* Use the code below as a template for the implementation class for this interf ace. */
89
90 /* Header file */
91 class nsScriptableInputStream : public nsIScriptableInputStream
92 {
93 public:
94 NS_DECL_ISUPPORTS
95 NS_DECL_NSISCRIPTABLEINPUTSTREAM
96
97 nsScriptableInputStream();
98
99 private:
100 ~nsScriptableInputStream();
101
102 protected:
103 /* additional members */
104 };
105
106 /* Implementation file */
107 NS_IMPL_ISUPPORTS1(nsScriptableInputStream, nsIScriptableInputStream)
108
109 nsScriptableInputStream::nsScriptableInputStream()
110 {
111 /* member initializers and constructor code */
112 }
113
114 nsScriptableInputStream::~nsScriptableInputStream()
115 {
116 /* destructor code */
117 }
118
119 /* void close (); */
120 NS_IMETHODIMP nsScriptableInputStream::Close()
121 {
122 return NS_ERROR_NOT_IMPLEMENTED;
123 }
124
125 /* void init (in nsIInputStream aInputStream); */
126 NS_IMETHODIMP nsScriptableInputStream::Init(nsIInputStream *aInputStream)
127 {
128 return NS_ERROR_NOT_IMPLEMENTED;
129 }
130
131 /* unsigned long available (); */
132 NS_IMETHODIMP nsScriptableInputStream::Available(PRUint32 *_retval)
133 {
134 return NS_ERROR_NOT_IMPLEMENTED;
135 }
136
137 /* string read (in unsigned long aCount); */
138 NS_IMETHODIMP nsScriptableInputStream::Read(PRUint32 aCount, char **_retval)
139 {
140 return NS_ERROR_NOT_IMPLEMENTED;
141 }
142
143 /* End of implementation class template. */
144 #endif
145
146
147 #endif /* __gen_nsIScriptableInputStream_h__ */
OLDNEW
« no previous file with comments | « gecko-sdk/include/nsISHistoryListener.h ('k') | gecko-sdk/include/nsISecurityWarningDialogs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698