libcoverart: caa_c.h File Reference

libcoverart 1.0.0

Loading...
Searching...
No Matches
caa_c.h File Reference

Go to the source code of this file.

## Typedefs
typedef void * | CaaCoverArt
typedef void * | CaaImage
typedef void * | CaaReleaseInfo
typedef void * | CaaThumbnails
typedef void * | CaaType
typedef void * | CaaImageList
typedef void * | CaaTypeList
typedef void * | CaaImageData

## Enumerations
enum | tImageSize { eSize_Full =0 , eSize_250 =250 , eSize_500 =500 }
enum | tCoverArtResult { eCoverArt_Success =0 , eCoverArt_ConnectionError , eCoverArt_Timeout , eCoverArt_AuthenticationError , eCoverArt_FetchError , eCoverArt_RequestError , eCoverArt_ResourceNotFound }

## Functions
void | caa_coverart_delete (CaaCoverArt CoverArt)
| Delete a CaaCoverArt object.
CaaCoverArt | caa_coverart_clone (CaaCoverArt CoverArt)
| Clone a CaaCoverArt object.
int | caa_coverart_get_lasthttpcode (CaaCoverArt CoverArt)
int | caa_coverart_get_lasterrormessage (CaaCoverArt CoverArt, char *str, int len)
int | caa_coverart_get_version (CaaCoverArt CoverArt, char *str, int len)
CaaCoverArt | caa_coverart_new (const char *UserAgent)
| Create a new instance of CaaCoverArt.
void | caa_coverart_set_proxyhost (CaaCoverArt CoverArt, const char *ProxyHost)
| Set the proxy server.
void | caa_coverart_set_proxyport (CaaCoverArt CoverArt, int ProxyPort)
| Set the port to use on the proxy server.
void | caa_coverart_set_proxyusername (CaaCoverArt CoverArt, const char *ProxyUserName)
| Set the username to use to authenticate to the proxy server.
void | caa_coverart_set_proxypassword (CaaCoverArt CoverArt, const char *ProxyPassword)
| Set the password to use to authenticate to the proxy server.
CaaImageData | caa_coverart_fetch_front (CaaCoverArt CoverArt, const char *ReleaseID)
| Request the front image for a release.
CaaImageData | caa_coverart_fetch_back (CaaCoverArt CoverArt, const char *ReleaseID)
| Request the back image for a release.
CaaImageData | caa_coverart_fetch_image (CaaCoverArt CoverArt, const char *ReleaseID, const char *ImageID, tImageSize ImageSize)
| Request a specific image for a release.
CaaReleaseInfo | caa_coverart_releaseinfo (CaaCoverArt CoverArt, const char *ReleaseID)
| Request all information about a release.
tCoverArtResult | caa_coverart_get_lastresult (CaaCoverArt CoverArt)
void | caa_image_delete (CaaImage Image)
| Delete a CaaImage object.
CaaImage | caa_image_clone (CaaImage Image)
| Clone a CaaImage object.
int | caa_image_get_approved (CaaImage Image)
int | caa_image_get_back (CaaImage Image)
int | caa_image_get_comment (CaaImage Image, char *str, int len)
int | caa_image_get_edit (CaaImage Image)
int | caa_image_get_front (CaaImage Image)
int | caa_image_get_id (CaaImage Image, char *str, int len)
int | caa_image_get_image (CaaImage Image, char *str, int len)
CaaThumbnails | caa_image_get_thumbnails (CaaImage Image)
CaaTypeList | caa_image_get_typelist (CaaImage Image)
void | caa_imagedata_delete (CaaImageData ImageData)
| Delete a CaaImageData object.
CaaImageData | caa_imagedata_clone (CaaImageData ImageData)
| Clone a CaaImageData object.
int | caa_imagedata_size (CaaImageData ImageData)
| Return the number of bytes in a CaaImageData object.
unsigned char * | caa_imagedata_data (CaaImageData ImageData)
| Return the data in a CaaImageData object.
void | caa_releaseinfo_delete (CaaReleaseInfo ReleaseInfo)
| Delete a CaaReleaseInfo object.
CaaReleaseInfo | caa_releaseinfo_clone (CaaReleaseInfo ReleaseInfo)
| Clone a CaaReleaseInfo object.
int | caa_releaseinfo_get_release (CaaReleaseInfo ReleaseInfo, char *str, int len)
CaaImageList | caa_releaseinfo_get_imagelist (CaaReleaseInfo ReleaseInfo)
void | caa_thumbnails_delete (CaaThumbnails Thumbnails)
| Delete a CaaThumbnails object.
CaaThumbnails | caa_thumbnails_clone (CaaThumbnails Thumbnails)
| Clone a CaaThumbnails object.
int | caa_thumbnails_get_large (CaaThumbnails Thumbnails, char *str, int len)
int | caa_thumbnails_get_small (CaaThumbnails Thumbnails, char *str, int len)
void | caa_type_delete (CaaType Type)
| Delete a CaaType object.
CaaType | caa_type_clone (CaaType Type)
| Clone a CaaType object.
int | caa_type_get_type (CaaType Type, char *str, int len)
void | caa_image_list_delete (CaaImageList List)
| Delete a CaaImageList.
int | caa_image_list_size (CaaImageList List)
| Return the number of entries in a CaaImageList.
CaaImage | caa_image_list_item (CaaImageList List, int Item)
| Returns an entry from a CaaImageList.
int | caa_image_list_get_count (CaaImageList List)
| Return the count of entries in an CaaImageList.
int | caa_image_list_get_offset (CaaImageList List)
| Return the offset of entries in an CaaImageList.
CaaImageList | caa_image_list_clone (CaaImageList ImageList)
| Clone an CaaImageList object.
void | caa_type_list_delete (CaaTypeList List)
| Delete a CaaTypeList.
int | caa_type_list_size (CaaTypeList List)
| Return the number of entries in a CaaTypeList.
CaaType | caa_type_list_item (CaaTypeList List, int Item)
| Returns an entry from a CaaTypeList.
int | caa_type_list_get_count (CaaTypeList List)
| Return the count of entries in an CaaTypeList.
int | caa_type_list_get_offset (CaaTypeList List)
| Return the offset of entries in an CaaTypeList.
CaaTypeList | caa_type_list_clone (CaaTypeList TypeList)
| Clone an CaaTypeList object.

## Typedef Documentation

## ◆ CaaCoverArt

typedef void* CaaCoverArt

## ◆ CaaImage

typedef void* CaaImage

## ◆ CaaImageData

typedef void* CaaImageData

## ◆ CaaImageList

typedef void* CaaImageList

## ◆ CaaReleaseInfo

typedef void* CaaReleaseInfo

## ◆ CaaThumbnails

typedef void* CaaThumbnails

## ◆ CaaType

typedef void* CaaType

## ◆ CaaTypeList

typedef void* CaaTypeList

## Enumeration Type Documentation

## ◆ tCoverArtResult

enum tCoverArtResult

See also
  CoverArtArchive::CCoverArt::tCoverArtResult

Enumerator
eCoverArt_Success |
eCoverArt_ConnectionError |
eCoverArt_Timeout |
eCoverArt_AuthenticationError |
eCoverArt_FetchError |
eCoverArt_RequestError |
eCoverArt_ResourceNotFound |

## ◆ tImageSize

enum tImageSize

Enumerator
eSize_Full |
eSize_250 |
eSize_500 |

## Function Documentation

## ◆ caa_coverart_clone()

CaaCoverArt caa_coverart_clone | ( | CaaCoverArt | CoverArt | ) |

Parameters

  CoverArt | Object to clone

Returns
  Cloned object. This object must be deleted once finished with.

## ◆ caa_coverart_delete()

void caa_coverart_delete | ( | CaaCoverArt | CoverArt | ) |

Parameters

  CoverArt | Object to delete

## ◆ caa_coverart_fetch_back()

CaaImageData caa_coverart_fetch_back | ( | CaaCoverArt | CoverArt,
|  | const char * | ReleaseID )

See also
  CoverArtArchive::CCoverArt::FetchBack

Parameters

  CoverArt | CaaCoverArt object
  ReleaseID | The release ID

Returns
  The downloaded image. This object must be deleted once finished with.

## ◆ caa_coverart_fetch_front()

CaaImageData caa_coverart_fetch_front | ( | CaaCoverArt | CoverArt,
|  | const char * | ReleaseID )

See also
  CoverArtArchive::CCoverArt::FetchFront

Parameters

  CoverArt | CaaCoverArt object
  ReleaseID | The release ID

Returns
  The downloaded image. This object must be deleted once finished with.

## ◆ caa_coverart_fetch_image()

CaaImageData caa_coverart_fetch_image | ( | CaaCoverArt | CoverArt,
|  | const char * | ReleaseID,
|  | const char * | ImageID,
|  | tImageSize | ImageSize )

See also
  CoverArtArchive::CCoverArt::FetchImage

Parameters

  CoverArt | CaaCoverArt object
  ReleaseID | The release ID
  ImageID | The image ID
  ImageSize | The size of image to retrieve

Returns
  The downloaded image. This object must be deleted once finished with.

## ◆ caa_coverart_get_lasterrormessage()

int caa_coverart_get_lasterrormessage | ( | CaaCoverArt | CoverArt,
|  | char * | str,
|  | int | len )

See also
  CoverArtArchive::CCoverArt::LastErrorMessage

Parameters

  CoverArt | CaaCoverArt object
  str | Returned string
  len | Number of characters available in return string

Returns
  The number of characters in the string to copy (not including terminating NULL)

## ◆ caa_coverart_get_lasthttpcode()

int caa_coverart_get_lasthttpcode | ( | CaaCoverArt | CoverArt | ) |

See also
  CoverArtArchive::CCoverArt::LastHTTPCode

Parameters

  CoverArt | CaaCoverArt object

Returns
  Returned value

## ◆ caa_coverart_get_lastresult()

tCoverArtResult caa_coverart_get_lastresult | ( | CaaCoverArt | CoverArt | ) |

See also
  CoverArtArchive::CCoverArt::LastResult

Parameters

  CoverArt | CaaCoverArt object

Returns
  Last CoverArt result code

## ◆ caa_coverart_get_version()

int caa_coverart_get_version | ( | CaaCoverArt | CoverArt,
|  | char * | str,
|  | int | len )

See also
  CoverArtArchive::CCoverArt::Version

Parameters

  CoverArt | CaaCoverArt object
  str | Returned string
  len | Number of characters available in return string

Returns
  The number of characters in the string to copy (not including terminating NULL)

## ◆ caa_coverart_new()

CaaCoverArt caa_coverart_new | ( | const char * | UserAgent | ) |

See also
  CoverArtArchive::CCoverArt::CCoverArt

Parameters

  UserAgent | User agent to be passed to submissions

Returns
  The newly created CaaCoverArt object. This object must be deleted once finished with.

## ◆ caa_coverart_releaseinfo()

CaaReleaseInfo caa_coverart_releaseinfo | ( | CaaCoverArt | CoverArt,
|  | const char * | ReleaseID )

See also
  CoverArtArchive::CCoverArt::ReleaseInfo

Parameters

  CoverArt | CaaCoverArt object
  ReleaseID | The release ID

Returns
  Release information. This object must be deleted once finished with.

## ◆ caa_coverart_set_proxyhost()

void caa_coverart_set_proxyhost | ( | CaaCoverArt | CoverArt,
|  | const char * | ProxyHost )

See also
  CoverArtArchive::CCoverArt::SetProxyHost

Parameters

  CoverArt | CaaCoverArt object
  ProxyHost | Proxy server to use

## ◆ caa_coverart_set_proxypassword()

void caa_coverart_set_proxypassword | ( | CaaCoverArt | CoverArt,
|  | const char * | ProxyPassword )

See also
  CoverArtArchive::CCoverArt::SetProxyPassword

Parameters

  CoverArt | CaaCoverArt object
  ProxyPassword | Password to use

## ◆ caa_coverart_set_proxyport()

void caa_coverart_set_proxyport | ( | CaaCoverArt | CoverArt,
|  | int | ProxyPort )

See also
  CoverArtArchive::CCoverArt::SetProxyPort

Parameters

  CoverArt | CaaCoverArt object
  ProxyPort | Port to use on proxy server

## ◆ caa_coverart_set_proxyusername()

void caa_coverart_set_proxyusername | ( | CaaCoverArt | CoverArt,
|  | const char * | ProxyUserName )

See also
  CoverArtArchive::CCoverArt::SetProxyUserName

Parameters

  CoverArt | CaaCoverArt object
  ProxyUserName | User name to use

## ◆ caa_image_clone()

CaaImage caa_image_clone | ( | CaaImage | Image | ) |

Parameters

  Image | Object to clone

Returns
  Cloned object. This object must be deleted once finished with.

## ◆ caa_image_delete()

void caa_image_delete | ( | CaaImage | Image | ) |

Parameters

  Image | Object to delete

## ◆ caa_image_get_approved()

int caa_image_get_approved | ( | CaaImage | Image | ) |

See also
  CoverArtArchive::CImage::Approved

Parameters

  Image | CaaImage object

Returns
  Returned value

## ◆ caa_image_get_back()

int caa_image_get_back | ( | CaaImage | Image | ) |

See also
  CoverArtArchive::CImage::Back

Parameters

  Image | CaaImage object

Returns
  Returned value

## ◆ caa_image_get_comment()

int caa_image_get_comment | ( | CaaImage | Image,
|  | char * | str,
|  | int | len )

See also
  CoverArtArchive::CImage::Comment

Parameters

  Image | CaaImage object
  str | Returned string
  len | Number of characters available in return string

Returns
  The number of characters in the string to copy (not including terminating NULL)

## ◆ caa_image_get_edit()

int caa_image_get_edit | ( | CaaImage | Image | ) |

See also
  CoverArtArchive::CImage::Edit

Parameters

  Image | CaaImage object

Returns
  Returned value

## ◆ caa_image_get_front()

int caa_image_get_front | ( | CaaImage | Image | ) |

See also
  CoverArtArchive::CImage::Front

Parameters

  Image | CaaImage object

Returns
  Returned value

## ◆ caa_image_get_id()

int caa_image_get_id | ( | CaaImage | Image,
|  | char * | str,
|  | int | len )

See also
  CoverArtArchive::CImage::ID

Parameters

  Image | CaaImage object
  str | Returned string
  len | Number of characters available in return string

Returns
  The number of characters in the string to copy (not including terminating NULL)

## ◆ caa_image_get_image()

int caa_image_get_image | ( | CaaImage | Image,
|  | char * | str,
|  | int | len )

See also
  CoverArtArchive::CImage::Image

Parameters

  Image | CaaImage object
  str | Returned string
  len | Number of characters available in return string

Returns
  The number of characters in the string to copy (not including terminating NULL)

## ◆ caa_image_get_thumbnails()

CaaThumbnails caa_image_get_thumbnails | ( | CaaImage | Image | ) |

See also
  CoverArtArchive::CImage::Thumbnails

Parameters

  Image | CaaImage object

Returns
  CaaThumbnails object

## ◆ caa_image_get_typelist()

CaaTypeList caa_image_get_typelist | ( | CaaImage | Image | ) |

See also
  CoverArtArchive::CImage::TypeList

Parameters

  Image | CaaImage object

Returns
  CaaTypeList object

## ◆ caa_image_list_clone()

CaaImageList caa_image_list_clone | ( | CaaImageList | ImageList | ) |

Parameters

  ImageList | Object to clone

Returns
  Cloned list. This list must be deleted once finished with.

## ◆ caa_image_list_delete()

void caa_image_list_delete | ( | CaaImageList | List | ) |

Parameters

  List | List to delete

## ◆ caa_image_list_get_count()

int caa_image_list_get_count | ( | CaaImageList | List | ) |

Parameters

  List | List to use

## ◆ caa_image_list_get_offset()

int caa_image_list_get_offset | ( | CaaImageList | List | ) |

Parameters

  List | List to use

## ◆ caa_image_list_item()

CaaImage caa_image_list_item | ( | CaaImageList | List,
|  | int | Item )

Parameters

  List | List to use
  Item | Item number to return

Returns
  A CaaImage object.

## ◆ caa_image_list_size()

int caa_image_list_size | ( | CaaImageList | List | ) |

Parameters

  List | List to use

## ◆ caa_imagedata_clone()

CaaImageData caa_imagedata_clone | ( | CaaImageData | ImageData | ) |

Parameters

  ImageData | Object to clone

Returns
  Cloned object. This object must be deleted once finished with.

## ◆ caa_imagedata_data()

unsigned char * caa_imagedata_data | ( | CaaImageData | ImageData | ) |

Parameters

  ImageData | CaaImageData object

Returns
  The data in the object. This data must not be deleted.

## ◆ caa_imagedata_delete()

void caa_imagedata_delete | ( | CaaImageData | ImageData | ) |

Parameters

  ImageData | Object to delete

## ◆ caa_imagedata_size()

int caa_imagedata_size | ( | CaaImageData | ImageData | ) |

Parameters

  ImageData | CaaImageData object

Returns
  The number of bytes in the object

## ◆ caa_releaseinfo_clone()

CaaReleaseInfo caa_releaseinfo_clone | ( | CaaReleaseInfo | ReleaseInfo | ) |

Parameters

  ReleaseInfo | Object to clone

Returns
  Cloned object. This object must be deleted once finished with.

## ◆ caa_releaseinfo_delete()

void caa_releaseinfo_delete | ( | CaaReleaseInfo | ReleaseInfo | ) |

Parameters

  ReleaseInfo | Object to delete

## ◆ caa_releaseinfo_get_imagelist()

CaaImageList caa_releaseinfo_get_imagelist | ( | CaaReleaseInfo | ReleaseInfo | ) |

See also
  CoverArtArchive::CReleaseInfo::ImageList

Parameters

  ReleaseInfo | CaaReleaseInfo object

Returns
  CaaImageList object

## ◆ caa_releaseinfo_get_release()

int caa_releaseinfo_get_release | ( | CaaReleaseInfo | ReleaseInfo,
|  | char * | str,
|  | int | len )

See also
  CoverArtArchive::CReleaseInfo::Release

Parameters

  ReleaseInfo | CaaReleaseInfo object
  str | Returned string
  len | Number of characters available in return string

Returns
  The number of characters in the string to copy (not including terminating NULL)

## ◆ caa_thumbnails_clone()

CaaThumbnails caa_thumbnails_clone | ( | CaaThumbnails | Thumbnails | ) |

Parameters

  Thumbnails | Object to clone

Returns
  Cloned object. This object must be deleted once finished with.

## ◆ caa_thumbnails_delete()

void caa_thumbnails_delete | ( | CaaThumbnails | Thumbnails | ) |

Parameters

  Thumbnails | Object to delete

## ◆ caa_thumbnails_get_large()

int caa_thumbnails_get_large | ( | CaaThumbnails | Thumbnails,
|  | char * | str,
|  | int | len )

See also
  CoverArtArchive::CThumbnails::Large

Parameters

  Thumbnails | CaaThumbnails object
  str | Returned string
  len | Number of characters available in return string

Returns
  The number of characters in the string to copy (not including terminating NULL)

## ◆ caa_thumbnails_get_small()

int caa_thumbnails_get_small | ( | CaaThumbnails | Thumbnails,
|  | char * | str,
|  | int | len )

See also
  CoverArtArchive::CThumbnails::Small

Parameters

  Thumbnails | CaaThumbnails object
  str | Returned string
  len | Number of characters available in return string

Returns
  The number of characters in the string to copy (not including terminating NULL)

## ◆ caa_type_clone()

CaaType caa_type_clone | ( | CaaType | Type | ) |

Parameters

  Type | Object to clone

Returns
  Cloned object. This object must be deleted once finished with.

## ◆ caa_type_delete()

void caa_type_delete | ( | CaaType | Type | ) |

Parameters

  Type | Object to delete

## ◆ caa_type_get_type()

int caa_type_get_type | ( | CaaType | Type,
|  | char * | str,
|  | int | len )

See also
  CoverArtArchive::CType::Type

Parameters

  Type | CaaType object
  str | Returned string
  len | Number of characters available in return string

Returns
  The number of characters in the string to copy (not including terminating NULL)

## ◆ caa_type_list_clone()

CaaTypeList caa_type_list_clone | ( | CaaTypeList | TypeList | ) |

Parameters

  TypeList | Object to clone

Returns
  Cloned list. This list must be deleted once finished with.

## ◆ caa_type_list_delete()

void caa_type_list_delete | ( | CaaTypeList | List | ) |

Parameters

  List | List to delete

## ◆ caa_type_list_get_count()

int caa_type_list_get_count | ( | CaaTypeList | List | ) |

Parameters

  List | List to use

## ◆ caa_type_list_get_offset()

int caa_type_list_get_offset | ( | CaaTypeList | List | ) |

Parameters

  List | List to use

## ◆ caa_type_list_item()

CaaType caa_type_list_item | ( | CaaTypeList | List,
|  | int | Item )

Parameters

  List | List to use
  Item | Item number to return

Returns
  A CaaType object.

## ◆ caa_type_list_size()

int caa_type_list_size | ( | CaaTypeList | List | ) |

Parameters

  List | List to use