Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __MUSICBRAINZ3_FILTERS_H__
00024 #define __MUSICBRAINZ3_FILTERS_H__
00025
00026 #include <string>
00027 #include <vector>
00028 #include <utility>
00029 #include <musicbrainz3/musicbrainz.h>
00030
00031 namespace MusicBrainz
00032 {
00033
00039 class MB_API IFilter
00040 {
00041 public:
00042
00043 typedef std::vector<std::pair<std::string, std::string> > ParameterList;
00044
00045 virtual ~IFilter() {};
00046
00052 virtual ParameterList createParameters() const = 0;
00053 };
00054
00058 class MB_API ArtistFilter : public IFilter
00059 {
00060 public:
00061 ArtistFilter &name(const std::string &name);
00062 ArtistFilter &limit(const int limit);
00063 ArtistFilter &query(const std::string &query);
00064 ParameterList createParameters() const;
00065 private:
00066 ParameterList parameters;
00067 };
00068
00072 class MB_API LabelFilter : public IFilter
00073 {
00074 public:
00075 LabelFilter &name(const std::string &name);
00076 LabelFilter &limit(const int limit);
00077 LabelFilter &query(const std::string &query);
00078 ParameterList createParameters() const;
00079 private:
00080 ParameterList parameters;
00081 };
00082
00114 class MB_API ReleaseFilter : public IFilter
00115 {
00116 public:
00117 ReleaseFilter &title(const std::string &value);
00118 ReleaseFilter &discId(const std::string &value);
00119 ReleaseFilter &releaseType(const std::string &value);
00120 ReleaseFilter &artistName(const std::string &value);
00121 ReleaseFilter &artistId(const std::string &value);
00122 ReleaseFilter &limit(const int value);
00123 ReleaseFilter &query(const std::string &query);
00124 ParameterList createParameters() const;
00125 private:
00126 ParameterList parameters;
00127 };
00128
00129 class MB_API ReleaseGroupFilter : public IFilter
00130 {
00131 public:
00132 ReleaseGroupFilter &title(const std::string &value);
00133 ReleaseGroupFilter &releaseType(const std::string &value);
00134 ReleaseGroupFilter &artistName(const std::string &value);
00135 ReleaseGroupFilter &artistId(const std::string &value);
00136 ReleaseGroupFilter &limit(const int value);
00137 ReleaseGroupFilter &query(const std::string &query);
00138 ParameterList createParameters() const;
00139 private:
00140 ParameterList parameters;
00141 };
00142
00152 class MB_API TrackFilter : public IFilter
00153 {
00154 public:
00155 TrackFilter &title(const std::string &value);
00156 TrackFilter &artistName(const std::string &value);
00157 TrackFilter &artistId(const std::string &value);
00158 TrackFilter &releaseTitle(const std::string &value);
00159 TrackFilter &releaseId(const std::string &value);
00160 TrackFilter &duration(const int value);
00161 TrackFilter &puid(const std::string &value);
00162 TrackFilter &limit(const int value);
00163 TrackFilter &query(const std::string &value);
00164 ParameterList createParameters() const;
00165 private:
00166 ParameterList parameters;
00167 };
00168
00172 class MB_API UserFilter : public IFilter
00173 {
00174 public:
00175 UserFilter &name(const std::string &name);
00176 ParameterList createParameters() const;
00177 private:
00178 ParameterList parameters;
00179 };
00180
00181 }
00182
00183 #endif