diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-03-01 19:09:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-03-01 19:09:31 +0000 |
commit | f2cfda2a54780868dfe0af7bd652fcd4906547da (patch) | |
tree | c6ac23545528f5701818424f2af5f79ce3665e6c /src/cddb.h | |
download | soundkonverter-f2cfda2a54780868dfe0af7bd652fcd4906547da.tar.gz soundkonverter-f2cfda2a54780868dfe0af7bd652fcd4906547da.zip |
Added KDE3 version of SoundKonverter
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/soundkonverter@1097614 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/cddb.h')
-rwxr-xr-x | src/cddb.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/src/cddb.h b/src/cddb.h new file mode 100755 index 0000000..62c38a7 --- /dev/null +++ b/src/cddb.h @@ -0,0 +1,79 @@ +/* + Copyright (C) 2000 Michael Matz <[email protected]> + Modified 2006 Daniel Faust <[email protected]>, thx Michael + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef CDDB_H +#define CDDB_H + +#include <qcstring.h> +#include <qvaluelist.h> +#include <qstringlist.h> +#include <qobject.h> + +class QFile; +class QTextStream; +class KExtendedSocket; + +class CDDB : public QObject +{ + Q_OBJECT +public: + CDDB(); + ~CDDB(); + bool set_server(const char *hostname = 0, unsigned short int port = 0); + void add_cddb_dirs(const QStringList& list); + void save_cddb (bool save) { save_local = save; } + unsigned int get_discid(QValueList<int>& track_ofs); + bool queryCD(QValueList<int>& track_ofs); + QString title() const { return m_title.utf8(); } + QString artist(int i) const; + int trackCount() const { return m_tracks; } + QString track(int i) const; + int disc() const { return m_disc; } + QString genre() const { return m_genre.utf8(); } + int year() const { return m_year; } + +private: + bool readLine(QCString& s); + bool writeLine(const QCString& s); + bool deinit(); + bool parse_read_resp(QTextStream*, QTextStream*); + bool searchLocal(unsigned int id, QFile *ret_file); + KExtendedSocket *ks; + QCString h_name; + unsigned short int port; + bool remote; + bool save_local; + QStringList cddb_dirs; + QCString buf; + unsigned int m_discid; + + int m_tracks; + int m_disc; + int m_year; + QString m_genre; + QString m_title; + QString m_artist; + QStringList m_artists; + QStringList m_names; + +signals: + void cddbMessage( QString ); +}; + +#endif // CDDB_H |