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

Side by Side Diff: gecko-sdk/include/nsIWebBrowserStream.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/nsIWebBrowserSetup.h ('k') | gecko-sdk/include/nsIWebProgress.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/embedding/browser/webBrowser/nsIWebBrowserStre am.idl
3 */
4
5 #ifndef __gen_nsIWebBrowserStream_h__
6 #define __gen_nsIWebBrowserStream_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 nsIURI; /* forward declaration */
18
19
20 /* starting interface: nsIWebBrowserStream */
21 #define NS_IWEBBROWSERSTREAM_IID_STR "86d02f0e-219b-4cfc-9c88-bd98d2cce0b8"
22
23 #define NS_IWEBBROWSERSTREAM_IID \
24 {0x86d02f0e, 0x219b, 0x4cfc, \
25 { 0x9c, 0x88, 0xbd, 0x98, 0xd2, 0xcc, 0xe0, 0xb8 }}
26
27 /**
28 * This interface provides a way to stream data to the web browser. This allows
29 * loading of data from sources which can not be accessed using URIs and
30 * nsIWebNavigation.
31 *
32 * @status FROZEN
33 */
34 class NS_NO_VTABLE nsIWebBrowserStream : public nsISupports {
35 public:
36
37 NS_DEFINE_STATIC_IID_ACCESSOR(NS_IWEBBROWSERSTREAM_IID)
38
39 /**
40 * Prepare to load a stream of data. When this function returns successfully,
41 * it must be paired by a call to closeStream.
42 *
43 * @param aBaseURI
44 * The base URI of the data. Must not be null. Relative
45 * URIs will be resolved relative to this URI.
46 * @param aContentType
47 * ASCII string giving the content type of the data. If rendering
48 * content of this type is not supported, this method fails.
49 * This string may include a charset declaration, for example:
50 * text/html;charset=ISO-8859-1
51 *
52 * @throw NS_ERROR_NOT_AVAILABLE
53 * The requested content type is not supported.
54 * @throw NS_ERROR_IN_PROGRESS
55 * openStream was called twice without an intermediate closeStream.
56 */
57 /* void openStream (in nsIURI aBaseURI, in ACString aContentType); */
58 NS_IMETHOD OpenStream(nsIURI *aBaseURI, const nsACString & aContentType) = 0;
59
60 /**
61 * Append data to this stream.
62 * @param aData The data to append
63 * @param aLen Length of the data to append.
64 *
65 * @note To append more than 4 GB of data, call this method multiple times.
66 */
67 /* void appendToStream ([array, size_is (aLen), const] in octet aData, in unsi gned long aLen); */
68 NS_IMETHOD AppendToStream(const PRUint8 *aData, PRUint32 aLen) = 0;
69
70 /**
71 * Notifies the browser that all the data has been appended. This may notify
72 * the user that the browser is "done loading" in some form.
73 *
74 * @throw NS_ERROR_UNEXPECTED
75 * This method was called without a preceding openStream.
76 */
77 /* void closeStream (); */
78 NS_IMETHOD CloseStream(void) = 0;
79
80 };
81
82 /* Use this macro when declaring classes that implement this interface. */
83 #define NS_DECL_NSIWEBBROWSERSTREAM \
84 NS_IMETHOD OpenStream(nsIURI *aBaseURI, const nsACString & aContentType); \
85 NS_IMETHOD AppendToStream(const PRUint8 *aData, PRUint32 aLen); \
86 NS_IMETHOD CloseStream(void);
87
88 /* Use this macro to declare functions that forward the behavior of this interfa ce to another object. */
89 #define NS_FORWARD_NSIWEBBROWSERSTREAM(_to) \
90 NS_IMETHOD OpenStream(nsIURI *aBaseURI, const nsACString & aContentType) { ret urn _to OpenStream(aBaseURI, aContentType); } \
91 NS_IMETHOD AppendToStream(const PRUint8 *aData, PRUint32 aLen) { return _to Ap pendToStream(aData, aLen); } \
92 NS_IMETHOD CloseStream(void) { return _to CloseStream(); }
93
94 /* Use this macro to declare functions that forward the behavior of this interfa ce to another object in a safe way. */
95 #define NS_FORWARD_SAFE_NSIWEBBROWSERSTREAM(_to) \
96 NS_IMETHOD OpenStream(nsIURI *aBaseURI, const nsACString & aContentType) { ret urn !_to ? NS_ERROR_NULL_POINTER : _to->OpenStream(aBaseURI, aContentType); } \
97 NS_IMETHOD AppendToStream(const PRUint8 *aData, PRUint32 aLen) { return !_to ? NS_ERROR_NULL_POINTER : _to->AppendToStream(aData, aLen); } \
98 NS_IMETHOD CloseStream(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Clos eStream(); }
99
100 #if 0
101 /* Use the code below as a template for the implementation class for this interf ace. */
102
103 /* Header file */
104 class nsWebBrowserStream : public nsIWebBrowserStream
105 {
106 public:
107 NS_DECL_ISUPPORTS
108 NS_DECL_NSIWEBBROWSERSTREAM
109
110 nsWebBrowserStream();
111
112 private:
113 ~nsWebBrowserStream();
114
115 protected:
116 /* additional members */
117 };
118
119 /* Implementation file */
120 NS_IMPL_ISUPPORTS1(nsWebBrowserStream, nsIWebBrowserStream)
121
122 nsWebBrowserStream::nsWebBrowserStream()
123 {
124 /* member initializers and constructor code */
125 }
126
127 nsWebBrowserStream::~nsWebBrowserStream()
128 {
129 /* destructor code */
130 }
131
132 /* void openStream (in nsIURI aBaseURI, in ACString aContentType); */
133 NS_IMETHODIMP nsWebBrowserStream::OpenStream(nsIURI *aBaseURI, const nsACString & aContentType)
134 {
135 return NS_ERROR_NOT_IMPLEMENTED;
136 }
137
138 /* void appendToStream ([array, size_is (aLen), const] in octet aData, in unsign ed long aLen); */
139 NS_IMETHODIMP nsWebBrowserStream::AppendToStream(const PRUint8 *aData, PRUint32 aLen)
140 {
141 return NS_ERROR_NOT_IMPLEMENTED;
142 }
143
144 /* void closeStream (); */
145 NS_IMETHODIMP nsWebBrowserStream::CloseStream()
146 {
147 return NS_ERROR_NOT_IMPLEMENTED;
148 }
149
150 /* End of implementation class template. */
151 #endif
152
153
154 #endif /* __gen_nsIWebBrowserStream_h__ */
OLDNEW
« no previous file with comments | « gecko-sdk/include/nsIWebBrowserSetup.h ('k') | gecko-sdk/include/nsIWebProgress.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698