2
This file is part of choqoK, the KDE micro-blogging client
4
Copyright (C) 2008-2009 Mehrdad Momeny <mehrdad.momeny@gmail.com>
6
This program is free software; you can redistribute it and/or
7
modify it under the terms of the GNU General Public License as
8
published by the Free Software Foundation; either version 2 of
9
the License or (at your option) version 3 or any later version
10
accepted by the membership of KDE e.V. (or its successor approved
11
by the membership of KDE e.V.), which shall act as a proxy
12
defined in Section 14 of version 3 of the license.
15
This program is distributed in the hope that it will be useful,
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
GNU General Public License for more details.
20
You should have received a copy of the GNU General Public License
21
along with this program; if not, see http://www.gnu.org/licenses/
34
#include "datacontainers.h"
40
Base class for search feature.
41
@author Stephen Henderson <hendersonsk@gmail.com>
43
class Search : public QObject
47
explicit Search( Account* account, const QString searchUrl = QString(), QObject *parent=0 );
50
QMap<int, QPair<QString, bool> > getSearchTypes();
53
virtual KUrl buildUrl( QString query, int option, uint sinceStatusId = 0, uint count = 0, uint page = 1 );
56
virtual void requestSearchResults( QString query,
58
uint sinceStatusId = 0,
63
virtual void searchResultsReturned( KJob *job );
64
virtual void singleStatusReturned( KJob* job );
67
void searchResultsReceived( QList<Status> &statusList );
68
void error( QString message );
71
// The QString in the QPair is a human readable string describing what the type searches for. The boolean value
72
// determines whether or not the search type is traversable (if the forward and back buttons should be displayed).
73
QMap<int, QPair<QString, bool> > mSearchTypes;