daap-record

## daap-record daap-record |

## Synopsis

    #define             TYPE_DAAP_RECORD
    #define             DAAP_RECORD                         (o)
    #define             IS_DAAP_RECORD                      (o)
    #define             DAAP_RECORD_GET_INTERFACE           (o)
                        DAAPRecord;
                        DAAPRecordInterface;
    GType               daap_record_get_type                (void);
    gboolean            daap_record_itunes_compat           (DAAPRecord *record);
    GInputStream *      daap_record_read                    (DAAPRecord *record,
                                                             GError **err);
    gint                daap_record_cmp_by_album            (gpointer a,
                                                             gpointer b,
                                                             DMAPDb *db);

## Object Hierarchy

      GInterface
       +----DAAPRecord

## Properties

      "bitrate"                  gint                  : Read / Write
      "disc"                     gint                  : Read / Write
      "duration"                 gint                  : Read / Write
      "filesize"                 guint64               : Read / Write
      "firstseen"                gint                  : Read / Write
      "format"                   gchar*                : Read / Write
      "has-video"                gboolean              : Read / Write
      "location"                 gchar*                : Read / Write
      "mediakind"                gint                  : Read / Write
      "mtime"                    gint                  : Read / Write
      "rating"                   gint                  : Read / Write
      "songalbum"                gchar*                : Read / Write
      "songalbumid"              gint64                : Read / Write
      "songartist"               gchar*                : Read / Write
      "songgenre"                gchar*                : Read / Write
      "sort-album"               gchar*                : Read / Write
      "sort-artist"              gchar*                : Read / Write
      "title"                    gchar*                : Read / Write
      "track"                    gint                  : Read / Write
      "year"                     gint                  : Read / Write

## Description

## Details

### TYPE_DAAP_RECORD

    #define TYPE_DAAP_RECORD	     (daap_record_get_type ())

The type for DAAPRecord.

### DAAP_RECORD()

    #define             DAAP_RECORD(o)

Casts a DAAPRecord or derived pointer into a (DAAPRecord *) pointer. Depending on the current debugging level, this function may invoke certain runtime checks to identify invalid casts.

`o` : | Object which is subject to casting.

### IS_DAAP_RECORD()

    #define             IS_DAAP_RECORD(o)

Checks whether a valid GTypeInstance pointer is of type `TYPE_DAAP_RECORD`.

`o` : | Instance to check for being a `TYPE_DAAP_RECORD`.

### DAAP_RECORD_GET_INTERFACE()

    #define             DAAP_RECORD_GET_INTERFACE(o)

Get the class structure associated to a DAAPRecord instance.

`o` : | a DAAPRecord instance.
Returns : | pointer to object interface structure.

### DAAPRecord

    typedef struct _DAAPRecord DAAPRecord;

### DAAPRecordInterface

    typedef struct {
    	GTypeInterface parent;

    	gboolean (*itunes_compat) (DAAPRecord *record);
    	GInputStream * (*read)	         (DAAPRecord *record, GError **err);
    } DAAPRecordInterface;

### daap_record_get_type ()

    GType               daap_record_get_type                (void);

Returns : |

### daap_record_itunes_compat ()

    gboolean            daap_record_itunes_compat           (DAAPRecord *record);

`record` : | A DAAPRecord.
Returns : | TRUE if record is compatible with iTunes, else FALSE.

### daap_record_read ()

    GInputStream *      daap_record_read                    (DAAPRecord *record,
                                                             GError **err);

`record` : | a DAAPRecord.
`err` : | a GError.
Returns : | A GInputStream that provides read-only access to the data stream associated with record.

### daap_record_cmp_by_album ()

    gint                daap_record_cmp_by_album            (gpointer a,
                                                             gpointer b,
                                                             DMAPDb *db);

Compares the two records associated with the provided keys according to album. Suitable to sort lists of albums.

`a` : | first ID.
`b` : | second ID.
`db` : | A DMAPDb for which a and b are valid ID's.
Returns : |

## Property Details

### The `"bitrate"` property

      "bitrate"                  gint                  : Read / Write

Song data bitrate in Kb/s.

Allowed values: >= 0

Default value: 0

### The `"disc"` property

      "disc"                     gint                  : Read / Write

Song disc number.

Allowed values: >= 0

Default value: 0

### The `"duration"` property

      "duration"                 gint                  : Read / Write

Song duration in seconds.

Allowed values: >= 0

Default value: 0

### The `"filesize"` property

      "filesize"                 guint64               : Read / Write

Song data size in bytes.

Allowed values: <= 2147483647

Default value: 0

### The `"firstseen"` property

      "firstseen"                gint                  : Read / Write

FIXME.

Allowed values: >= 0

Default value: 0

### The `"format"` property

      "format"                   gchar*                : Read / Write

Song data format.

Default value: "Unknown"

### The `"has-video"` property

      "has-video"                gboolean              : Read / Write

Song has video component.

Default value: FALSE

### The `"location"` property

      "location"                 gchar*                : Read / Write

URI pointing to song data.

Default value: NULL

### The `"mediakind"` property

      "mediakind"                gint                  : Read / Write

Media kind.

Allowed values: >= 0

Default value: 1

### The `"mtime"` property

      "mtime"                    gint                  : Read / Write

Song modification time.

Allowed values: >= 0

Default value: 0

### The `"rating"` property

      "rating"                   gint                  : Read / Write

Song rating.

Allowed values: [0,5]

Default value: 0

### The `"songalbum"` property

      "songalbum"                gchar*                : Read / Write

Album name.

Default value: "Unknown"

### The `"songalbumid"` property

      "songalbumid"              gint64                : Read / Write

Album id.

Default value: 0

### The `"songartist"` property

      "songartist"               gchar*                : Read / Write

Song artist.

Default value: "Unknown"

### The `"songgenre"` property

      "songgenre"                gchar*                : Read / Write

Song genre.

Default value: "Unknown"

### The `"sort-album"` property

      "sort-album"               gchar*                : Read / Write

Album sort name.

Default value: "Unknown"

### The `"sort-artist"` property

      "sort-artist"              gchar*                : Read / Write

Song artist sort name.

Default value: "Unknown"

### The `"title"` property

      "title"                    gchar*                : Read / Write

Song title.

Default value: "Unknown"

### The `"track"` property

      "track"                    gint                  : Read / Write

Song track number.

Allowed values: >= 0

Default value: 0

### The `"year"` property

      "year"                     gint                  : Read / Write

Song publication year.

Allowed values: >= 0

Default value: 0