Commit c14641df authored by Canek Peláez's avatar Canek Peláez
Browse files

lib/id3tag-x: Reformat header.

parent 5235748a
Loading
Loading
Loading
Loading
+86 −53
Original line number Diff line number Diff line
@@ -22,35 +22,55 @@

#include <id3tag.h>

#ifndef _ID3TAG_EXTRA_H
#define _ID3TAG_EXTRA_H
#pragma once

/**
 * Enumeration of types of picture.
 * http://id3lib.sourceforge.net/id3/id3v2.4.0-structure.txt
 */
enum id3_picture_type {
        ID3_PICTURETYPE_OTHER         = 0,  /* Other */
        ID3_PICTURETYPE_PNG32ICON     = 1,  /* 32x32 pixels 'file icon' (PNG only) */
        ID3_PICTURETYPE_OTHERICON     = 2,  /* Other file icon */
        ID3_PICTURETYPE_COVERFRONT    = 3,  /* Cover (front) */
        ID3_PICTURETYPE_COVERBACK     = 4,  /* Cover (back) */
        ID3_PICTURETYPE_LEAFLETPAGE   = 5,  /* Leaflet page */
        ID3_PICTURETYPE_MEDIA         = 6,  /* Media (e.g. lable side of CD) */
        ID3_PICTURETYPE_LEADARTIST    = 7,  /* Lead artist/lead performer/soloist */
        ID3_PICTURETYPE_ARTIST        = 8,  /* Artist/performer */
        ID3_PICTURETYPE_CONDUCTOR     = 9,  /* Conductor */
        ID3_PICTURETYPE_BAND          = 10, /* Band/Orchestra */
        ID3_PICTURETYPE_COMPOSER      = 11, /* Composer */
        ID3_PICTURETYPE_LYRICIST      = 12, /* Lyricist/text writer */
        ID3_PICTURETYPE_REC_LOCATION  = 13, /* Recording Location */
        ID3_PICTURETYPE_RECORDING     = 14, /* During recording */
        ID3_PICTURETYPE_PERFORMANCE   = 15, /* During performance */
        ID3_PICTURETYPE_VIDEO         = 16, /* Movie/video screen capture */
        ID3_PICTURETYPE_FISH          = 17, /* A bright coloured fish */
        ID3_PICTURETYPE_ILLUSTRATION  = 18, /* Illustration */
        ID3_PICTURETYPE_ARTISTLOGO    = 19, /* Band/artist logotype */
        ID3_PICTURETYPE_PUBLISHERLOGO = 20  /* Publisher/Studio logotype */
        /* Other */
        ID3_PICTURETYPE_OTHER         = 0,
        /* 32x32 pixels 'file icon' (PNG only) */
        ID3_PICTURETYPE_PNG32ICON     = 1,
        /* Other file icon */
        ID3_PICTURETYPE_OTHERICON     = 2,
        /* Cover (front) */
        ID3_PICTURETYPE_COVERFRONT    = 3,
        /* Cover (back) */
        ID3_PICTURETYPE_COVERBACK     = 4,
        /* Leaflet page */
        ID3_PICTURETYPE_LEAFLETPAGE   = 5,
        /* Media (e.g. lable side of CD) */
        ID3_PICTURETYPE_MEDIA         = 6,
        /* Lead artist/lead performer/soloist */
        ID3_PICTURETYPE_LEADARTIST    = 7,
        /* Artist/performer */
        ID3_PICTURETYPE_ARTIST        = 8,
        /* Conductor */
        ID3_PICTURETYPE_CONDUCTOR     = 9,
        /* Band/Orchestra */
        ID3_PICTURETYPE_BAND          = 10,
        /* Composer */
        ID3_PICTURETYPE_COMPOSER      = 11,
        /* Lyricist/text writer */
        ID3_PICTURETYPE_LYRICIST      = 12,
        /* Recording Location */
        ID3_PICTURETYPE_REC_LOCATION  = 13,
        /* During recording */
        ID3_PICTURETYPE_RECORDING     = 14,
        /* During performance */
        ID3_PICTURETYPE_PERFORMANCE   = 15,
        /* Movie/video screen capture */
        ID3_PICTURETYPE_VIDEO         = 16,
        /* A bright coloured fish */
        ID3_PICTURETYPE_FISH          = 17,
        /* Illustration */
        ID3_PICTURETYPE_ILLUSTRATION  = 18,
        /* Band/artist logotype */
        ID3_PICTURETYPE_ARTISTLOGO    = 19,
        /* Publisher/Studio logotype */
        ID3_PICTURETYPE_PUBLISHERLOGO = 20
};

/**
@@ -59,7 +79,8 @@ enum id3_picture_type {
 * @param id the id of the frame.
 * @return the frame with the given id, or NULL if not found.
 */
struct id3_frame*     id3_tag_search_frame               (struct id3_tag*       tag,
struct id3_frame*
id3_tag_search_frame               (struct id3_tag*       tag,
                                    const char*           id);

/**
@@ -68,7 +89,8 @@ struct id3_frame* id3_tag_search_frame (struct id3_tag*
 * @param ptype the picture type.
 * @return the frame with the given type, or NULL if not found.
 */
struct id3_frame*     id3_tag_search_picture_frame       (struct id3_tag*       tag,
struct id3_frame*
id3_tag_search_picture_frame       (struct id3_tag*       tag,
                                    enum id3_picture_type ptype);

/**
@@ -77,7 +99,8 @@ struct id3_frame* id3_tag_search_picture_frame (struct id3_tag*
 * @param id the id of the new text frame.
 * @return a newly created text frame with the given id.
 */
struct id3_frame*     id3_tag_create_text_frame          (struct id3_tag*       tag,
struct id3_frame*
id3_tag_create_text_frame          (struct id3_tag*       tag,
                                    const char*           id);

/**
@@ -86,7 +109,8 @@ struct id3_frame* id3_tag_create_text_frame (struct id3_tag*
 * @param lang the language of the new comment frame.
 * @return a newly created comment frame with the given language.
 */
struct id3_frame*     id3_tag_create_comment_frame       (struct id3_tag*       tag,
struct id3_frame*
id3_tag_create_comment_frame       (struct id3_tag*       tag,
                                    const char*           lang);

/**
@@ -95,7 +119,8 @@ struct id3_frame* id3_tag_create_comment_frame (struct id3_tag*
 * @param ptype the picture type of the new picture frame.
 * @return a newly created picture frame with the given picture type.
 */
struct id3_frame*     id3_tag_create_picture_frame       (struct id3_tag*       tag,
struct id3_frame*
id3_tag_create_picture_frame       (struct id3_tag*       tag,
                                    enum id3_picture_type ptype);

/**
@@ -103,14 +128,16 @@ struct id3_frame* id3_tag_create_picture_frame (struct id3_tag*
 * @param frame the id3 frame.
 * @return the text of the id3 frame, or NULL if the frame has no text.
 */
char*                 id3_frame_get_text                 (struct id3_frame*     frame);
char*
id3_frame_get_text                 (struct id3_frame*     frame);

/**
 * Sets the text of an id3 frame.
 * @param frame the id3 frame.
 * @param text the new text of the id3 frame.
 */
void                  id3_frame_set_text                 (struct id3_frame*     frame,
void
id3_frame_set_text                 (struct id3_frame*     frame,
                                    const char*           text);

/**
@@ -118,14 +145,16 @@ void id3_frame_set_text (struct id3_frame*
 * @param frame the id3 frame.
 * @return the comment text of the id3 frame, or NULL if the frame is not text.
 */
char*                 id3_frame_get_comment_text         (struct id3_frame*     frame);
char*
id3_frame_get_comment_text         (struct id3_frame*     frame);

/**
 * Sets the comment text of an id3 frame.
 * @param frame the id3 frame.
 * @param text the new comment text of the id3 frame.
 */
void                  id3_frame_set_comment_text         (struct id3_frame*     frame,
void
id3_frame_set_comment_text         (struct id3_frame*     frame,
                                    const char*           text);

/**
@@ -135,7 +164,8 @@ void id3_frame_set_comment_text (struct id3_frame*
 * @param[out] length the picture data length.
 * @return the picture data, or NULL if there is no picture data.
 */
unsigned char*        id3_frame_get_picture              (struct id3_frame*     frame,
unsigned char*
id3_frame_get_picture              (struct id3_frame*     frame,
                                    enum id3_picture_type ptype,
                                    int*                  length);

@@ -145,7 +175,8 @@ unsigned char* id3_frame_get_picture (struct id3_frame*
 * @param bytes the new picture data.
 * @param length the new picture data length.
 */
void                  id3_frame_set_picture              (struct id3_frame*     frame,
void
id3_frame_set_picture              (struct id3_frame*     frame,
                                    unsigned char*        bytes,
                                    unsigned int          length,
                                    const char*           desc);
@@ -155,14 +186,16 @@ void id3_frame_set_picture (struct id3_frame*
 * @param frame the id3 frame.
 * @return the picture description, or NULL if there is no picture description.
 */
char*                 id3_frame_get_picture_description  (struct id3_frame*     frame);
char*
id3_frame_get_picture_description  (struct id3_frame*     frame);

/**
 * Sets the picture description of an id3 frame.
 * @param frame the id3 frame.
 * @param desc the new picture description.
 */
void                  id3_frame_set_picture_description  (struct id3_frame*     frame,
void
id3_frame_set_picture_description  (struct id3_frame*     frame,
                                    const char*           desc);

/**
@@ -170,13 +203,13 @@ void id3_frame_set_picture_description (struct id3_frame*
 * @param frame the id3 frame.
 * @return the binary data of an id3 frame, or NULL if there is no binary data.
 */
union id3_field*      id3_frame_get_binary_data          (struct id3_frame*     frame);
union id3_field*
id3_frame_get_binary_data          (struct id3_frame*     frame);

/**
 * Returns the picture type of an id3 frame.
 * @param frame the id3 frame.
 * @return the picture type of the frame.
 */
enum id3_picture_type id3_frame_get_picture_type         (struct id3_frame*     frame);

#endif /* _ID3TAG_EXTRA_H */
enum id3_picture_type
id3_frame_get_picture_type         (struct id3_frame*     frame);