1 /* 2 * Copyright (C) 2001-2012 Jacek Sieka, arnetheduck on gmail point com 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 */ 18 19 #pragma once 20 21 #include "forward.h" 22 #include "noexcept.h" 23 24 namespace dcpp { 25 26 class QueueManagerListener { 27 public: ~QueueManagerListener()28 virtual ~QueueManagerListener() { } 29 template<int I> struct X { enum { TYPE = I }; }; 30 31 typedef X<0> Added; 32 typedef X<1> Finished; 33 typedef X<2> Removed; 34 typedef X<3> Moved; 35 typedef X<4> SourcesUpdated; 36 typedef X<5> StatusUpdated; 37 typedef X<6> SearchStringUpdated; 38 typedef X<7> PartialList; 39 40 typedef X<8> RecheckStarted; 41 typedef X<9> RecheckNoFile; 42 typedef X<10> RecheckFileTooSmall; 43 typedef X<11> RecheckDownloadsRunning; 44 typedef X<12> RecheckNoTree; 45 typedef X<13> RecheckAlreadyFinished; 46 typedef X<14> RecheckDone; 47 typedef X<15> FileMoved; 48 49 typedef X<16> CRCFailed; 50 typedef X<17> CRCChecked; 51 on(Added,QueueItem *)52 virtual void on(Added, QueueItem*) noexcept { } on(Finished,QueueItem *,const string &,int64_t)53 virtual void on(Finished, QueueItem*, const string&, int64_t) noexcept { } on(Removed,QueueItem *)54 virtual void on(Removed, QueueItem*) noexcept { } on(Moved,QueueItem *,const string &)55 virtual void on(Moved, QueueItem*, const string&) noexcept { } on(SourcesUpdated,QueueItem *)56 virtual void on(SourcesUpdated, QueueItem*) noexcept { } on(StatusUpdated,QueueItem *)57 virtual void on(StatusUpdated, QueueItem*) noexcept { } on(SearchStringUpdated,QueueItem *)58 virtual void on(SearchStringUpdated, QueueItem*) noexcept { } on(PartialList,const HintedUser &,const string &)59 virtual void on(PartialList, const HintedUser&, const string&) noexcept { } 60 on(RecheckStarted,const string &)61 virtual void on(RecheckStarted, const string&) noexcept { } on(RecheckNoFile,const string &)62 virtual void on(RecheckNoFile, const string&) noexcept { } on(RecheckFileTooSmall,const string &)63 virtual void on(RecheckFileTooSmall, const string&) noexcept { } on(RecheckDownloadsRunning,const string &)64 virtual void on(RecheckDownloadsRunning, const string&) noexcept { } on(RecheckNoTree,const string &)65 virtual void on(RecheckNoTree, const string&) noexcept { } on(RecheckAlreadyFinished,const string &)66 virtual void on(RecheckAlreadyFinished, const string&) noexcept { } on(RecheckDone,const string &)67 virtual void on(RecheckDone, const string&) noexcept { } on(FileMoved,const string &)68 virtual void on(FileMoved, const string&) noexcept { } 69 on(CRCFailed,Download *,const string &)70 virtual void on(CRCFailed, Download*, const string&) noexcept { } on(CRCChecked,Download *)71 virtual void on(CRCChecked, Download*) noexcept { } 72 }; 73 74 } // namespace dcpp 75