libcoverart  1.0.0
caa_c.h
Go to the documentation of this file.
1 /* --------------------------------------------------------------------------
2 
3  libcoverart - Client library to access MusicBrainz
4 
5  Copyright (C) 2012 Andrew Hawkins
6 
7  This file is part of libcoverart.
8 
9  This library is free software; you can redistribute it and/or
10  modify it under the terms of the GNU Lesser General Public
11  License as published by the Free Software Foundation; either
12  version 2.1 of the License, or (at your option) any later version.
13 
14  libcoverart is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with this library. If not, see <http://www.gnu.org/licenses/>.
21 
22  THIS FILE IS AUTOMATICALLY GENERATED - DO NOT EDIT IT!
23 
24 ----------------------------------------------------------------------------*/
25 
26 
27 
28 /*
29  Things you should delete using the appropriate caa_xxx_delete() function:
30 
31  * The coverart object you create to do the actual work
32  * The releaseinfo object returned from the caa_coverart_releaseinfo() function
33  * Any image data returned from the caa_fetch_xxx functions
34  * The return from any caa_xxx_clone() function
35 
36  Everything else remains managed by the library, and should not be deleted
37 
38  If in doubt, valgrind is a useful way to spot leaks or things being deleted
39  when they shouldn't be.
40 
41 */
42 
43 #ifndef _COVERART_MB_C_H
44 #define _COVERART_MB_C_H
45 
46 #include "coverart/defines.h"
47 
48 #ifdef __cplusplus
49 extern "C"
50 {
51 #endif
52 
53 
54  typedef void *CaaCoverArt;
55  typedef void *CaaImage;
56  typedef void *CaaReleaseInfo;
57  typedef void *CaaThumbnails;
58  typedef void *CaaType;
59  typedef void *CaaImageList;
60  typedef void *CaaTypeList;
61 
68 
78 
87 
97  int caa_coverart_get_lasterrormessage(CaaCoverArt CoverArt, char *str, int len);
98 
108  int caa_coverart_get_version(CaaCoverArt CoverArt, char *str, int len);
109 
110 /* --------------------------------------------------------------------------
111 
112  libcoverart - Client library to access MusicBrainz
113 
114  Copyright (C) 2012 Andrew Hawkins
115 
116  This file is part of libcoverart.
117 
118  This library is free software; you can redistribute it and/or
119  modify it under the terms of the GNU Lesser General Public
120  License as published by the Free Software Foundation; either
121  version 2.1 of the License, or (at your option) any later version.
122 
123  libcoverart is distributed in the hope that it will be useful,
124  but WITHOUT ANY WARRANTY; without even the implied warranty of
125  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
126  Lesser General Public License for more details.
127 
128  You should have received a copy of the GNU General Public License
129  along with this library. If not, see <http://www.gnu.org/licenses/>.
130 
131  $Id$
132 
133 ----------------------------------------------------------------------------*/
134 
135 typedef void *CaaImageData;
136 
148  CaaCoverArt caa_coverart_new(const char *UserAgent);
149 
158  void caa_coverart_set_proxyhost(CaaCoverArt CoverArt, const char *ProxyHost);
159 
168  void caa_coverart_set_proxyport(CaaCoverArt CoverArt, int ProxyPort);
169 
178  void caa_coverart_set_proxyusername(CaaCoverArt CoverArt, const char *ProxyUserName);
179 
188  void caa_coverart_set_proxypassword(CaaCoverArt CoverArt, const char *ProxyPassword);
189 
201  CaaImageData caa_coverart_fetch_front(CaaCoverArt CoverArt, const char *ReleaseID);
202 
214  CaaImageData caa_coverart_fetch_back(CaaCoverArt CoverArt, const char *ReleaseID);
215 
216  typedef enum
217  {
220  eSize_500=500
222 
236  CaaImageData caa_coverart_fetch_image(CaaCoverArt CoverArt, const char *ReleaseID, const char *ImageID, tImageSize ImageSize);
237 
249  CaaReleaseInfo caa_coverart_releaseinfo(CaaCoverArt CoverArt, const char *ReleaseID);
250 
255  typedef enum
256  {
265 
274 
275 
276 
283 
293 
302 
311 
321  int caa_image_get_comment(CaaImage Image, char *str, int len);
322 
331 
340 
350  int caa_image_get_id(CaaImage Image, char *str, int len);
351 
361  int caa_image_get_image(CaaImage Image, char *str, int len);
362 
371 
380 
381 /* --------------------------------------------------------------------------
382 
383  libcoverart - Client library to access MusicBrainz
384 
385  Copyright (C) 2012 Andrew Hawkins
386 
387  This file is part of libcoverart.
388 
389  This library is free software; you can redistribute it and/or
390  modify it under the terms of the GNU Lesser General Public
391  License as published by the Free Software Foundation; either
392  version 2.1 of the License, or (at your option) any later version.
393 
394  libcoverart is distributed in the hope that it will be useful,
395  but WITHOUT ANY WARRANTY; without even the implied warranty of
396  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
397  Lesser General Public License for more details.
398 
399  You should have received a copy of the GNU General Public License
400  along with this library. If not, see <http://www.gnu.org/licenses/>.
401 
402  $Id$
403 
404 ----------------------------------------------------------------------------*/
405 
412 
422 
431 
439  unsigned char *caa_imagedata_data(CaaImageData ImageData);
440 
441 
442 
449 
459 
469  int caa_releaseinfo_get_release(CaaReleaseInfo ReleaseInfo, char *str, int len);
470 
479 
486 
496 
506  int caa_thumbnails_get_large(CaaThumbnails Thumbnails, char *str, int len);
507 
517  int caa_thumbnails_get_small(CaaThumbnails Thumbnails, char *str, int len);
518 
525 
535 
545  int caa_type_get_type(CaaType Type, char *str, int len);
546 
553 
560 
570 
577 
584 
594 
601 
608 
618 
625 
632 
642 
643 
644 #ifdef __cplusplus
645 }
646 #endif
647 
648 #endif
649 
650 
caa_coverart_set_proxypassword
void caa_coverart_set_proxypassword(CaaCoverArt CoverArt, const char *ProxyPassword)
Set the password to use to authenticate to the proxy server.
eSize_Full
@ eSize_Full
Definition: caa_c.h:218
caa_type_list_delete
void caa_type_list_delete(CaaTypeList List)
Delete a CaaTypeList.
caa_releaseinfo_clone
CaaReleaseInfo caa_releaseinfo_clone(CaaReleaseInfo ReleaseInfo)
Clone a CaaReleaseInfo object.
caa_thumbnails_delete
void caa_thumbnails_delete(CaaThumbnails Thumbnails)
Delete a CaaThumbnails object.
caa_coverart_new
CaaCoverArt caa_coverart_new(const char *UserAgent)
Create a new instance of CaaCoverArt.
caa_coverart_get_version
int caa_coverart_get_version(CaaCoverArt CoverArt, char *str, int len)
caa_coverart_fetch_back
CaaImageData caa_coverart_fetch_back(CaaCoverArt CoverArt, const char *ReleaseID)
Request the back image for a release.
caa_thumbnails_get_large
int caa_thumbnails_get_large(CaaThumbnails Thumbnails, char *str, int len)
caa_image_clone
CaaImage caa_image_clone(CaaImage Image)
Clone a CaaImage object.
caa_image_list_delete
void caa_image_list_delete(CaaImageList List)
Delete a CaaImageList.
caa_image_list_get_count
int caa_image_list_get_count(CaaImageList List)
Return the count of entries in an CaaImageList.
caa_image_list_clone
CaaImageList caa_image_list_clone(CaaImageList ImageList)
Clone an CaaImageList object.
caa_image_get_comment
int caa_image_get_comment(CaaImage Image, char *str, int len)
CaaImageList
void * CaaImageList
Definition: caa_c.h:59
caa_type_list_get_offset
int caa_type_list_get_offset(CaaTypeList List)
Return the offset of entries in an CaaTypeList.
caa_image_list_item
CaaImage caa_image_list_item(CaaImageList List, int Item)
Returns an entry from a CaaImageList.
caa_image_delete
void caa_image_delete(CaaImage Image)
Delete a CaaImage object.
caa_image_list_get_offset
int caa_image_list_get_offset(CaaImageList List)
Return the offset of entries in an CaaImageList.
CaaTypeList
void * CaaTypeList
Definition: caa_c.h:60
CaaImage
void * CaaImage
Definition: caa_c.h:55
CaaCoverArt
void * CaaCoverArt
Definition: caa_c.h:54
caa_type_list_size
int caa_type_list_size(CaaTypeList List)
Return the number of entries in a CaaTypeList.
caa_image_get_id
int caa_image_get_id(CaaImage Image, char *str, int len)
caa_image_get_approved
int caa_image_get_approved(CaaImage Image)
caa_type_get_type
int caa_type_get_type(CaaType Type, char *str, int len)
caa_coverart_delete
void caa_coverart_delete(CaaCoverArt CoverArt)
Delete a CaaCoverArt object.
eCoverArt_ConnectionError
@ eCoverArt_ConnectionError
Definition: caa_c.h:258
caa_imagedata_data
unsigned char * caa_imagedata_data(CaaImageData ImageData)
Return the data in a CaaImageData object.
CaaThumbnails
void * CaaThumbnails
Definition: caa_c.h:57
tImageSize
tImageSize
Definition: caa_c.h:217
caa_type_delete
void caa_type_delete(CaaType Type)
Delete a CaaType object.
caa_image_get_image
int caa_image_get_image(CaaImage Image, char *str, int len)
caa_image_get_thumbnails
CaaThumbnails caa_image_get_thumbnails(CaaImage Image)
caa_coverart_clone
CaaCoverArt caa_coverart_clone(CaaCoverArt CoverArt)
Clone a CaaCoverArt object.
caa_thumbnails_get_small
int caa_thumbnails_get_small(CaaThumbnails Thumbnails, char *str, int len)
caa_coverart_set_proxyhost
void caa_coverart_set_proxyhost(CaaCoverArt CoverArt, const char *ProxyHost)
Set the proxy server.
CaaType
void * CaaType
Definition: caa_c.h:58
eCoverArt_Timeout
@ eCoverArt_Timeout
Definition: caa_c.h:259
caa_coverart_get_lasthttpcode
int caa_coverart_get_lasthttpcode(CaaCoverArt CoverArt)
eCoverArt_Success
@ eCoverArt_Success
Definition: caa_c.h:257
caa_image_get_edit
int caa_image_get_edit(CaaImage Image)
caa_coverart_get_lastresult
tCoverArtResult caa_coverart_get_lastresult(CaaCoverArt CoverArt)
eCoverArt_AuthenticationError
@ eCoverArt_AuthenticationError
Definition: caa_c.h:260
eCoverArt_RequestError
@ eCoverArt_RequestError
Definition: caa_c.h:262
caa_type_list_get_count
int caa_type_list_get_count(CaaTypeList List)
Return the count of entries in an CaaTypeList.
caa_releaseinfo_delete
void caa_releaseinfo_delete(CaaReleaseInfo ReleaseInfo)
Delete a CaaReleaseInfo object.
CaaReleaseInfo
void * CaaReleaseInfo
Definition: caa_c.h:56
caa_coverart_releaseinfo
CaaReleaseInfo caa_coverart_releaseinfo(CaaCoverArt CoverArt, const char *ReleaseID)
Request all information about a release.
caa_image_get_front
int caa_image_get_front(CaaImage Image)
caa_type_list_item
CaaType caa_type_list_item(CaaTypeList List, int Item)
Returns an entry from a CaaTypeList.
caa_image_get_back
int caa_image_get_back(CaaImage Image)
eCoverArt_ResourceNotFound
@ eCoverArt_ResourceNotFound
Definition: caa_c.h:263
caa_type_clone
CaaType caa_type_clone(CaaType Type)
Clone a CaaType object.
caa_image_get_typelist
CaaTypeList caa_image_get_typelist(CaaImage Image)
caa_coverart_fetch_front
CaaImageData caa_coverart_fetch_front(CaaCoverArt CoverArt, const char *ReleaseID)
Request the front image for a release.
caa_coverart_set_proxyusername
void caa_coverart_set_proxyusername(CaaCoverArt CoverArt, const char *ProxyUserName)
Set the username to use to authenticate to the proxy server.
CaaImageData
void * CaaImageData
Definition: caa_c.h:135
eCoverArt_FetchError
@ eCoverArt_FetchError
Definition: caa_c.h:261
caa_imagedata_size
int caa_imagedata_size(CaaImageData ImageData)
Return the number of bytes in a CaaImageData object.
caa_coverart_fetch_image
CaaImageData caa_coverart_fetch_image(CaaCoverArt CoverArt, const char *ReleaseID, const char *ImageID, tImageSize ImageSize)
Request a specific image for a release.
caa_image_list_size
int caa_image_list_size(CaaImageList List)
Return the number of entries in a CaaImageList.
caa_imagedata_delete
void caa_imagedata_delete(CaaImageData ImageData)
Delete a CaaImageData object.
caa_releaseinfo_get_release
int caa_releaseinfo_get_release(CaaReleaseInfo ReleaseInfo, char *str, int len)
caa_thumbnails_clone
CaaThumbnails caa_thumbnails_clone(CaaThumbnails Thumbnails)
Clone a CaaThumbnails object.
eSize_500
@ eSize_500
Definition: caa_c.h:220
caa_coverart_set_proxyport
void caa_coverart_set_proxyport(CaaCoverArt CoverArt, int ProxyPort)
Set the port to use on the proxy server.
caa_type_list_clone
CaaTypeList caa_type_list_clone(CaaTypeList TypeList)
Clone an CaaTypeList object.
tCoverArtResult
tCoverArtResult
Definition: caa_c.h:256
caa_releaseinfo_get_imagelist
CaaImageList caa_releaseinfo_get_imagelist(CaaReleaseInfo ReleaseInfo)
caa_imagedata_clone
CaaImageData caa_imagedata_clone(CaaImageData ImageData)
Clone a CaaImageData object.
caa_coverart_get_lasterrormessage
int caa_coverart_get_lasterrormessage(CaaCoverArt CoverArt, char *str, int len)
eSize_250
@ eSize_250
Definition: caa_c.h:219