1 <?xml version="1.0" encoding="UTF-8"?>
2 <node xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" name="/node">
8 <interface name="org.freedesktop.atspi.ContentStream">
9 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
10 <p>An interface by which the requested data from a StreamableContent object
11 may be read by the client.
12 @note this interface supercedes the use of BonoboStream by previous
13 versions of StreamableContent. </p>
15 <p>@since AT-SPI 1.7.0 </p>
18 <tp:enum name="SeekType" type="u">
19 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
20 <p>Specifies the meaning of a seek 'offset'. Not all SeekTypes are
21 supported by all StreamableContent data sources, for instance
22 some streams may not support seeking from the beginning or other
23 types of 'backwards' seeks.</p>
25 <tp:enumvalue suffix="SEEK_SET">
27 < Seek from the start of the stream or data source.
30 <tp:enumvalue suffix="SEEK_CURRENT" value="1">
32 < Seek relative to the current position.
35 <tp:enumvalue suffix="SEEK_END" value="2">
37 < Seek from the end of the file, stream, or data source.
41 <tp:errors xmlns="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" namespace="org.freedesktop.atspi.error">
42 <tp:error name="IOError">
44 Indicates that a transmission error has occurred while reading or seeking the stream or data source.
47 <tp:error name="NotSupported">
49 Indicates that the requested operation is not supported by the stream instance.
52 <tp:error name="NoPermission">
54 The operation is supported, but the current requestor does not havepermission to t the request, for instance does not have permission to read the stream.
59 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
60 <p>Seek to a specified position in the Stream.
61 @param offset an offset specifying the requested position in the stream,
62 relative to the SeekType specified in \c whence.
63 @param whence a SeekType specifying the reference point from which the
64 seek offset is calculated. Some forms of seek are not supported by certain
65 implementations of Stream, in which case a NotSupported exception will be raised.</p>
67 <arg direction="in" name="offset" type="i"/>
68 <arg direction="in" name="whence" type="u" tp:type="SeekType"/>
69 <arg direction="out" type="i">
71 the actual resulting offset, if no exception was raised.
75 <tp:error name="org.freedesktop.atspi.error.(NoPermission"/>
76 <tp:error name="org.freedesktop.atspi.error.IOError"/>
77 <tp:error name="org.freedesktop.atspi.error.NotSupported"/>
82 Request/read a specified amount of data from a Stream.
84 <arg direction="in" name="count" type="i"/>
85 <arg direction="out" name="buffer" type="ay" tp:type="iobuf"/>
86 <arg direction="out" type="i">
88 the number of bytes actually read into the client buffer.
92 <tp:error name="org.freedesktop.atspi.error.(NoPermission"/>
93 <tp:error name="org.freedesktop.atspi.error.IOError"/>
97 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
98 <p>close the stream and release associated resources.
99 A client should not perform further operations on a
100 StreamableContent::Stream object after closing it.</p>
103 <method name="unimplemented">
108 <method name="unimplemented2">
110 <interface name="org.freedesktop.atspi.StreamableContent">
111 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
112 <p>An interface whereby an object allows its backing content
113 to be streamed to clients. Negotiation of content type
114 is allowed. Clients may examine the backing data and
115 transform, convert, or parse the content in order to
116 present it in an alternate form to end-users. </p>
118 <p>@note The StreamableContent interface is particularly useful for saving,
119 printing, or post-processing entire documents, or for persisting
120 alternate views of a document.
121 If document content itself is being serialized, stored, or converted,
122 then use of the StreamableContent interface can help address performance
123 issues. Unlike most AT-SPI/Accessibility interfaces, this interface
124 is not strongly tied to the current user-agent view of the
125 a particular document, but may in some cases give access to the
126 underlying model data.</p>
128 <method name="getContentTypes">
132 <arg direction="out" type="as" tp:type="StringSeq">
134 the list of available mimetypes for this object's content.
138 <method name="getContent">
139 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
140 <p>\n DEPRECATED, use getStream instead.
142 Retrieve this object's content, in a format appropriate to a
143 requested mimetype. </p>
145 <p>@note the data is returned as an object of type ::Bonobo::Stream.
146 The primary methods which are supported on Bonobo::Streams for the
147 purposes of the ::StreamableContent API are \c seek and \c read.
148 \c seek may not be supported for all mimetypes or
149 all implementors. </p>
152 long Bonobo::Stream:seek (in long offset, in SeekType whence)
153 raises (NoPermission, IOError)
154 void Bonobo::Stream:read (in long count, out iobuf buffer)
155 raises (NoPermission, IOError)
158 <p>@see ::Bonobo::Stream </p>
160 <arg direction="in" name="contentType" type="s"/>
161 <arg direction="out" type="FIXME" tp:type="Bonobo::Stream">
163 a ::Bonobo::Stream whose mimetype matches \a contentType,if available, or \c NIL.
167 <method name="getStream">
168 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
169 <p>Retrieve this object's content, in a format appropriate to a
170 requested mimetype, as a ::ContentStream instance. </p>
172 <p>@note This method supercedes the older getContent method, which
173 relied on the Bonobo::Stream API.
174 \c seek may not be supported for all mimetypes or
175 all implementors. </p>
177 <p>@param contentType a string specifying the desired mimetype for the content stream.</p>
179 <arg direction="in" name="contentType" type="s"/>
180 <arg direction="out" type="FIXME" tp:type="ContentStream">
182 a Stream whose mimetype matches \a contentType,if available, or \c NIL.@since AT-SPI 1.8.0
186 <method name="getURI">
187 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
188 <p>Get a URI pointing to the content of the specified type, if such a URI
189 can be obtained. Not all streamable content providers have URI representations. </p>
191 <p>@param contentType a string specifying the desired mimetype for the content stream.
192 If NULL, then a URI for the default content type will be returned, if available. </p>
194 <arg direction="in" name="contentType" type="s"/>
195 <arg direction="out" type="s">
197 a string which constitutes a URI for a stream of the specifiedcontent type, or NULL if no such URI can be obtained.
201 <method name="unImplemented">
202 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
206 <p>placeholders for future expansion.</p>
209 <method name="unImplemented2">