libcoverart 1.0.0
Loading...
Searching...
No Matches
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
49extern "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
135typedef 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
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
CaaCoverArt caa_coverart_clone(CaaCoverArt CoverArt)
Clone a CaaCoverArt object.
int caa_image_get_approved(CaaImage Image)
CaaType caa_type_clone(CaaType Type)
Clone a CaaType object.
int caa_image_get_front(CaaImage Image)
void * CaaCoverArt
Definition caa_c.h:54
CaaImageData caa_coverart_fetch_front(CaaCoverArt CoverArt, const char *ReleaseID)
Request the front image for a release.
void * CaaThumbnails
Definition caa_c.h:57
void * CaaImage
Definition caa_c.h:55
CaaImage caa_image_list_item(CaaImageList List, int Item)
Returns an entry from a CaaImageList.
int caa_thumbnails_get_small(CaaThumbnails Thumbnails, char *str, int len)
int caa_image_list_size(CaaImageList List)
Return the number of entries in a CaaImageList.
CaaImageList caa_releaseinfo_get_imagelist(CaaReleaseInfo ReleaseInfo)
CaaCoverArt caa_coverart_new(const char *UserAgent)
Create a new instance of CaaCoverArt.
int caa_image_get_comment(CaaImage Image, char *str, int len)
void caa_coverart_set_proxyport(CaaCoverArt CoverArt, int ProxyPort)
Set the port to use on the proxy server.
int caa_image_get_edit(CaaImage Image)
CaaThumbnails caa_image_get_thumbnails(CaaImage Image)
void caa_imagedata_delete(CaaImageData ImageData)
Delete a CaaImageData object.
CaaThumbnails caa_thumbnails_clone(CaaThumbnails Thumbnails)
Clone a CaaThumbnails object.
int caa_image_get_image(CaaImage Image, char *str, int len)
void * CaaImageList
Definition caa_c.h:59
int caa_type_get_type(CaaType Type, char *str, int len)
void * CaaImageData
Definition caa_c.h:135
CaaReleaseInfo caa_coverart_releaseinfo(CaaCoverArt CoverArt, const char *ReleaseID)
Request all information about a release.
CaaTypeList caa_type_list_clone(CaaTypeList TypeList)
Clone an CaaTypeList object.
tCoverArtResult caa_coverart_get_lastresult(CaaCoverArt CoverArt)
void caa_type_list_delete(CaaTypeList List)
Delete a CaaTypeList.
void caa_releaseinfo_delete(CaaReleaseInfo ReleaseInfo)
Delete a CaaReleaseInfo object.
void caa_thumbnails_delete(CaaThumbnails Thumbnails)
Delete a CaaThumbnails object.
int caa_thumbnails_get_large(CaaThumbnails Thumbnails, char *str, int len)
int caa_imagedata_size(CaaImageData ImageData)
Return the number of bytes in a CaaImageData object.
CaaImageData caa_imagedata_clone(CaaImageData ImageData)
Clone a CaaImageData object.
CaaImage caa_image_clone(CaaImage Image)
Clone a CaaImage object.
tImageSize
Definition caa_c.h:217
@ eSize_Full
Definition caa_c.h:218
@ eSize_250
Definition caa_c.h:219
@ eSize_500
Definition caa_c.h:220
int caa_type_list_get_offset(CaaTypeList List)
Return the offset of entries in an CaaTypeList.
int caa_type_list_get_count(CaaTypeList List)
Return the count of entries in an CaaTypeList.
int caa_image_get_back(CaaImage Image)
int caa_releaseinfo_get_release(CaaReleaseInfo ReleaseInfo, char *str, int len)
void caa_type_delete(CaaType Type)
Delete a CaaType object.
int caa_image_list_get_count(CaaImageList List)
Return the count of entries in an CaaImageList.
int caa_coverart_get_lasterrormessage(CaaCoverArt CoverArt, char *str, int len)
int caa_coverart_get_version(CaaCoverArt CoverArt, char *str, int len)
void * CaaReleaseInfo
Definition caa_c.h:56
int caa_type_list_size(CaaTypeList List)
Return the number of entries in a CaaTypeList.
CaaImageData caa_coverart_fetch_back(CaaCoverArt CoverArt, const char *ReleaseID)
Request the back image for a release.
void caa_image_list_delete(CaaImageList List)
Delete a CaaImageList.
CaaImageData caa_coverart_fetch_image(CaaCoverArt CoverArt, const char *ReleaseID, const char *ImageID, tImageSize ImageSize)
Request a specific image for a release.
void caa_coverart_set_proxypassword(CaaCoverArt CoverArt, const char *ProxyPassword)
Set the password to use to authenticate to the proxy server.
unsigned char * caa_imagedata_data(CaaImageData ImageData)
Return the data in a CaaImageData object.
tCoverArtResult
Definition caa_c.h:256
@ eCoverArt_ResourceNotFound
Definition caa_c.h:263
@ eCoverArt_Success
Definition caa_c.h:257
@ eCoverArt_Timeout
Definition caa_c.h:259
@ eCoverArt_RequestError
Definition caa_c.h:262
@ eCoverArt_FetchError
Definition caa_c.h:261
@ eCoverArt_AuthenticationError
Definition caa_c.h:260
@ eCoverArt_ConnectionError
Definition caa_c.h:258
int caa_image_list_get_offset(CaaImageList List)
Return the offset of entries in an CaaImageList.
void caa_coverart_delete(CaaCoverArt CoverArt)
Delete a CaaCoverArt object.
void * CaaType
Definition caa_c.h:58
void caa_coverart_set_proxyusername(CaaCoverArt CoverArt, const char *ProxyUserName)
Set the username to use to authenticate to the proxy server.
CaaType caa_type_list_item(CaaTypeList List, int Item)
Returns an entry from a CaaTypeList.
CaaTypeList caa_image_get_typelist(CaaImage Image)
void * CaaTypeList
Definition caa_c.h:60
CaaImageList caa_image_list_clone(CaaImageList ImageList)
Clone an CaaImageList object.
void caa_coverart_set_proxyhost(CaaCoverArt CoverArt, const char *ProxyHost)
Set the proxy server.
CaaReleaseInfo caa_releaseinfo_clone(CaaReleaseInfo ReleaseInfo)
Clone a CaaReleaseInfo object.
int caa_image_get_id(CaaImage Image, char *str, int len)
void caa_image_delete(CaaImage Image)
Delete a CaaImage object.
int caa_coverart_get_lasthttpcode(CaaCoverArt CoverArt)