Parole Playlist Parser

## Parole Playlist Parser Parole Playlist Parser |

## Synopsis

    enum                ParolePlFormat;
    ParolePlFormat      parole_pl_parser_guess_format_from_extension
                                                            (const gchar *filename);
    ParolePlFormat      parole_pl_parser_guess_format_from_data
                                                            (const gchar *filename);
    gboolean            parole_pl_parser_can_parse_data     (const guchar *data,
                                                             gint len);
    GSList *            parole_pl_parser_parse_from_file_by_extension
                                                            (const gchar *filename);
    GSList *            parole_pl_parser_parse_all_from_file
                                                            (const gchar *filename);
    gboolean            parole_pl_parser_save_from_files    (GSList *files,
                                                             const gchar *filename,
                                                             ParolePlFormat format);

## Description

## Details

### enum ParolePlFormat

    typedef enum
    {
        PAROLE_PL_FORMAT_UNKNOWN,
        PAROLE_PL_FORMAT_M3U,
        PAROLE_PL_FORMAT_PLS,
        PAROLE_PL_FORMAT_ASX,
        PAROLE_PL_FORMAT_XSPF

    } ParolePlFormat;

### parole_pl_parser_guess_format_from_extension ()

    ParolePlFormat      parole_pl_parser_guess_format_from_extension
                                                            (const gchar *filename);

Guess a playlist format from the filename extension.

`filename` : | a filename.
Returns : | PAROLE_PL_FORMAT_UNKNOWN if unable to get the playlist format, and a valid playlist format otherwise.

Since 0.2

### parole_pl_parser_guess_format_from_data ()

    ParolePlFormat      parole_pl_parser_guess_format_from_data
                                                            (const gchar *filename);

Guess a playlist format from its data.

`filename` : | a filename.
Returns : | PAROLE_PL_FORMAT_UNKNOWN if unable to get the playlist format, and a valid playlist format otherwise.

Since 0.2

### parole_pl_parser_can_parse_data ()

    gboolean            parole_pl_parser_can_parse_data     (const guchar *data,
                                                             gint len);

Get if the Parole parser can parse from the passed data.

`data` : | data.
`len` : | length of data.
Returns : | TRUE if it can parse from the data, FALSE otherwise.

Since 0.2

### parole_pl_parser_parse_from_file_by_extension ()

    GSList *            parole_pl_parser_parse_from_file_by_extension
                                                            (const gchar *filename);

`filename` : | a filename.
Returns : | a GSList containts a list of Parolefile parsed from the playlist, or NULL if no files were parsed.

Since 0.2

### parole_pl_parser_parse_all_from_file ()

    GSList *            parole_pl_parser_parse_all_from_file
                                                            (const gchar *filename);

This function tries to parse a playlist without guessing the playlist format.

`filename` : | a filename
Returns : | a GSList containts a list of Parolefile parsed from the playlist, or NULL if no files were parsed.

Since 0.2

### parole_pl_parser_save_from_files ()

    gboolean            parole_pl_parser_save_from_files    (GSList *files,
                                                             const gchar *filename,
                                                             ParolePlFormat format);

Saves a GSList containing a list of ParoleFile files to filename.

`files` : | a GSList list of ParoleFile files.
`filename` : | a filename to save.
`format` : | a ParolePlFormat format of the playlist.
Returns : | TRUE if the playlist was saved, FALSE otherwise.

Since 0.2