2 * AT-SPI - Assistive Technology Service Provider Interface
3 * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
5 * Copyright 2001 Sun Microsystems Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
23 #include <cspi/spi-private.h>
26 * AccessibleStreamableContent_ref:
27 * @obj: a pointer to the #AccessibleStreamableContent implementor on which to
30 * Increment the reference count for an #AccessibleStreamableContent object.
34 AccessibleStreamableContent_ref (AccessibleStreamableContent *obj)
36 cspi_object_ref (obj);
40 * AccessibleStreamableContent_unref:
41 * @obj: a pointer to the #AccessibleStreamableContent implementor
42 * on which to operate.
44 * Decrement the reference count for an #AccessibleStreamableContent object.
48 AccessibleStreamableContent_unref (AccessibleStreamableContent *obj)
50 cspi_object_unref (obj);
54 * AccessibleStreamableContent_getContentTypes:
55 * @obj: a pointer to the #AccessibleStreamableContent implementor on which to operate.
57 * Get a list of strings containing the content mimetypes available from an
58 * #AccessibleStreamableContent implementor.
60 * Returns: an array of strings, terminated by a NULL string, specifying the
61 * mimetypes for which the streamed content is available.
65 AccessibleStreamableContent_getContentTypes (AccessibleStreamableContent *obj)
67 char **content_types = malloc (sizeof (char *));
68 content_types [0] = NULL;
70 /* TODO: connect this to the correct libspi implementation code */
75 * AccessibleStreamableContent_open:
76 * @obj: a pointer to the #AccessibleStreamableContent implementor on which to operate.
77 * @content_type: a string specifying the content type to retrieve (should match one
78 * of the return strings from #AccessibleStreamableContent_getContentTypes ()).
80 * Open a streaming connection to an AccessibleStreamableContent implementor,
81 * of a particular content type
83 * Returns: #TRUE if successful, #FALSE if unsuccessful.
87 AccessibleStreamableContent_open (AccessibleStreamableContent *obj,
88 const char *content_type)
90 /* TODO: connect this to the correct libspi implementation code */
95 * AccessibleStreamableContent_seek:
96 * @obj: a pointer to the #AccessibleStreamableContent implementor on which to operate.
97 * @offset: a long int specifying the offset into the stream.
98 * @seek_type: an enum indicating the seek offset type, may be SEEK_SET,
99 * SEEK_CUR, SEEK_END (as in the lseek() libc command).
101 * Cause the current streamable content connection (obtained via
102 * #AccessibleStreamableContent_open()) to seek to a particular offset in the
105 * Returns: #TRUE if successful, #FALSE if unsuccessful.
109 AccessibleStreamableContent_seek (AccessibleStreamableContent *obj,
111 unsigned int seek_type)
113 /* TODO: connect this to the correct libspi implementation code */
118 * AccessibleStreamableContent_read:
119 * @obj: a pointer to the #AccessibleStreamableContent implementor on which to operate.
120 * @buff: a pointer to a buffer into which the resulting bytes read from the stream
122 * @nbytes: a long integer indicating the number of bytes to read/write.
123 * @read_type: currently unused, specifies behavior of reads for streamed content
124 * if blocking is not allowed, etc.
126 * Copy (read) bytes from the currently open streamable content connection
129 * Returns: an integer indicating the number of bytes read, or -1 on error.
133 AccessibleStreamableContent_read (AccessibleStreamableContent *obj,
136 unsigned int read_type)
138 /* TODO: connect this to the correct libspi implementation code */