File indexing completed on 2024-10-06 04:26:01

0001 /* 
0002 
0003     SPDX-FileCopyrightText: 2005-2008 Sebastian Trueg <trueg@k3b.org>
0004     SPDX-FileCopyrightText: 1998-2008 Sebastian Trueg <trueg@k3b.org>
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 
0008 #ifndef _K3B_MUSICBRAINZ_H_
0009 #define _K3B_MUSICBRAINZ_H_
0010 
0011 #include <config-k3b.h>
0012 
0013 #include <QByteArray>
0014 #include <QString>
0015 
0016 
0017 /**
0018  * A wrapper class around libmusicbrainz. Use in combination with TRM.
0019  *
0020  * Tries to determine the artist and title related to a trm.
0021  */
0022 namespace K3b {
0023 class MusicBrainz
0024 {
0025 public:
0026     MusicBrainz();
0027     ~MusicBrainz();
0028 
0029     /**
0030      * \return number of found results.
0031      */
0032     int query( const QByteArray& trm );
0033 
0034     QString title( unsigned int i = 0 ) const;
0035     QString artist( unsigned int i = 0 ) const;
0036 
0037 private:
0038     class Private;
0039     Private* d;
0040 };
0041 }
0042 
0043 
0044 #endif