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 ()).
57 * @fp: a pointer to a FILE pointer into which is placed a file handle suitable for
58 * reading the content, if possible. Not all content types support file-handle
59 * interaction, so check this parameter for NULL before use.
61 * Open a streaming connection to an AccessibleStreamableContent implementor,
62 * of a particular content type
64 * Returns: #TRUE if successful, #FALSE if unsuccessful.
68 AccessibleStreamableContent_open (AccessibleStreamableContent *obj,
69 const char *content_type)
71 /* TODO: connect this to the correct libspi implementation code */
76 * AccessibleStreamableContent_seek:
77 * @obj: a pointer to the #AccessibleStreamableContent implementor on which to operate.
78 * @offset: a long int specifying the offset into the stream.
79 * @seek_type: an enum indicating the seek offset type, may be SEEK_SET,
80 * SEEK_CUR, SEEK_END (as in the lseek() libc command).
82 * Cause the current streamable content connection (obtained via
83 * #AccessibleStreamableContent_open()) to seek to a particular offset in the
86 * Returns: #TRUE if successful, #FALSE if unsuccessful.
90 AccessibleStreamableContent_seek (AccessibleStreamableContent *obj,
93 /* TODO: connect this to the correct libspi implementation code */
98 * AccessibleStreamableContent_read:
99 * @obj: a pointer to the #AccessibleStreamableContent implementor on which to operate.
100 * @buff: a pointer to a buffer into which the resulting bytes read from the stream
102 * @nbytes: a long integer indicating the number of bytes to read/write.
103 * @read_type: currently unused, specifies behavior of reads for streamed content
104 * if blocking is not allowed, etc.
106 * Copy (read) bytes from the currently open streamable content connection
109 * Returns: an integer indicating the number of bytes read, or -1 on error.
113 AccessibleStreamableContent_read (AccessibleStreamableContent *obj,
116 unsigned int read_type)
118 /* TODO: connect this to the correct libspi implementation code */