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 v2 of the GNU Lesser General Public
11 License as published by the Free Software Foundation.
12
13 libcoverart is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this library. If not, see <http://www.gnu.org/licenses/>.
20
21 THIS FILE IS AUTOMATICALLY GENERATED - DO NOT EDIT IT!
22
23----------------------------------------------------------------------------*/
24
25
26/*
27 Things you should delete using the appropriate caa_xxx_delete() function:
28
29 * The coverart object you create to do the actual work
30 * The releaseinfo object returned from the caa_coverart_releaseinfo() function
31 * Any image data returned from the caa_fetch_xxx functions
32 * The return from any caa_xxx_clone() function
33
34 Everything else remains managed by the library, and should not be deleted
35
36 If in doubt, valgrind is a useful way to spot leaks or things being deleted
37 when they shouldn't be.
38
39*/
40
41#ifndef _COVERART_MB_C_H
42#define _COVERART_MB_C_H
43
44#include "coverart/defines.h"
45
46#ifdef __cplusplus
47extern "C"
48{
49#endif
50
51 typedef void *CaaCoverArt;
52 typedef void *CaaImage;
53 typedef void *CaaReleaseInfo;
54 typedef void *CaaThumbnails;
55 typedef void *CaaType;
56 typedef void *CaaImageList;
57 typedef void *CaaTypeList;
58
65
75
84
94 int caa_coverart_get_lasterrormessage(CaaCoverArt CoverArt, char *str, int len);
95
105 int caa_coverart_get_version(CaaCoverArt CoverArt, char *str, int len);
106
107/* --------------------------------------------------------------------------
108
109 libcoverart - Client library to access MusicBrainz
110
111 Copyright (C) 2012 Andrew Hawkins
112
113 This file is part of libcoverart.
114
115 This library is free software; you can redistribute it and/or
116 modify it under the terms of v2 of the GNU Lesser General Public
117 License as published by the Free Software Foundation.
118
119 libcoverart is distributed in the hope that it will be useful,
120 but WITHOUT ANY WARRANTY; without even the implied warranty of
121 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
122 Lesser General Public License for more details.
123
124 You should have received a copy of the GNU General Public License
125 along with this library. If not, see <http://www.gnu.org/licenses/>.
126
127 $Id$
128
129----------------------------------------------------------------------------*/
130
131typedef void *CaaImageData;
132
144 CaaCoverArt caa_coverart_new(const char *UserAgent);
145
154 void caa_coverart_set_proxyhost(CaaCoverArt CoverArt, const char *ProxyHost);
155
164 void caa_coverart_set_proxyport(CaaCoverArt CoverArt, int ProxyPort);
165
174 void caa_coverart_set_proxyusername(CaaCoverArt CoverArt, const char *ProxyUserName);
175
184 void caa_coverart_set_proxypassword(CaaCoverArt CoverArt, const char *ProxyPassword);
185
197 CaaImageData caa_coverart_fetch_front(CaaCoverArt CoverArt, const char *ReleaseID);
198
210 CaaImageData caa_coverart_fetch_back(CaaCoverArt CoverArt, const char *ReleaseID);
211
212 typedef enum
213 {
216 eSize_500=500
218
232 CaaImageData caa_coverart_fetch_image(CaaCoverArt CoverArt, const char *ReleaseID, const char *ImageID, tImageSize ImageSize);
233
245 CaaReleaseInfo caa_coverart_releaseinfo(CaaCoverArt CoverArt, const char *ReleaseID);
246
251 typedef enum
252 {
261
270
271
272
279
289
298
307
317 int caa_image_get_comment(CaaImage Image, char *str, int len);
318
327
336
346 int caa_image_get_id(CaaImage Image, char *str, int len);
347
357 int caa_image_get_image(CaaImage Image, char *str, int len);
358
367
376
377/* --------------------------------------------------------------------------
378
379 libcoverart - Client library to access MusicBrainz
380
381 Copyright (C) 2012 Andrew Hawkins
382
383 This file is part of libcoverart.
384
385 This library is free software; you can redistribute it and/or
386 modify it under the terms of v2 of the GNU Lesser General Public
387 License as published by the Free Software Foundation.
388
389 libcoverart is distributed in the hope that it will be useful,
390 but WITHOUT ANY WARRANTY; without even the implied warranty of
391 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
392 Lesser General Public License for more details.
393
394 You should have received a copy of the GNU General Public License
395 along with this library. If not, see <http://www.gnu.org/licenses/>.
396
397 $Id$
398
399----------------------------------------------------------------------------*/
400
407
417
426
434 unsigned char *caa_imagedata_data(CaaImageData ImageData);
435
436
437
444
454
464 int caa_releaseinfo_get_release(CaaReleaseInfo ReleaseInfo, char *str, int len);
465
474
481
491
501 int caa_thumbnails_get_large(CaaThumbnails Thumbnails, char *str, int len);
502
512 int caa_thumbnails_get_small(CaaThumbnails Thumbnails, char *str, int len);
513
520
530
540 int caa_type_get_type(CaaType Type, char *str, int len);
541
548
555
565
572
579
589
596
603
613
620
627
637
638#ifdef __cplusplus
639}
640#endif
641
642#endif
643
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:51
CaaImageData caa_coverart_fetch_front(CaaCoverArt CoverArt, const char *ReleaseID)
Request the front image for a release.
void * CaaThumbnails
Definition caa_c.h:54
void * CaaImage
Definition caa_c.h:52
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:56
int caa_type_get_type(CaaType Type, char *str, int len)
void * CaaImageData
Definition caa_c.h:131
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:213
@ eSize_Full
Definition caa_c.h:214
@ eSize_250
Definition caa_c.h:215
@ eSize_500
Definition caa_c.h:216
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:53
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:252
@ eCoverArt_ResourceNotFound
Definition caa_c.h:259
@ eCoverArt_Success
Definition caa_c.h:253
@ eCoverArt_Timeout
Definition caa_c.h:255
@ eCoverArt_RequestError
Definition caa_c.h:258
@ eCoverArt_FetchError
Definition caa_c.h:257
@ eCoverArt_AuthenticationError
Definition caa_c.h:256
@ eCoverArt_ConnectionError
Definition caa_c.h:254
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:55
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:57
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)