5 /***************************************************************************
6 query.h - A query interface to select RSS feeds.
8 begin : Saturday 15 February 2003
9 copyright : (C) 2003 by Ian Reinhart Geiser
10 email : geiseri@kde.org
11 ***************************************************************************/
13 /***************************************************************************
15 * This program is free software; you can redistribute it and/or modify *
16 * it under the terms of the GNU General Public License as published by *
17 * the Free Software Foundation; either version 2 of the License, or *
18 * (at your option) any later version. *
20 ***************************************************************************/
22 #include "rssnewsfeed.h"
23 #include "xmlrpciface.h"
25 #include <dcopobject.h>
29 #include <q3valuelist.h>
36 * Helper class which just calls the slot given it's QObject/const char*
39 class SlotCaller
: public QObject
43 static void call( QObject
*object
, const char *slot
,
44 const KXMLRPC::Query::Result
&value
);
47 void signal( const KXMLRPC::Query::Result
&value
);
53 class QueryService
: public QObject
, public DCOPObject
58 QueryService( RSSService
*service
);
61 void feedIds( QList
<int> ids
);
62 void feedInfo(QMap
<QString
, QString
> links
);
63 void feedInfo(QList
<RSSNewsFeed
> feeds
);
64 void gotCategories( const QStringList
&categories
);
65 void gotFeedsInCategory( const QList
<int> &ids
);
69 * Lists the active feeds in use...
71 QStringList
listActive(); // just for testing...
74 * Query the www.syndic8.com XML-RPC interface for the
75 * string. The RSS ids are treturned in a integer list.
77 void findFeeds( const QString
& query
);
80 * Query the www.syndic8.com XML-RPC interface for the
81 * string and matches it against the SiteURL feed of
82 * each feed in the feed list. The RSS ids are treturned
85 void findSites( const QString
& query
);
88 * Query the www.syndic8.com XML-RPC interface for the
89 * requested RSS feed(s). Returned is a QMap with the format
90 * of Name (Site URL), RSS URL
92 void getFeedInfo( const QVariant
& ids
);
95 * Returns the list of subcategories in the specified category.
96 * If no "Top" is specified, the root categories are returned.
98 void getCategories( const QString
&category
);
101 * Queries the database for the list of needsfeed ID's which are
102 * associated with the given category.
104 void getFeedsInCategory( const QString
&category
);
108 void slotFoundFeeds( const KXMLRPC::Query::Result
&result
);
109 void slotGotFeedInfo( const KXMLRPC::Query::Result
&result
);
110 void slotGotCategories( const KXMLRPC::Query::Result
&result
);
111 void slotGotFeedsInCategory( const KXMLRPC::Query::Result
&result
);
114 void cachedCall( const QString
&method
, const QList
<QVariant
> &args
,
116 void updateCache( const KXMLRPC::Query::Result
&result
);
118 RSSService
*m_service
;
119 KXMLRPC::Server
*m_xmlrpcServer
;