KCDDB

httplookup.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_HTTP_LOOKUP_H
10 #define KCDDB_HTTP_LOOKUP_H
11 
12 #include "lookup.h"
13 #include <QUrl>
14 
15 namespace KIO
16 {
17  class Job;
18 }
19 
20 namespace KCDDB
21 {
22  class HTTPLookup : public Lookup
23  {
24 
25  Q_OBJECT
26 
27  public:
28 
29  enum State
30  {
31  Idle,
32  WaitingForQueryResponse,
33  WaitingForReadResponse
34  };
35 
36  HTTPLookup();
37  virtual ~HTTPLookup();
38 
39  protected:
40 
41  void initURL( const QString &, uint );
42  void makeURL( const QString & );
43  virtual Result fetchURL() = 0;
44 
45  void jobFinished();
46 
47  Result sendQuery();
48  Result sendRead( const CDDBMatch & );
49 
50  Q_SIGNALS:
51 
52  void queryReady();
53  void readReady();
54 
55  protected:
56 
57  bool block_;
58  QUrl cgiURL_;
59  QByteArray data_;
60  State state_;
61  Result result_;
62  };
63 }
64 
65 #endif
66 
67 // vim:tabstop=2:shiftwidth=2:expandtab:cinoptions=(s,U1,m1
State
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Dec 5 2021 23:10:08 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.