RygelPlaySpeed: librygel-server Reference Manual

## RygelPlaySpeed RygelPlaySpeed — This is a container for a PlaySpeed value. |

## Functions

#define | RYGEL_TYPE_PLAY_SPEED
gboolean | rygel_play_speed_equals ()
gboolean | rygel_play_speed_is_positive ()
gboolean | rygel_play_speed_is_normal_rate ()
gchar * | rygel_play_speed_to_string ()
gfloat | rygel_play_speed_to_float ()
gdouble | rygel_play_speed_to_double ()
RygelPlaySpeed * | rygel_play_speed_new ()
RygelPlaySpeed * | rygel_play_speed_new_from_string ()
gpointer | rygel_play_speed_ref ()
void | rygel_play_speed_unref ()
GParamSpec * | rygel_param_spec_play_speed ()
void | rygel_value_set_play_speed ()
gpointer | rygel_value_get_play_speed ()
void | rygel_value_take_play_speed ()

## Types and Values

struct | RygelPlaySpeed
struct | RygelPlaySpeedClass

## Object Hierarchy

        RygelPlaySpeed

## Description

A Playspeed can be positive or negative whole numbers or fractions. e.g. "2". "1/2", "-1/4"

## Functions

### RYGEL_TYPE_PLAY_SPEED

    #define RYGEL_TYPE_PLAY_SPEED (rygel_play_speed_get_type ())

The type for RygelPlaySpeed.

### rygel_play_speed_equals ()

    gboolean
    rygel_play_speed_equals (RygelPlaySpeed *self,
                             RygelPlaySpeed *that);

#### Parameters

self | the RygelPlaySpeed instance |
that |  |

### rygel_play_speed_is_positive ()

    gboolean
    rygel_play_speed_is_positive (RygelPlaySpeed *self);

#### Parameters

self | the RygelPlaySpeed instance |

### rygel_play_speed_is_normal_rate ()

    gboolean
    rygel_play_speed_is_normal_rate (RygelPlaySpeed *self);

#### Parameters

self | the RygelPlaySpeed instance |

### rygel_play_speed_to_string ()

    gchar *
    rygel_play_speed_to_string (RygelPlaySpeed *self);

#### Parameters

self | the RygelPlaySpeed instance |

### rygel_play_speed_to_float ()

    gfloat
    rygel_play_speed_to_float (RygelPlaySpeed *self);

#### Parameters

self | the RygelPlaySpeed instance |

### rygel_play_speed_to_double ()

    gdouble
    rygel_play_speed_to_double (RygelPlaySpeed *self);

#### Parameters

self | the RygelPlaySpeed instance |

### rygel_play_speed_new ()

    RygelPlaySpeed *
    rygel_play_speed_new (gint numerator,
                          guint denominator);

#### Parameters

numerator |  |
denominator |  |

### rygel_play_speed_new_from_string ()

    RygelPlaySpeed *
    rygel_play_speed_new_from_string (const gchar *speed,
                                      GError **error);

#### Parameters

speed |  |
error | location to store the error occuring, or `NULL` to ignore. | [error-domains RygelPlaySpeedError]

### rygel_play_speed_ref ()

    gpointer
    rygel_play_speed_ref (gpointer instance);

Increases the reference count of `object` .

#### Parameters

instance | a RygelPlaySpeed. |

#### Returns

the same `object`

### rygel_play_speed_unref ()

    void
    rygel_play_speed_unref (gpointer instance);

Decreases the reference count of `object` . When its reference count drops to 0, the object is finalized (i.e. its memory is freed).

#### Parameters

instance | a RygelPlaySpeed. |

### rygel_param_spec_play_speed ()

    GParamSpec *
    rygel_param_spec_play_speed (const gchar *name,
                                 const gchar *nick,
                                 const gchar *blurb,
                                 GType object_type,
                                 GParamFlags flags);

Creates a new GParamSpecBoxed instance specifying a `RYGEL_TYPE_PLAY_SPEED` derived property.

See ``g_param_spec_internal()`` for details on property names.

#### Parameters

name | canonical name of the property specified |
nick | nick name for the property specified |
blurb | description of the property specified |
object_type | `RYGEL_TYPE_PLAY_SPEED` derived type of this property |
flags | flags for the property specified |

### rygel_value_set_play_speed ()

    void
    rygel_value_set_play_speed (GValue *value,
                                gpointer v_object);

Set the contents of a `RYGEL_TYPE_PLAY_SPEED` derived GValue to `v_object` .

`rygel_value_set_play_speed()` increases the reference count of `v_object` (the GValue holds a reference to `v_object`). If you do not wish to increase the reference count of the object (i.e. you wish to pass your current reference to the GValue because you no longer need it), use `rygel_value_take_play_speed()` instead.

It is important that your GValue holds a reference to `v_object` (either its own, or one it has taken) to ensure that the object won't be destroyed while the GValue still exists).

#### Parameters

value | a valid GValue of `RYGEL_TYPE_PLAY_SPEED` derived type |
v_object | object value to be set |

### rygel_value_get_play_speed ()

    gpointer
    rygel_value_get_play_speed (const GValue *value);

Get the contents of a `RYGEL_TYPE_PLAY_SPEED` derived GValue.

#### Parameters

value | a valid GValue of `RYGEL_TYPE_PLAY_SPEED` derived type |

#### Returns

object contents of `value`

### rygel_value_take_play_speed ()

    void
    rygel_value_take_play_speed (GValue *value,
                                 gpointer v_object);

Sets the contents of a `RYGEL_TYPE_PLAY_SPEED` derived GValue to `v_object` and takes over the ownership of the callers reference to `v_object` ; the caller doesn't have to unref it any more (i.e. the reference count of the object is not increased).

If you want the GValue to hold its own reference to `v_object` , use `rygel_value_set_play_speed()` instead.

#### Parameters

value | a valid GValue of `RYGEL_TYPE_PLAY_SPEED` derived type |
v_object | object value to be set |

## Types and Values

### struct RygelPlaySpeed

    struct RygelPlaySpeed;

This is a container for a PlaySpeed value.

A Playspeed can be positive or negative whole numbers or fractions. e.g. "2". "1/2", "-1/4"

### struct RygelPlaySpeedClass

    struct RygelPlaySpeedClass {
    	GTypeClass parent_class;
    	void (*finalize) (RygelPlaySpeed *self);
    };

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

#### Members

GTypeClass `parent_class`; | the parent class structure |
`finalize` () |  |