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 ParameterList createParameters() const;
00064 private:
00065 ParameterList parameters;
00066 };
00067
00099 class MB_API ReleaseFilter : public IFilter
00100 {
00101 public:
00102 ReleaseFilter &title(const std::string &value);
00103 ReleaseFilter &discId(const std::string &value);
00104 ReleaseFilter &releaseType(const std::string &value);
00105 ReleaseFilter &artistName(const std::string &value);
00106 ReleaseFilter &artistId(const std::string &value);
00107 ReleaseFilter &limit(const int value);
00108 ParameterList createParameters() const;
00109 private:
00110 ParameterList parameters;
00111 };
00112
00122 class MB_API TrackFilter : public IFilter
00123 {
00124 public:
00125 TrackFilter &title(const std::string &value);
00126 TrackFilter &artistName(const std::string &value);
00127 TrackFilter &artistId(const std::string &value);
00128 TrackFilter &releaseTitle(const std::string &value);
00129 TrackFilter &releaseId(const std::string &value);
00130 TrackFilter &duration(const int value);
00131 TrackFilter &puid(const std::string &value);
00132 TrackFilter &limit(const int value);
00133 ParameterList createParameters() const;
00134 private:
00135 ParameterList parameters;
00136 };
00137
00141 class MB_API UserFilter : public IFilter
00142 {
00143 public:
00144 UserFilter &name(const std::string &name);
00145 ParameterList createParameters() const;
00146 private:
00147 ParameterList parameters;
00148 };
00149
00150 }
00151
00152 #endif