libcoverart
1.0.0
|
Object for making cover art requests. More...
Public Types | |
enum | tImageSize { eSize_Full =0, eSize_250 =250, eSize_500 =500 } |
Enumerated type for image size. More... | |
enum | tCoverArtResult { eCoverArt_Success =0, eCoverArt_ConnectionError, eCoverArt_Timeout, eCoverArt_AuthenticationError, eCoverArt_FetchError, eCoverArt_RequestError, eCoverArt_ResourceNotFound } |
Enumerated type for query status. More... | |
Public Member Functions | |
CCoverArt (const std::string &UserAgent) | |
Constructor. More... | |
~CCoverArt () | |
void | SetProxyHost (const std::string &ProxyHost) |
Set the proxy server to use. More... | |
void | SetProxyPort (int ProxyPort) |
Set the proxy port to use. More... | |
void | SetProxyUserName (const std::string &ProxyUserName) |
Set the proxy user name to use. More... | |
void | SetProxyPassword (const std::string &ProxyPassword) |
Set the proxy password to use. More... | |
std::vector< unsigned char > | FetchFront (const std::string &ReleaseID) const |
Request the front image for a release. More... | |
std::vector< unsigned char > | FetchBack (const std::string &ReleaseID) const |
Request the back image for a release. More... | |
std::vector< unsigned char > | FetchImage (const std::string &ReleaseID, const std::string &ImageID, tImageSize ImageSize=eSize_Full) const |
Fetch a specific image for a release. More... | |
CReleaseInfo | ReleaseInfo (const std::string &ReleaseID) const |
Return release information for a release. More... | |
tCoverArtResult | LastResult () const |
Return result of the last query. More... | |
int | LastHTTPCode () const |
Return HTTP code of the last query. More... | |
std::string | LastErrorMessage () const |
Return error message from the last query. More... | |
std::string | Version () const |
Return the library version. More... | |
Object to be used to make cover art requests
CoverArtArchive::CCoverArt::CCoverArt | ( | const std::string & | UserAgent | ) |
Constructor
UserAgent | User agent to use in any queries and submissions. The format is "application-version" , where application is your application's name and version is a version number which may not contain a '-' character. |
CoverArtArchive::CCoverArt::~CCoverArt | ( | ) |
std::vector<unsigned char> CoverArtArchive::CCoverArt::FetchBack | ( | const std::string & | ReleaseID | ) | const |
Request the back image for a release
ReleaseID | The release ID |
CConnectionError | An error occurred connecting to the web server |
CTimeoutError | A timeout occurred when connecting to the web server |
CAuthenticationError | An authentication error occurred |
CFetchError | An error occurred fetching data |
CRequestError | The request was invalid |
CResourceNotFoundError | The requested resource was not found |
std::vector<unsigned char> CoverArtArchive::CCoverArt::FetchFront | ( | const std::string & | ReleaseID | ) | const |
Request the front image for a release
ReleaseID | The release ID |
CConnectionError | An error occurred connecting to the web server |
CTimeoutError | A timeout occurred when connecting to the web server |
CAuthenticationError | An authentication error occurred |
CFetchError | An error occurred fetching data |
CRequestError | The request was invalid |
CResourceNotFoundError | The requested resource was not found |
std::vector<unsigned char> CoverArtArchive::CCoverArt::FetchImage | ( | const std::string & | ReleaseID, |
const std::string & | ImageID, | ||
tImageSize | ImageSize = eSize_Full |
||
) | const |
Request a specific image for a release
ReleaseID | The release ID |
ImageID | The image ID |
ImageSize | The image size |
CConnectionError | An error occurred connecting to the web server |
CTimeoutError | A timeout occurred when connecting to the web server |
CAuthenticationError | An authentication error occurred |
CFetchError | An error occurred fetching data |
CRequestError | The request was invalid |
CResourceNotFoundError | The requested resource was not found |
std::string CoverArtArchive::CCoverArt::LastErrorMessage | ( | ) | const |
Return the error message from the last query
int CoverArtArchive::CCoverArt::LastHTTPCode | ( | ) | const |
Return the HTTP code of the last query
tCoverArtResult CoverArtArchive::CCoverArt::LastResult | ( | ) | const |
Return the result of the last query
CReleaseInfo CoverArtArchive::CCoverArt::ReleaseInfo | ( | const std::string & | ReleaseID | ) | const |
Return release information for a release
ReleaseID | The release ID |
CConnectionError | An error occurred connecting to the web server |
CTimeoutError | A timeout occurred when connecting to the web server |
CAuthenticationError | An authentication error occurred |
CFetchError | An error occurred fetching data |
CRequestError | The request was invalid |
CResourceNotFoundError | The requested resource was not found |
void CoverArtArchive::CCoverArt::SetProxyHost | ( | const std::string & | ProxyHost | ) |
Set the proxy server to use when connecting with the web server
ProxyHost | Proxy server to use |
void CoverArtArchive::CCoverArt::SetProxyPassword | ( | const std::string & | ProxyPassword | ) |
Set the password to use when authenticating with the proxy server
ProxyPassword | Proxy server password to use |
void CoverArtArchive::CCoverArt::SetProxyPort | ( | int | ProxyPort | ) |
Set the proxy server port to use when connecting to the web server
ProxyPort | Proxy server port to use |
void CoverArtArchive::CCoverArt::SetProxyUserName | ( | const std::string & | ProxyUserName | ) |
Set the user name to use when authenticating with the proxy server
ProxyUserName | Proxy user name to use |
std::string CoverArtArchive::CCoverArt::Version | ( | ) | const |
Return the library version