• 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  * $Id: query.h 8789 2007-01-13 23:01:56Z luks $
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

Generated on Tue Sep 7 2010 03:53:49 for libmusicbrainz3 by  doxygen 1.7.1