mplib_paas.c File Reference

#include <errno.h>
#include <stdio.h>
#include <fcntl.h>
#include "mplib.h"
#include "xmalloc.h"

Go to the source code of this file.

Functions

id3_text_contentmp_parse_artist (const id3_content *content)
 Parses the artist field.
id3_text_contentmp_parse_title (const id3_content *content)
 Parses the title field.
id3_text_contentmp_parse_album (const id3_content *content)
 Parses the album field.
id3_text_contentmp_parse_year (const id3_content *content)
 Parses the year field.
id3_text_contentmp_parse_genre (const id3_content *content)
 Parses the genre field.
id3_text_contentmp_parse_track (const id3_content *content)
 Parses the track field.
id3_comment_contentmp_parse_comment (const id3_content *content)
 Parses the comment field.
id3_text_contentmp_parse_text (const id3_content *content)
 Generic function for parsing text fields.
id3_contentmp_assemble_artist_content (const char *text, id3_encoding enc)
id3_contentmp_assemble_title_content (const char *text, id3_encoding enc)
id3_contentmp_assemble_album_content (const char *text, id3_encoding enc)
id3_contentmp_assemble_year_content (const char *text, id3_encoding enc)
id3_contentmp_assemble_genre_content (const char *text, id3_encoding enc)
id3_contentmp_assemble_text_content (const char *text, id3_encoding enc)
 Assembles content from a comont text content.
id3_contentmp_assemble_comment_content (const char *text, const char *short_descr, id3_encoding enc, const char *lang)
 Assembles content from a comment.


Function Documentation

id3_content* mp_assemble_album_content const char *  text,
id3_encoding  enc
 

Definition at line 213 of file mplib_paas.c.

id3_content* mp_assemble_artist_content const char *  text,
id3_encoding  enc
 

Definition at line 201 of file mplib_paas.c.

id3_content* mp_assemble_comment_content const char *  text,
const char *  descr,
id3_encoding  enc,
const char *  lang
 

Assembles content from a comment.

Parameters:
text the text
descr a short describtion to the text (NULL)
enc the texts encoding
lang the comments language (NULL)
Returns:
A pointer to a new initialized content structure

Definition at line 247 of file mplib_paas.c.

id3_content* mp_assemble_genre_content const char *  text,
id3_encoding  enc
 

Definition at line 225 of file mplib_paas.c.

id3_content* mp_assemble_text_content const char *  text,
id3_encoding  enc
 

Assembles content from a comont text content.

Parameters:
text the text
enc the texts encoding (NULL)
Returns:
A pointer to a new initialized content structure

Definition at line 231 of file mplib_paas.c.

id3_content* mp_assemble_title_content const char *  text,
id3_encoding  enc
 

Definition at line 207 of file mplib_paas.c.

id3_content* mp_assemble_year_content const char *  text,
id3_encoding  enc
 

Definition at line 219 of file mplib_paas.c.

id3_text_content* mp_parse_album const id3_content content  ) 
 

Parses the album field.

On NULL: errno set to the following values

  • MP_EERROR - General failure: may occure on wrong usage, but should never happen
  • MP_EFENCR - The value for this field has been encrypted and can thus not be retrieved
  • MP_EFCOMPR - The value for this field has been compressed and can thus not be retrieved

Parameters:
content the content to parse
Returns:
A pointer to a new initialized structure suitable for the content or NULL

Definition at line 75 of file mplib_paas.c.

id3_text_content* mp_parse_artist const id3_content content  ) 
 

Parses the artist field.

On NULL: errno set to the following values

  • MP_EERROR - General failure: may occure on wrong usage, but should never happen
  • MP_EFENCR - The value for this field has been encrypted and can thus not be retrieved
  • MP_EFCOMPR - The value for this field has been compressed and can thus not be retrieved

Parameters:
content the content to parse
Returns:
A pointer to a new initialized structure suitable for the content or NULL

Definition at line 63 of file mplib_paas.c.

id3_comment_content* mp_parse_comment const id3_content content  ) 
 

Parses the comment field.

On NULL: errno set to the following values

  • MP_EERROR - General failure: may occure on wrong usage, but should never happen
  • MP_EFENCR - The value for this field has been encrypted and can thus not be retrieved
  • MP_EFCOMPR - The value for this field has been compressed and can thus not be retrieved

Parameters:
content the content to parse
Returns:
A pointer to a new initialized structure suitable for the content or NULL

Definition at line 99 of file mplib_paas.c.

id3_text_content* mp_parse_genre const id3_content content  ) 
 

Parses the genre field.

On NULL: errno set to the following values

  • MP_EERROR - General failure: may occure on wrong usage, but should never happen
  • MP_EFENCR - The value for this field has been encrypted and can thus not be retrieved
  • MP_EFCOMPR - The value for this field has been compressed and can thus not be retrieved

Parameters:
content the content to parse
Returns:
A pointer to a new initialized structure suitable for the content or NULL

Definition at line 87 of file mplib_paas.c.

id3_text_content* mp_parse_text const id3_content content  ) 
 

Generic function for parsing text fields.

On NULL: errno set to the following values

  • MP_EERROR - General failure: may occure on wrong usage, but should never happen
  • MP_EFENCR - The value for this field has been encrypted and can thus not be retrieved
  • MP_EFCOMPR - The value for this field has been compressed and can thus not be retrieved

Parameters:
content the content to parse
Returns:
A pointer to a new initialized structure suitable for the content or NULL

Definition at line 162 of file mplib_paas.c.

id3_text_content* mp_parse_title const id3_content content  ) 
 

Parses the title field.

On NULL: errno set to the following values

  • MP_EERROR - General failure: may occure on wrong usage, but should never happen
  • MP_EFENCR - The value for this field has been encrypted and can thus not be retrieved
  • MP_EFCOMPR - The value for this field has been compressed and can thus not be retrieved

Parameters:
content the content to parse
Returns:
A pointer to a new initialized structure suitable for the content or NULL

Definition at line 69 of file mplib_paas.c.

id3_text_content* mp_parse_track const id3_content content  ) 
 

Parses the track field.

On NULL: errno set to the following values

  • MP_EERROR - General failure: may occure on wrong usage, but should never happen
  • MP_EFENCR - The value for this field has been encrypted and can thus not be retrieved
  • MP_EFCOMPR - The value for this field has been compressed and can thus not be retrieved

Parameters:
content the content to parse
Returns:
A pointer to a new initialized structure suitable for the content or NULL

Definition at line 93 of file mplib_paas.c.

id3_text_content* mp_parse_year const id3_content content  ) 
 

Parses the year field.

On NULL: errno set to the following values

  • MP_EERROR - General failure: may occure on wrong usage, but should never happen
  • MP_EFENCR - The value for this field has been encrypted and can thus not be retrieved
  • MP_EFCOMPR - The value for this field has been compressed and can thus not be retrieved

Parameters:
content the content to parse
Returns:
A pointer to a new initialized structure suitable for the content or NULL

Definition at line 81 of file mplib_paas.c.