akregator/src/librss

testlibrss.h
1#ifndef TESTLIBRSS_H
2#define TESTLIBRSS_H
3
4#include <tqobject.h>
5
6#include "loader.h"
7#include "document.h"
8#include "article.h"
9#include "global.h"
10
11using RSS::Loader;
12using RSS::Document;
13using RSS::Status;
14
15class Tester : public TQObject
16{
17 TQ_OBJECT
18
19 public:
20 void test( const TQString &url );
21
22 private slots:
23 void slotLoadingComplete( Loader *loader, Document doc, Status status );
24};
25
26class TestRetriever : public RSS::DataRetriever
27{
28 TQ_OBJECT
29
30public:
31 TestRetriever();
32 ~TestRetriever() override;
33
34 void retrieveData(const KURL &url) override;
35
36 int errorCode() const override { return m_errorCode; }
37
38 void abort() override { /* no-op */ }
39
40private:
41 int m_errorCode;
42};
43
44#endif
Abstract baseclass for all data retriever classes.
Definition: loader.h:36
virtual int errorCode() const =0
virtual void retrieveData(const KURL &url)=0
Retrieve data from the given URL.
Represents a RSS document and provides all the features and properties as stored in it.
Definition: document.h:32
This class is the preferred way of loading RSS files.
Definition: loader.h:258