Commits

shuerhaaken committed 6d7417e

C documentation

Comments (0)

Files changed (3)

bindings/c/taginfo_c.cc

 //! Set the original artist of a media track.
 //! \param info A TagInfo_Info object
 /*!
-\param original_artist Original artist as const char *.
+\param artist Original artist as const char *.
 */
 void taginfo_info_set_original_artist (TagInfo_Info *info, const char *artist) {
     Info *i = reinterpret_cast<Info *>(info);
 }
 //! Set an array of user defined artist labels.
 /*!
+\param info A TagInfo_Info object
 \param labels An array of user defined artist labels
 \param labels_length The length of the array
 */
 //! Set an array of TagInfo_Image to be embedded into the media file.
 /*!
 \param info A TagInfo_Info object
-\param labels An array of TagInfo_Image
+\param images An array of TagInfo_Image
 \param image_count The length of the TagInfo_Image array
 */
 void taginfo_info_set_images(TagInfo_Info *info,
     i->set_images(img_list);
 }
 
-
+//! Constructor function for new TagInfo_Image
+//! \return Newly created TagInfo_Image 
 TagInfo_Image * taginfo_image_new() {
     Image * i = new Image();
     return reinterpret_cast<TagInfo_Image *>(i);
 }
 
+//! Get the binary data of the image.
+/*!
+\param img A TagInfo_Image object
+\param bin_data_length The return location for the length of the returned array.
+\return Array of bytes
+*/
 char * taginfo_image_get_data(const TagInfo_Image * img, unsigned int * bin_data_length) {
     if(!img)
         return NULL;
     return i->get_data(*bin_data_length);
 }
 
+//! Set the binary data of the image.
+/*!
+\param img A TagInfo_Image object
+\param bin_data Array of bytes
+\param bin_data_length The length of the data array.
+*/
 void taginfo_image_set_data(TagInfo_Image * img, char * bin_data, unsigned int bin_data_length) {
     if(!img || bin_data_length <= 0)
         return;
     i->set_data(bin_data, bin_data_length);
 }
 
+//! Get the content's type of the image.
+/*!
+\param img A TagInfo_Image object
+\return image type as TagInfo_ImageType
+*/
 TagInfo_ImageType taginfo_image_get_image_type(const TagInfo_Image * img) {
     if(!img)
         return TAG_INFO_IMAGE_TYPE_OTHER;
     return static_cast<TagInfo_ImageType>(i->get_image_type());
 }
 
+//! Set the content's type of the image.
+/*!
+\param img A TagInfo_Image object
+\param itype image type as TagInfo_ImageType
+*/
 void taginfo_image_set_image_type(TagInfo_Image * img, TagInfo_ImageType itype) {
     if(!img)
         return;
     i->set_image_type(static_cast<ImageType>(itype));
 }
 
+//! Get the file's type of the image.
+/*!
+\param img A TagInfo_Image object
+\return image type as TagInfo_ImageFileType
+*/
 TagInfo_ImageFileType taginfo_image_get_image_file_type(const TagInfo_Image * img) {
     if(!img)
         return TAG_INFO_IMAGE_FILE_TYPE_UNKNOWN;
     return static_cast<TagInfo_ImageFileType>(i->get_image_file_type());
 }
 
+//! Set the file's type of the image.
+/*!
+\param img A TagInfo_Image object
+\param image_f_type image type as TagInfo_ImageFileType
+*/
 void taginfo_image_set_image_file_type(TagInfo_Image * img, TagInfo_ImageFileType image_f_type) {
     if(!img)
         return;
     i->set_image_file_type(static_cast<ImageFileType>(image_f_type));
 }
 
+//! Get the file's type of the image.
+/*!
+\param img A TagInfo_Image object
+\return description as char*
+*/
 char * taginfo_image_get_description(const TagInfo_Image * img) {
     if(!img)
         return NULL;
     return ::strdup(i->get_description().toCString(false));
 }
 
+//! Set the file's type of the image.
+/*!
+\param img A TagInfo_Image object
+\param new_description as const char*. Will be copied internally
+*/
 void taginfo_image_set_description(TagInfo_Image * img, const char * new_description) {
     if(!img)
         return;

libtaginfo/image.cc

 
 using namespace TagInfo;
 
-
+//! Constructor
 Image::Image() {
     image_type      = IMAGE_TYPE_OTHER;
     image_file_type = IMAGE_FILE_TYPE_UNKNOWN;
     description     = String::null;
 }
 
+//! Destructor
 Image::~Image() {
 }
 
+//! Get the image binary data from the Image object.
+//! \return ByteVector with image data
 const ByteVector Image::get_data() const {
     return bytes;
 }
 
+//! Get the image binary data from the Image object.
+//! \param image_data_length Return locatio for the length of the returned data array 
+//! \return char * with image data
 char * Image::get_data(uint &image_data_length) const {
     image_data_length = bytes.size();
     char * idat = new char[bytes.size()];
     return idat;
 }
 
+//! Set the image binary data in the Image object.
+//! \param image_data ByteVector with image data
 void Image::set_data(const ByteVector &image_data) {
     bytes = image_data;
 }
 
+//! Set the image binary data in the Image object.
+//! \param image_data_length length of the data array 
+//! \param image_data Image binary data
 void Image::set_data(const char * image_data, const uint image_data_length) {
     ByteVector v(image_data, image_data_length);
     bytes = v;
 }
 
+//! Get the image content's type from the Image object.
+//! \return type as ImageType
 ImageType Image::get_image_type(void) const {
     return image_type;
 }
+//! Set the image content's type in the Image object.
+//! \param it as ImageType
 void Image::set_image_type(const ImageType it) {
     image_type = it;
 }
 
+//! Get the image file's type from the Image object.
+//! \return type as ImageFileType
 ImageFileType Image::get_image_file_type(void) const {
     return image_file_type;
 }
+//! Set the image file's type in the Image object.
+//! \param ft as ImageFileType
 void Image::set_image_file_type(const ImageFileType ft) {
     image_file_type = ft;
 }
 
+//! Get the image file's description from the Image object.
+//! \return Description as String
 const String Image::get_description(void) const {
-    if(description == String::null)
-        return String();
+    /*if(description == String::null)
+        return String();*/
     return description;
 }
+//! Set the image file's description in the Image object.
+//! \param new_description as String
 void Image::set_description(const String &new_description) {
     description = new_description;
 }

libtaginfo/info.cc

 }
 
 //! Get an array of images from the Info object.
-//! After this function was called, \param image_count will 
-//! hold the number of images in the returend array.
 //! The ownership of the images is on the caller side. You have
 //! to destroy all the images in the retured array 
-//! \return Array of Image
+//! \return TagLib::List with images
 ImageList Info::get_images() const {
     return ImageList();
 }