/src/libtomahawk/resolver.h
C++ Header | 57 lines | 20 code | 13 blank | 24 comment | 0 complexity | 2c0d7b1b6796c1aa1da7c7e83800de86 MD5 | raw file
1/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> === 2 * 3 * Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org> 4 * 5 * Tomahawk is free software: you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation, either version 3 of the License, or 8 * (at your option) any later version. 9 * 10 * Tomahawk is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with Tomahawk. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19#ifndef RESOLVER_H 20#define RESOLVER_H 21 22#include <QObject> 23 24#include "Query.h" 25 26#include "DllMacro.h" 27 28// implement this if you can resolve queries to content 29 30/* 31 Weight: 1-100, 100 being the best 32 Timeout: some millisecond value, after which we try the next highest 33 weighted resolver 34 35*/ 36 37namespace Tomahawk 38{ 39 40class DLLEXPORT Resolver : public QObject 41{ 42Q_OBJECT 43 44public: 45 Resolver() {} 46 47 virtual QString name() const = 0; 48 virtual unsigned int weight() const = 0; 49 virtual unsigned int timeout() const = 0; 50 51public slots: 52 virtual void resolve( const Tomahawk::query_ptr& query ) = 0; 53}; 54 55}; //ns 56 57#endif // RESOLVER_H