KCDDB

httplookup.h
1/*
2 SPDX-FileCopyrightText: 2002 Rik Hemsley ( rikkus ) <rik@kde.org>
3 SPDX-FileCopyrightText: 2002 Benjamin Meyer <ben-devel@meyerhome.net>
4 SPDX-FileCopyrightText: 2002 Nadeem Hasan <nhasan@kde.org>
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
15namespace KIO
16{
17 class Job;
18}
19
20namespace KCDDB
21{
22 class HTTPLookup : public Lookup
23 {
24
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
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
AKONADI_CONTACT_CORE_EXPORT const char Lookup[]
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:00:33 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.