parole-pl-parser: Parole Plugins Reference Manual

## parole-pl-parser parole-pl-parser |

## Functions

ParolePlFormat | parole_pl_parser_guess_format_from_extension ()
ParolePlFormat | parole_pl_parser_guess_format_from_data ()
gboolean | parole_pl_parser_can_parse_data ()
GSList * | parole_pl_parser_parse_from_file_by_extension ()
GSList * | parole_pl_parser_parse_all_from_file ()
gboolean | parole_pl_parser_save_from_files ()

## Types and Values

enum | ParolePlFormat

## Description

## Functions

### 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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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);

Parse a playlist into a series of ParoleFile

#### Parameters

filename | a filename |

#### Returns

a GSList containing 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.

#### Parameters

filename | a filename |

#### Returns

a GSList containing 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.

#### Parameters

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

## Types and Values

### enum ParolePlFormat

Parole Playlist Formats.

#### Members

PAROLE_PL_FORMAT_UNKNOWN | Unknown format |
PAROLE_PL_FORMAT_M3U | M3U format |
PAROLE_PL_FORMAT_PLS | PLS format |
PAROLE_PL_FORMAT_ASX | ASX format |
PAROLE_PL_FORMAT_XSPF | XSPF format |