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_QUERY_H__
00024 #define __MUSICBRAINZ3_QUERY_H__
00025
00026 #include <map>
00027 #include <string>
00028 #include <musicbrainz3/webservice.h>
00029 #include <musicbrainz3/metadata.h>
00030 #include <musicbrainz3/model.h>
00031
00032 namespace MusicBrainz
00033 {
00034
00048 class MB_API Query
00049 {
00050 public:
00051
00075 Query(IWebService *ws = NULL, const std::string &clientId = std::string());
00076
00080 virtual ~Query();
00081
00103 Artist *getArtistById(const std::string &id,
00104 const ArtistIncludes *include = NULL);
00105
00127 Release *getReleaseById(const std::string &id,
00128 const ReleaseIncludes *include = NULL);
00129
00151 Track *getTrackById(const std::string &id,
00152 const TrackIncludes *include = NULL);
00153
00177 User *getUserByName(const std::string &name);
00178
00193 ArtistResultList getArtists(const ArtistFilter *filter);
00194
00209 ReleaseResultList getReleases(const ReleaseFilter *filter);
00210
00225 TrackResultList getTracks(const TrackFilter *filter);
00226
00245 void submitPuids(const std::map<std::string, std::string> &tracks2puids);
00246
00247 protected:
00248
00249 Metadata *getFromWebService(const std::string &entity,
00250 const std::string &id,
00251 const IIncludes *include = NULL,
00252 const IFilter *filter = NULL);
00253
00254 private:
00255
00256 class QueryPrivate;
00257 QueryPrivate *d;
00258 };
00259
00260 }
00261
00262 #endif