RygelHTTPGetHandler: librygel-server Reference Manual

## RygelHTTPGetHandler RygelHTTPGetHandler — HTTP GET request handler interface. |

## Functions

void | rygel_http_get_handler_add_response_headers ()
gchar * | rygel_http_get_handler_get_default_transfer_mode ()
gboolean | rygel_http_get_handler_supports_transfer_mode ()
gint64 | rygel_http_get_handler_get_resource_size ()
gint64 | rygel_http_get_handler_get_resource_duration ()
gboolean | rygel_http_get_handler_supports_byte_seek ()
gboolean | rygel_http_get_handler_supports_time_seek ()
gboolean | rygel_http_get_handler_supports_playspeed ()
RygelHTTPResponse * | rygel_http_get_handler_render_body ()
GCancellable * | rygel_http_get_handler_get_cancellable ()
void | rygel_http_get_handler_set_cancellable ()

## Properties

GCancellable * | cancellable | Read / Write

## Types and Values

#define | RYGEL_TYPE_HTTP_GET_HANDLER
#define | RYGEL_HTTP_GET_HANDLER_TRANSFER_MODE_HEADER
#define | RYGEL_HTTP_GET_HANDLER_TRANSFER_MODE_STREAMING
#define | RYGEL_HTTP_GET_HANDLER_TRANSFER_MODE_INTERACTIVE
#define | RYGEL_HTTP_GET_HANDLER_TRANSFER_MODE_BACKGROUND
struct | RygelHTTPGetHandler
struct | RygelHTTPGetHandlerClass

## Object Hierarchy

        GObject
        ╰── RygelHTTPGetHandler

## Description

## Functions

### rygel_http_get_handler_add_response_headers ()

    void
    rygel_http_get_handler_add_response_headers
                                   (RygelHTTPGetHandler *self,
                                    RygelHTTPGet *request,
                                    GError **error);

Invokes the handler to add response headers to/for the given HTTP request

#### Parameters

self | the RygelHTTPGetHandler instance |
request |  |
error | location to store the error occuring, or `NULL` to ignore. | [error-domains RygelHTTPRequestError]

### rygel_http_get_handler_get_default_transfer_mode ()

    gchar *
    rygel_http_get_handler_get_default_transfer_mode
                                   (RygelHTTPGetHandler *self);

Returns the default transfer mode for the handler. The default is "Interactive"

#### Parameters

self | the RygelHTTPGetHandler instance |

### rygel_http_get_handler_supports_transfer_mode ()

    gboolean
    rygel_http_get_handler_supports_transfer_mode
                                   (RygelHTTPGetHandler *self,
                                    const gchar *mode);

Returns true if the handler supports the given transfer mode, false otherwise.

#### Parameters

self | the RygelHTTPGetHandler instance |
mode |  |

### rygel_http_get_handler_get_resource_size ()

    gint64
    rygel_http_get_handler_get_resource_size
                                   (RygelHTTPGetHandler *self);

Returns the resource size or -1 if not known.

#### Parameters

self | the RygelHTTPGetHandler instance |

### rygel_http_get_handler_get_resource_duration ()

    gint64
    rygel_http_get_handler_get_resource_duration
                                   (RygelHTTPGetHandler *self);

Returns the resource duration (in microseconds) or -1 if not known.

#### Parameters

self | the RygelHTTPGetHandler instance |

### rygel_http_get_handler_supports_byte_seek ()

    gboolean
    rygel_http_get_handler_supports_byte_seek
                                   (RygelHTTPGetHandler *self);

Returns true if the handler supports full random-access byte seek.

#### Parameters

self | the RygelHTTPGetHandler instance |

### rygel_http_get_handler_supports_time_seek ()

    gboolean
    rygel_http_get_handler_supports_time_seek
                                   (RygelHTTPGetHandler *self);

Returns true if the handler supports full random-access time seek.

#### Parameters

self | the RygelHTTPGetHandler instance |

### rygel_http_get_handler_supports_playspeed ()

    gboolean
    rygel_http_get_handler_supports_playspeed
                                   (RygelHTTPGetHandler *self);

Returns true if the handler supports any play speed requests.

#### Parameters

self | the RygelHTTPGetHandler instance |

### rygel_http_get_handler_render_body ()

    RygelHTTPResponse *
    rygel_http_get_handler_render_body (RygelHTTPGetHandler *self,
                                        RygelHTTPGet *request,
                                        GError **error);

Create an HTTPResponse object that will render the body.

#### Parameters

self | the RygelHTTPGetHandler instance |
request |  |
error | location to store the error occuring, or `NULL` to ignore. | [error-domains RygelHTTPRequestError]

### rygel_http_get_handler_get_cancellable ()

    GCancellable *
    rygel_http_get_handler_get_cancellable
                                   (RygelHTTPGetHandler *self);

Get and return the current value of the "cancellable" property.

#### Parameters

self | the RygelHTTPGetHandler instance to query |

#### Returns

the value of the "cancellable" property

### rygel_http_get_handler_set_cancellable ()

    void
    rygel_http_get_handler_set_cancellable
                                   (RygelHTTPGetHandler *self,
                                    GCancellable *value);

Set the value of the "cancellable" property to `value` .

#### Parameters

self | the RygelHTTPGetHandler instance to modify |
value | the new value of the "cancellable" property |

## Types and Values

### RYGEL_TYPE_HTTP_GET_HANDLER

    #define RYGEL_TYPE_HTTP_GET_HANDLER (rygel_http_get_handler_get_type ())

The type for RygelHTTPGetHandler.

### RYGEL_HTTP_GET_HANDLER_TRANSFER_MODE_HEADER

    #define RYGEL_HTTP_GET_HANDLER_TRANSFER_MODE_HEADER "transferMode.dlna.org"

### RYGEL_HTTP_GET_HANDLER_TRANSFER_MODE_STREAMING

    #define RYGEL_HTTP_GET_HANDLER_TRANSFER_MODE_STREAMING "Streaming"

### RYGEL_HTTP_GET_HANDLER_TRANSFER_MODE_INTERACTIVE

    #define RYGEL_HTTP_GET_HANDLER_TRANSFER_MODE_INTERACTIVE "Interactive"

### RYGEL_HTTP_GET_HANDLER_TRANSFER_MODE_BACKGROUND

    #define RYGEL_HTTP_GET_HANDLER_TRANSFER_MODE_BACKGROUND "Background"

### struct RygelHTTPGetHandler

    struct RygelHTTPGetHandler;

HTTP GET request handler interface.

### struct RygelHTTPGetHandlerClass

    struct RygelHTTPGetHandlerClass {
    	GObjectClass parent_class;
    	void (*add_response_headers) (RygelHTTPGetHandler* self, RygelHTTPGet* request, GError** error);
    	gchar* (*get_default_transfer_mode) (RygelHTTPGetHandler* self);
    	gboolean (*supports_transfer_mode) (RygelHTTPGetHandler* self, const gchar* mode);
    	gint64 (*get_resource_size) (RygelHTTPGetHandler* self);
    	gint64 (*get_resource_duration) (RygelHTTPGetHandler* self);
    	gboolean (*supports_byte_seek) (RygelHTTPGetHandler* self);
    	gboolean (*supports_time_seek) (RygelHTTPGetHandler* self);
    	gboolean (*supports_playspeed) (RygelHTTPGetHandler* self);
    	RygelHTTPResponse* (*render_body) (RygelHTTPGetHandler* self, RygelHTTPGet* request, GError** error);
    };

The class structure for `RYGEL_TYPE_HTTP_GET_HANDLER`. All the fields in this structure are private and should never be accessed directly.

#### Members

`add_response_headers` () | virtual method called by `rygel_http_get_handler_add_response_headers()` |
`get_default_transfer_mode` () | virtual method called by `rygel_http_get_handler_get_default_transfer_mode()` |
`supports_transfer_mode` () | virtual method called by `rygel_http_get_handler_supports_transfer_mode()` |
`get_resource_size` () | virtual method called by `rygel_http_get_handler_get_resource_size()` |
`get_resource_duration` () | virtual method called by `rygel_http_get_handler_get_resource_duration()` |
`supports_byte_seek` () | virtual method called by `rygel_http_get_handler_supports_byte_seek()` |
`supports_time_seek` () | virtual method called by `rygel_http_get_handler_supports_time_seek()` |
`supports_playspeed` () | virtual method called by `rygel_http_get_handler_supports_playspeed()` |
`render_body` () | virtual method called by `rygel_http_get_handler_render_body()` |

## Property Details

### The `“cancellable”` property

      “cancellable”              GCancellable *

cancellable.

Flags: Read / Write