2 * AT-SPI - Assistive Technology Service Provider Interface
3 * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
5 * Copyright 2001, 2002 Sun Microsystems Inc.,
6 * Copyright 2001, 2002 Ximian, Inc.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
24 #include <cspi/spi-private.h>
27 * AccessibleStreamableContent_ref:
28 * @obj: a pointer to the #AccessibleStreamableContent implementor on which to
31 * Increment the reference count for an #AccessibleStreamableContent object.
35 AccessibleStreamableContent_ref (AccessibleStreamableContent *obj)
37 cspi_object_ref (obj);
41 * AccessibleStreamableContent_unref:
42 * @obj: a pointer to the #AccessibleStreamableContent implementor
43 * on which to operate.
45 * Decrement the reference count for an #AccessibleStreamableContent object.
49 AccessibleStreamableContent_unref (AccessibleStreamableContent *obj)
51 cspi_object_unref (obj);
55 * AccessibleStreamableContent_getContentTypes:
56 * @obj: a pointer to the #AccessibleStreamableContent implementor on which to operate.
58 * Get a list of strings containing the content mimetypes available from an
59 * #AccessibleStreamableContent implementor.
61 * Returns: an array of strings, terminated by a NULL string, specifying the
62 * mimetypes for which the streamed content is available.
66 AccessibleStreamableContent_getContentTypes (AccessibleStreamableContent *obj)
68 char **content_types = malloc (sizeof (char *));
69 content_types [0] = NULL;
71 /* TODO: connect this to the correct libspi implementation code */
76 * AccessibleStreamableContent_open:
77 * @obj: a pointer to the #AccessibleStreamableContent implementor on which to operate.
78 * @content_type: a string specifying the content type to retrieve (should match one
79 * of the return strings from #AccessibleStreamableContent_getContentTypes ()).
81 * Open a streaming connection to an AccessibleStreamableContent implementor,
82 * of a particular content type
84 * Returns: #TRUE if successful, #FALSE if unsuccessful.
88 AccessibleStreamableContent_open (AccessibleStreamableContent *obj,
89 const char *content_type)
91 /* TODO: connect this to the correct libspi implementation code */
96 * AccessibleStreamableContent_seek:
97 * @obj: a pointer to the #AccessibleStreamableContent implementor on which to operate.
98 * @offset: a long int specifying the offset into the stream.
99 * @seek_type: an enum indicating the seek offset type, may be SEEK_SET,
100 * SEEK_CUR, SEEK_END (as in the lseek() libc command).
102 * Cause the current streamable content connection (obtained via
103 * #AccessibleStreamableContent_open()) to seek to a particular offset in the
106 * Returns: #TRUE if successful, #FALSE if unsuccessful.
110 AccessibleStreamableContent_seek (AccessibleStreamableContent *obj,
112 unsigned int seek_type)
114 /* TODO: connect this to the correct libspi implementation code */
119 * AccessibleStreamableContent_read:
120 * @obj: a pointer to the #AccessibleStreamableContent implementor on which to operate.
121 * @buff: a pointer to a buffer into which the resulting bytes read from the stream
123 * @nbytes: a long integer indicating the number of bytes to read/write.
124 * @read_type: currently unused, specifies behavior of reads for streamed content
125 * if blocking is not allowed, etc.
127 * Copy (read) bytes from the currently open streamable content connection
130 * Returns: an integer indicating the number of bytes read, or -1 on error.
134 AccessibleStreamableContent_read (AccessibleStreamableContent *obj,
137 unsigned int read_type)
139 /* TODO: connect this to the correct libspi implementation code */