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 FinishedManagerListener { 27 public: ~FinishedManagerListener()28 virtual ~FinishedManagerListener() { } 29 template<int I> struct X { enum { TYPE = I }; }; 30 31 typedef X<0> AddedFile; 32 typedef X<1> AddedUser; 33 typedef X<2> UpdatedFile; 34 typedef X<3> UpdatedUser; 35 typedef X<4> RemovedFile; 36 typedef X<5> RemovedUser; 37 typedef X<6> RemovedAll; 38 on(AddedFile,bool,const string &,const FinishedFileItemPtr &)39 virtual void on(AddedFile, bool, const string&, const FinishedFileItemPtr&) noexcept { } on(AddedUser,bool,const HintedUser &,const FinishedUserItemPtr &)40 virtual void on(AddedUser, bool, const HintedUser&, const FinishedUserItemPtr&) noexcept { } on(UpdatedFile,bool,const string &,const FinishedFileItemPtr &)41 virtual void on(UpdatedFile, bool, const string&, const FinishedFileItemPtr&) noexcept { } on(UpdatedUser,bool,const HintedUser &)42 virtual void on(UpdatedUser, bool, const HintedUser&) noexcept { } on(RemovedFile,bool,const string &)43 virtual void on(RemovedFile, bool, const string&) noexcept { } on(RemovedUser,bool,const HintedUser &)44 virtual void on(RemovedUser, bool, const HintedUser&) noexcept { } on(RemovedAll,bool)45 virtual void on(RemovedAll, bool) noexcept { } 46 }; 47 48 } // namespace dcpp 49