AccessibleStreamableContent Interface

## AccessibleStreamableContent Interface AccessibleStreamableContent Interface |

## Synopsis

    enum                AccessibleStreamableContentSeekType;
    void                AccessibleStreamableContent_freeContentTypesList
                                                            (AccessibleStreamableContent *obj,
                                                             char **content_types);
    void                AccessibleStreamableContent_ref     (AccessibleStreamableContent *obj);
    void                AccessibleStreamableContent_unref   (AccessibleStreamableContent *obj);
    char **             AccessibleStreamableContent_getContentTypes
                                                            (AccessibleStreamableContent *obj);
    SPIBoolean          AccessibleStreamableContent_open    (AccessibleStreamableContent *obj,
                                                             const char *content_type);
    long                AccessibleStreamableContent_seek    (AccessibleStreamableContent *obj,
                                                             long int offset,
                                                             AccessibleStreamableContentSeekType seek_type);
    SPIBoolean          AccessibleStreamableContent_read    (AccessibleStreamableContent *obj,
                                                             void *buff,
                                                             long int nbytes,
                                                             unsigned int read_type);
    SPIBoolean          AccessibleStreamableContent_close   (AccessibleStreamableContent *obj);

## Description

## Details

### enum AccessibleStreamableContentSeekType

    typedef enum
    {
      SPI_STREAM_SEEK_SET,
      SPI_STREAM_SEEK_CUR,
      SPI_STREAM_SEEK_END
    } AccessibleStreamableContentSeekType;

The seek type for a specified offset in AccessibleStreamableContent_seek.

`SPI_STREAM_SEEK_SET` | seek from the 'top' of the streamable
`SPI_STREAM_SEEK_CUR` | seek from the current position in the stream
`SPI_STREAM_SEEK_END` | seek from the end of the stream (if known)

### AccessibleStreamableContent_freeContentTypesList ()

    void                AccessibleStreamableContent_freeContentTypesList
                                                            (AccessibleStreamableContent *obj,
                                                             char **content_types);

Free the memory associated with a call to AccessibleStreamableContent_getContentTypes, once the result has been used.

`obj` : | the AccessibleStreamableContent implementor on which to operate.
`content_types` : | a list of content types previously returned by AccessibleStreamableContent_getContentTypes.

Since AT-SPI 1.4

### AccessibleStreamableContent_ref ()

    void                AccessibleStreamableContent_ref     (AccessibleStreamableContent *obj);

Increment the reference count for an AccessibleStreamableContent object.

`Since`: AT-SPI 1.4

`obj` : | a pointer to the AccessibleStreamableContent implementor on which to operate.

### AccessibleStreamableContent_unref ()

    void                AccessibleStreamableContent_unref   (AccessibleStreamableContent *obj);

Decrement the reference count for an AccessibleStreamableContent object.

`Since`: AT-SPI 1.4

`obj` : | a pointer to the AccessibleStreamableContent implementor on which to operate.

### AccessibleStreamableContent_getContentTypes ()

    char **             AccessibleStreamableContent_getContentTypes
                                                            (AccessibleStreamableContent *obj);

Get a list of strings containing the content mimetypes available from an AccessibleStreamableContent implementor.

`Since`: AT-SPI 1.4

`obj` : | a pointer to the AccessibleStreamableContent implementor on which to operate.
Returns : | an array of strings, terminated by a NULL string, specifying the mimetypes for which the streamed content is available.

### AccessibleStreamableContent_open ()

    SPIBoolean          AccessibleStreamableContent_open    (AccessibleStreamableContent *obj,
                                                             const char *content_type);

Open a streaming connection to an AccessibleStreamableContent implementor, of a particular content type. Note that a client may only have one open stream per streamable interface instance in the current implementation.

`Since`: AT-SPI 1.4

`obj` : | a pointer to the AccessibleStreamableContent implementor on which to operate.
`content_type` : | a string specifying the content type to retrieve (should match one of the return strings from #`AccessibleStreamableContent_getContentTypes()`).
Returns : | TRUE if successful, FALSE if unsuccessful.

### AccessibleStreamableContent_seek ()

    long                AccessibleStreamableContent_seek    (AccessibleStreamableContent *obj,
                                                             long int offset,
                                                             AccessibleStreamableContentSeekType seek_type);

Cause the current streamable content connection (obtained via #`AccessibleStreamableContent_open()`) to seek to a particular offset in the stream.

`Since`: AT-SPI 1.4

`obj` : | a pointer to the AccessibleStreamableContent implementor on which to operate.
`offset` : | a long int specifying the offset into the stream.
`seek_type` : | an enum indicating the seek offset type, may be SEEK_SET, SEEK_CUR, SEEK_END (as in the `lseek()` libc command).
Returns : | TRUE if successful, FALSE if unsuccessful.

### AccessibleStreamableContent_read ()

    SPIBoolean          AccessibleStreamableContent_read    (AccessibleStreamableContent *obj,
                                                             void *buff,
                                                             long int nbytes,
                                                             unsigned int read_type);

Copy (read) bytes from the currently open streamable content connection to a buffer. This is a blocking API, in the sense that it does not return until the bytes have been read, or an error condition is detected.

`Since`: AT-SPI 1.4

`obj` : | a pointer to the AccessibleStreamableContent implementor on which to operate.
`buff` : | a pointer to a buffer into which the resulting bytes read from the stream are to be written.
`nbytes` : | a long integer indicating the number of bytes to read/write.
`read_type` : | currently unused, specifies behavior of reads for streamed content if blocking is not allowed, etc.
Returns : | an integer indicating the number of bytes read, or -1 on error.

### AccessibleStreamableContent_close ()

    SPIBoolean          AccessibleStreamableContent_close   (AccessibleStreamableContent *obj);

Close the current streaming connection to an AccessibleStreamableContent implementor. This must be called before any subsequent AccessibleStreamableContent_open calls on the same object.

`Since`: AT-SPI 1.4

`obj` : | a pointer to the AccessibleStreamableContent implementor on which to operate.
Returns : | TRUE if successful, FALSE if unsuccessful.