Lines 29-39
Link Here
|
29 |
#include <string> |
29 |
#include <string> |
30 |
#include <vector> |
30 |
#include <vector> |
31 |
|
31 |
|
|
|
32 |
// Visibility patch derived from https://gcc.gnu.org/wiki/Visibility , |
33 |
// extended for clang support. |
34 |
#if (__clang__) || (__GNUC__ >= 4) |
35 |
#define DLL_PUBLIC __attribute__ ((visibility ("default"))) |
36 |
#define DLL_LOCAL __attribute__ ((visibility ("hidden"))) |
37 |
#else |
38 |
#define DLL_PUBLIC |
39 |
#define DLL_LOCAL |
40 |
#endif |
41 |
|
42 |
|
43 |
|
32 |
namespace MusicBrainz5 |
44 |
namespace MusicBrainz5 |
33 |
{ |
45 |
{ |
34 |
class CHTTPFetchPrivate; |
46 |
class CHTTPFetchPrivate; |
35 |
|
47 |
|
36 |
class CExceptionBase: public std::exception |
48 |
class DLL_PUBLIC CExceptionBase: public std::exception |
37 |
{ |
49 |
{ |
38 |
public: |
50 |
public: |
39 |
CExceptionBase(const std::string& ErrorMessage, const std::string& Exception) |
51 |
CExceptionBase(const std::string& ErrorMessage, const std::string& Exception) |
Lines 60-66
Link Here
|
60 |
* Exception thrown when an error occurs connecting to web service |
72 |
* Exception thrown when an error occurs connecting to web service |
61 |
*/ |
73 |
*/ |
62 |
|
74 |
|
63 |
class CConnectionError: public CExceptionBase |
75 |
class DLL_PUBLIC CConnectionError: public CExceptionBase |
64 |
{ |
76 |
{ |
65 |
public: |
77 |
public: |
66 |
CConnectionError(const std::string& ErrorMessage) |
78 |
CConnectionError(const std::string& ErrorMessage) |
Lines 73-79
Link Here
|
73 |
* Exception thrown when a connection to the web service times out |
85 |
* Exception thrown when a connection to the web service times out |
74 |
*/ |
86 |
*/ |
75 |
|
87 |
|
76 |
class CTimeoutError: public CExceptionBase |
88 |
class DLL_PUBLIC CTimeoutError: public CExceptionBase |
77 |
{ |
89 |
{ |
78 |
public: |
90 |
public: |
79 |
CTimeoutError(const std::string& ErrorMessage) |
91 |
CTimeoutError(const std::string& ErrorMessage) |
Lines 86-92
Link Here
|
86 |
* Exception thrown when an authentication error occurs |
98 |
* Exception thrown when an authentication error occurs |
87 |
*/ |
99 |
*/ |
88 |
|
100 |
|
89 |
class CAuthenticationError: public CExceptionBase |
101 |
class DLL_PUBLIC CAuthenticationError: public CExceptionBase |
90 |
{ |
102 |
{ |
91 |
public: |
103 |
public: |
92 |
CAuthenticationError(const std::string& ErrorMessage) |
104 |
CAuthenticationError(const std::string& ErrorMessage) |
Lines 99-105
Link Here
|
99 |
* Exception thrown when an error occurs fetching data |
111 |
* Exception thrown when an error occurs fetching data |
100 |
*/ |
112 |
*/ |
101 |
|
113 |
|
102 |
class CFetchError: public CExceptionBase |
114 |
class DLL_PUBLIC CFetchError: public CExceptionBase |
103 |
{ |
115 |
{ |
104 |
public: |
116 |
public: |
105 |
CFetchError(const std::string& ErrorMessage) |
117 |
CFetchError(const std::string& ErrorMessage) |
Lines 112-118
Link Here
|
112 |
* Exception thrown when an invalid request is made |
124 |
* Exception thrown when an invalid request is made |
113 |
*/ |
125 |
*/ |
114 |
|
126 |
|
115 |
class CRequestError: public CExceptionBase |
127 |
class DLL_PUBLIC CRequestError: public CExceptionBase |
116 |
{ |
128 |
{ |
117 |
public: |
129 |
public: |
118 |
CRequestError(const std::string& ErrorMessage) |
130 |
CRequestError(const std::string& ErrorMessage) |
Lines 125-131
Link Here
|
125 |
* Exception thrown when the requested resource is not found |
137 |
* Exception thrown when the requested resource is not found |
126 |
*/ |
138 |
*/ |
127 |
|
139 |
|
128 |
class CResourceNotFoundError: public CExceptionBase |
140 |
class DLL_PUBLIC CResourceNotFoundError: public CExceptionBase |
129 |
{ |
141 |
{ |
130 |
public: |
142 |
public: |
131 |
CResourceNotFoundError(const std::string& ErrorMessage) |
143 |
CResourceNotFoundError(const std::string& ErrorMessage) |