• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

filters.h

Go to the documentation of this file.
00001 /*
00002  * MusicBrainz -- The Internet music metadatabase
00003  *
00004  * Copyright (C) 2006 Lukas Lalinsky
00005  *  
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  * 
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  * 
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
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

Generated on Mon Oct 18 2010 for libmusicbrainz3 by  doxygen 1.7.1