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

query.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 #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

Generated on Mon Oct 18 2010 for libmusicbrainz3 by  doxygen 1.7.1