1 #include <cspi/spi-private.h>
4 * AccessibleStreamableContent_ref:
5 * @obj: a pointer to the #AccessibleStreamableContent implementor on which to
8 * Increment the reference count for an #AccessibleStreamableContent object.
12 AccessibleStreamableContent_ref (AccessibleStreamableContent *obj)
14 cspi_object_ref (obj);
18 * AccessibleStreamableContent_unref:
19 * @obj: a pointer to the #AccessibleStreamableContent implementor
20 * on which to operate.
22 * Decrement the reference count for an #AccessibleStreamableContent object.
26 AccessibleStreamableContent_unref (AccessibleStreamableContent *obj)
28 cspi_object_unref (obj);
32 * AccessibleStreamableContent_getContentTypes:
33 * @obj: a pointer to the #AccessibleStreamableContent implementor on which to operate.
35 * Get a list of strings containing the content mimetypes available from an
36 * #AccessibleStreamableContent implementor.
38 * Returns: an array of strings, terminated by a NULL string, specifying the
39 * mimetypes for which the streamed content is available.
43 AccessibleStreamableContent_getContentTypes (AccessibleStreamableContent *obj)
45 char **content_types = malloc (sizeof (char *));
46 content_types [0] = NULL;
48 /* TODO: connect this to the correct libspi implementation code */
53 * AccessibleStreamableContent_open:
54 * @obj: a pointer to the #AccessibleStreamableContent implementor on which to operate.
55 * @content_type: a string specifying the content type to retrieve (should match one
56 * of the return strings from #AccessibleStreamableContent_getContentTypes ()).
58 * Open a streaming connection to an AccessibleStreamableContent implementor,
59 * of a particular content type
61 * Returns: #TRUE if successful, #FALSE if unsuccessful.
65 AccessibleStreamableContent_open (AccessibleStreamableContent *obj,
66 const char *content_type)
68 /* TODO: connect this to the correct libspi implementation code */
73 * AccessibleStreamableContent_seek:
74 * @obj: a pointer to the #AccessibleStreamableContent implementor on which to operate.
75 * @offset: a long int specifying the offset into the stream.
76 * @seek_type: an enum indicating the seek offset type, may be SEEK_SET,
77 * SEEK_CUR, SEEK_END (as in the lseek() libc command).
79 * Cause the current streamable content connection (obtained via
80 * #AccessibleStreamableContent_open()) to seek to a particular offset in the
83 * Returns: #TRUE if successful, #FALSE if unsuccessful.
87 AccessibleStreamableContent_seek (AccessibleStreamableContent *obj,
89 unsigned int seek_type)
91 /* TODO: connect this to the correct libspi implementation code */
96 * AccessibleStreamableContent_read:
97 * @obj: a pointer to the #AccessibleStreamableContent implementor on which to operate.
98 * @buff: a pointer to a buffer into which the resulting bytes read from the stream
100 * @nbytes: a long integer indicating the number of bytes to read/write.
101 * @read_type: currently unused, specifies behavior of reads for streamed content
102 * if blocking is not allowed, etc.
104 * Copy (read) bytes from the currently open streamable content connection
107 * Returns: an integer indicating the number of bytes read, or -1 on error.
111 AccessibleStreamableContent_read (AccessibleStreamableContent *obj,
114 unsigned int read_type)
116 /* TODO: connect this to the correct libspi implementation code */