KCDDB

lookup.h
1 /*
2  SPDX-FileCopyrightText: 2002 Rik Hemsley (rikkus) <[email protected]>
3  SPDX-FileCopyrightText: 2002 Benjamin Meyer <[email protected]>
4  SPDX-FileCopyrightText: 2002 Nadeem Hasan <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-or-later
7 */
8 
9 #ifndef KCDDB_LOOKUP_H
10 #define KCDDB_LOOKUP_H
11 
12 #include <cddb.h>
13 #include <cdinfo.h>
14 
15 #include <QList>
16 #include <QObject>
17 #include <QPair>
18 
19 namespace KCDDB
20 {
21  typedef QPair<QString, QString> CDDBMatch;
22  typedef QList<CDDBMatch> CDDBMatchList;
23 
24  class Lookup : public CDDB, public QObject
25  {
26  public:
27 
28  enum Transport
29  {
30  CDDBP,
31  HTTP
32  };
33 
34 
35  Lookup();
36  virtual ~Lookup();
37 
38  virtual Result lookup( const QString &, uint, const TrackOffsetList & ) = 0;
39 
40  CDInfoList lookupResponse() const;
41 
42  protected:
43 
44  void parseExtraMatch( const QString & );
45  Result parseQuery( const QString & );
46  Result parseRead( const QString & );
47 
48  CDInfoList cdInfoList_;
49  CDDBMatchList matchList_;
50  QString category_;
51  QString discid_;
52  };
53 }
54 
55 #endif // KCDDB_LOOKUP_H
56 // vim:tabstop=2:shiftwidth=2:expandtab:cinoptions=(s,U1,m1
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Nov 26 2021 23:22:53 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.