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 #ifndef __MUSICBRAINZ3_QUERY_H__
00023 #define __MUSICBRAINZ3_QUERY_H__
00024
00025 #include <map>
00026 #include <string>
00027 #include <musicbrainz3/webservice.h>
00028 #include <musicbrainz3/metadata.h>
00029 #include <musicbrainz3/model.h>
00030
00031 namespace MusicBrainz
00032 {
00033
00047 class MB_API Query
00048 {
00049 public:
00050
00074 Query(IWebService *ws = NULL, const std::string &clientId = std::string());
00075
00079 virtual ~Query();
00080
00102 Artist *getArtistById(const std::string &id,
00103 const ArtistIncludes *include = NULL);
00104
00105 Label *getLabelById(const std::string &id,
00106 const LabelIncludes *include = NULL);
00107
00108 ReleaseGroup *getReleaseGroupById(const std::string &id,
00109 const ReleaseGroupIncludes *include = NULL);
00110
00132 Release *getReleaseById(const std::string &id,
00133 const ReleaseIncludes *include = NULL);
00134
00156 Track *getTrackById(const std::string &id,
00157 const TrackIncludes *include = NULL);
00158
00182 User *getUserByName(const std::string &name);
00183
00198 ArtistResultList getArtists(const ArtistFilter *filter);
00199
00200 LabelResultList getLabels(const LabelFilter *filter);
00201
00202 ReleaseGroupResultList getReleaseGroups(const ReleaseGroupFilter *filter);
00203
00218 ReleaseResultList getReleases(const ReleaseFilter *filter);
00219
00234 TrackResultList getTracks(const TrackFilter *filter);
00235
00254 void submitPuids(const std::map<std::string, std::string> &tracks2puids);
00255
00274 void submitIsrcs(const std::map<std::string, std::string> &tracks2isrcs);
00275
00276 protected:
00277
00278 Metadata *getFromWebService(const std::string &entity,
00279 const std::string &id,
00280 const IIncludes *include = NULL,
00281 const IFilter *filter = NULL);
00282
00283 private:
00284
00285 class QueryPrivate;
00286 QueryPrivate *d;
00287 };
00288
00289 }
00290
00291 #endif